# $p->{'service'} = ['feeds'];
# $p->{'action'} = ['read'];
# $p->{'feed'} = ['Life Hacker'];
- # $p->{'setup'} = ['htdocs/cgi-bin/rss_feeds_setup.cnf'];
-
+ #$p->{'setup'} = ['htdocs/cgi-bin/rss_feeds_setup.cnf'];
+ # $p->{'setup'} = ['rss_feeds_setup.cnf'];
##
# This is a entry point script (main).
>>
// Following is a table having a list of details for available RSS feeds to process.
|| The more rows have here the longer it takes to fetch them, what is it, once a day, week, month?
-<< RSS_FEEDS <DATA>
+<< RSS_FEEDS <DATA> __CONST__
ID`Name`URL`Expires`Description~
-#`CPAN`http://search.cpan.org/uploads.rdf`3 business days`
-CPAN modules news and agenda.~
-#`The Perl Foundation RSS Feed`https://news.perlfoundation.org/rss.xml`3 business days`
+#`CPAN`http://search.cpan.org/uploads.rdf`
+3 business days`CPAN modules news and agenda.~
+
+#`The Perl Foundation RSS Feed`https://news.perlfoundation.org/rss.xml`
+3 business days`
The Perl Foundation is dedicated to the advancement
of the Perl programming language through open discussion, collaboration, design, and code.
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.
+#`Perl Weekly`https://perlweekly.com/perlweekly.rss`
+`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.~
+
+#`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.~
#`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.~
-#`The Sydney Morning Herald - World RSS Feed`http://www.smh.com.au/rssheadlines/world/article/rss.xml`1 business days`
+#`The Sydney Morning Herald - World RSS Feed`http://www.smh.com.au/rssheadlines/world/article/rss.xml`
+1 business days`
The Sydney Morning Herald is Australia's leading news source. The Sydney Morning Herald sets the standard for journalistic excellence for Sydney, Australia, and the rest of the world. From breaking news, to travel and fashion, The Sydney Morning Herald continues to transform the way Australians get their news.~
-#`Life Hacker`https://lifehacker.com/feed/rss`3 business days`Lifehacker's is an award-winning daily blog that features tips, shortcuts, and downloads that help you work and live smarter and more efficiently.`~
+#`Life Hacker`https://lifehacker.com/feed/rss`
+3 business days`
+Lifehacker's is an award-winning daily blog that features tips, shortcuts, and downloads that help you work and live smarter and more efficiently.`~
#`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.~
>>
return bless $settings, $class
}
+my %hdr;
+
###
# Process config data to contain expected fields.
###
}
if($cgi&&$cgi->param('action') eq 'list'){
my $page = _css().'<div class="feed"><h2>List Of Feeds</h2><ol>';
- for my $idx (1 .. $#data){
+ for my $idx (0 .. $#data){
my @col = @{$data[$idx]};
- $page .= qq|<li><span class="feeds_list_span">
- <a onclick="return fetchFeed('$col[1]')" style="cursor: pointer;"> <b>$col[1]</b> </a></span>
- [ $col[4] ]<dt style="padding:10px;">$col[3]</dt></li>\n|;
+
+ if($idx==0){
+ for my $i(0..$#col){ # Get the matching table column index names as scripted.
+ $hdr{$col[$i]} = $i
+ }
+ }else{
+ $page .= qq|<li><span class="feeds_list_span">
+ <a onclick="return fetchFeed('$col[$hdr{Name}]')" style="cursor: pointer;"> <b>$col[$hdr{Name}]</b> </a></span>
+ [ $col[$hdr{last_updated}] ]<dt style="padding:10px;">$col[$hdr{Description}]</dt></li>\n|;
+ }
}
$page .= '</ol></div>';
$parser->data()->{PAGE} = \$page
sub collectFeeds($self, $parser) {
my $property = $self->{property};
- my %hdr;
my @data = @{$parser->data()->{$property}};
my $cgi = $parser->const('CGI');
my $page;