]> lifelog.hopto.org Git - LifeLog.git/commitdiff
upd. layout and hdr fix for RSS.
authorWill Budic <redacted>
Mon, 20 May 2024 19:48:52 +0000 (05:48 +1000)
committerWill Budic <redacted>
Mon, 20 May 2024 19:48:52 +0000 (05:48 +1000)
htdocs/cgi-bin/CNFServices.cgi
htdocs/cgi-bin/system/modules/RSSFeedsPlugin.pm

index d9cb052565bfeab639df1713c8500996f5c0a9bf..a67ccd674a5e48e29d21a3321d9caee004e4fafb 100755 (executable)
@@ -34,7 +34,6 @@ use constant LOG_Settings => q(
 <<@<%LOG>
     file      = web_server.log
     # Should it mirror to console too, in productation this must be zero,
-    # otherwise it will not output client.
     console   = 0
     # Disable/enable output to file at all?
     enabled   = 1
@@ -167,12 +166,14 @@ of the Perl programming language through open discussion, collaboration, design,
  The Perl Foundation is a non-profit organization* based in Holland, Michigan~
 
 #`Perl Weekly`https://perlweekly.com/perlweekly.rss`
-`A free, once a week e-mail round-up of hand-picked news and articles about Perl.
+7 busienss days`
+A free, once a week e-mail round-up of hand-picked news and articles about Perl.
 The Perl Weekly ( http://perlweekly.com/ ) is a newsletter including links to blog posts and other news items
  related to the Perl programming language.~
 
 #`The Cipher Brief RSS Feed`https://www.thecipherbrief.com/feed`
-`The Cipher Brief is the go-to digital platform for the latest security news and high-level analysis. Each day, we offer multiple expert perspectives, engaging the private sector to find solutions and foster dialogue on what events mean for businesses and organizations around the world. More than just reporting on the news, The Cipher Brief helps readers understand what the news means to you.~
+7 busienss days`
+The Cipher Brief is the go-to digital platform for the latest security news and high-level analysis. Each day, we offer multiple expert perspectives, engaging the private sector to find solutions and foster dialogue on what events mean for businesses and organizations around the world. More than just reporting on the news, The Cipher Brief helps readers understand what the news means to you.~
 
 #`The Sydney Morning Herald - World RSS Feed`http://www.smh.com.au/rssheadlines/world/article/rss.xml`
 1 business days`
@@ -186,14 +187,14 @@ Lifehacker's is an award-winning daily blog that features tips, shortcuts, and d
 3 business days`
 Your essential guide to what’s next, delivering the WIRED take on the intersection of technology, science, business, and culture.`~
 
-#`Viral Now`https://viralnow.uk/feed/`3 business days`ViralNow is a dynamic online platform at the forefront of curating and delivering trending and viral content. ViralNow brings you the latest and most engaging stories, videos, and articles from around the world.~
+#`Politico`https://rss.politico.com/politics-news.xml`2 business days`POLITICO strives to be the dominant source for news on politics and policy in power centers across every continent where access to reliable information, nonpartisan journ.lism and real-time tools create, inform and engage a global citizenry.~
 >>
 
 <<Disabled<
 #`Viral Now`https://viralnow.uk/feed/`3 business days`ViralNow is a dynamic online platform at the forefront of curating and delivering trending and viral content. ViralNow brings you the latest and most engaging stories, videos, and articles from around the world.~
 
 
-#`Politico`http://www.politico.com/rss/politicopicks.xml`3 business days`POLITICO strives to be the dominant source for news on politics and policy in power centers across every continent where access to reliable information, nonpartisan journ.lism and real-time tools create, inform and engage a global citizenry.~
+#`Politico`https://rss.politico.com/politics-news.xml`3 business days`POLITICO strives to be the dominant source for news on politics and policy in power centers across every continent where access to reliable information, nonpartisan journ.lism and real-time tools create, inform and engage a global citizenry.~
 >>
 
 __CNF_IS_COOL__
index 4aaa7aa8bce257ef8ead6c1064dcf649bf4fbaa5..52030d48474553ac812ad784440d0bfd5609ac56 100644 (file)
@@ -51,6 +51,7 @@ sub process ($self, $parser, $property) {
         }
     my @header = @$ptr;
     my @data = @{$$table->{data}};
+    #$parser->log("Header size:".scalar(@header) );
     for my $idx (0 .. $#data){
         my @col = @{$data[$idx]};
         if($idx==0){
@@ -58,13 +59,13 @@ sub process ($self, $parser, $property) {
             if(@header){
                my @lbls =  CNFMeta::_deRefArray($header[0]);
                my @spec =  CNFMeta::_deRefArray($header[3]);
-               $lbls[4] = $col[4];
-               $spec[4] = $CNFMeta::CNF_DATA_TYPES{DATE};
+               $lbls[5] = $col[5];
+               $spec[5] = $CNFMeta::CNF_DATA_TYPES{DATE};
                $$table->{header} = \[\@lbls,$header[1],$header[2],\@spec];
             }
         }else{
             $col[0] = $idx+1;
-            $col[4] = $self-> {date} -> toTimestamp();
+            $col[5] = $self-> {date} -> toTimestamp();
         }
         $data[$idx]=\@col;
     }
@@ -74,7 +75,7 @@ sub process ($self, $parser, $property) {
            my @col = @{$data[$idx]};
            $page .= qq|<li><span style="border: 1px solid black; padding: 5px; padding-bottom: 0px;">
            <a onclick="return fetchFeed('$col[1]')" style="cursor: pointer;"> <b>$col[1]</b> </a></span>
-            &nbsp;&nbsp;[ $col[4] ]<dt style="padding:10px;">$col[3]</dt></li>\n|;
+           <dt style="padding:5px;">$col[4]</dt><dt style="padding:5px;">Feed Refresh Rate: $col[3]</dt></li>\n|;
        }
        $page .= '</ol></div>';
        $parser->data()->{PAGE} = \$page
@@ -101,11 +102,11 @@ sub collectFeeds($self, $parser) {
      $ptr = $$table->{data};
   my @data =  @$ptr;
   my %hdr;
-     for(my $i=0;$i<@lbls;$i++){ #<- Column names are set here, if names in script are changed, They must be changed bellow.
-         $hdr{$lbls[$i]} = $i
-     }
-  $parser->log("Feed request:$feed data.size:" .scalar(@data)) if$feed;
   try{
+  for(my $i=0;$i<@lbls;$i++){ #<- Column names are set here, if names in script are changed, They must be changed bellow.
+      $hdr{$lbls[$i]} = $i
+  }
+  $parser->log("Feed request:$feed data.size:" .scalar(@data)." hdr:".scalar(keys %hdr)) if$feed;
   for my $idx (0 .. $#data){
          my @col = @{$data[$idx]};
          #$parser->log("Feed spec: @col");