this adds in date math to change from two months to two weeks for the feed length
This commit is contained in:
parent
211dede75a
commit
e8b01b292c
25
smhnRSS.pl
25
smhnRSS.pl
@ -21,6 +21,7 @@ use warnings;
|
||||
# Packages
|
||||
|
||||
use Time::Piece; # https://perldoc.perl.org/Time::Piece
|
||||
use Time::Seconds; # https://perldoc.perl.org/Time::Seconds
|
||||
use LWP::Simple; # https://metacpan.org/pod/LWP::Simple
|
||||
use XML::RSS; # https://metacpan.org/pod/XML::RSS
|
||||
use HTML::Entities; # https://metacpan.org/pod/HTML::Entities
|
||||
@ -52,9 +53,12 @@ my $copyright = 'Copyright respective writers';
|
||||
# add to new RSS feed object
|
||||
###################################
|
||||
|
||||
# number of weeks in the past to hold RSS feed
|
||||
my $num_weeks = 2;
|
||||
|
||||
# get today, subtact time to make cut off
|
||||
my $now = localtime;
|
||||
my $then = $now->add_months(-2);
|
||||
my $then = $now - (ONE_WEEK * $num_weeks);
|
||||
|
||||
#number of items to keep from each feed
|
||||
my $number_of_items = 2; # +1 since everything starts at 0
|
||||
@ -356,7 +360,6 @@ sub formatDate {
|
||||
|
||||
__DATA__
|
||||
https://ecatherine.com/feed/
|
||||
https://lynnehansen.zenfolio.com/blog.rss
|
||||
https://redlagoe.com/feed/
|
||||
https://diebooth.wordpress.com/feed/
|
||||
https://kelliowen.com/feed/
|
||||
@ -375,7 +378,7 @@ http://fiendlover.blogspot.com/feeds/posts/default
|
||||
http://jacobhaddon.com/feed/
|
||||
http://apokrupha.com/feed/
|
||||
https://ellendatlow.com/feed/
|
||||
https://paulaguran.com/
|
||||
https://paulaguran.com/feed/
|
||||
https://amandaheadlee.com/feed/
|
||||
https://theimbloglio.wordpress.com/feed/
|
||||
https://kennethwcain.com/feed/
|
||||
@ -384,5 +387,21 @@ http://robertfordauthor.com/feed/
|
||||
https://tinyfrights.com/feed/
|
||||
https://weightlessbooks.com/feed/
|
||||
https://www.crystallakepub.com/feed/
|
||||
https://lynnehansen.zenfolio.com/blog.rss
|
||||
https://www.bevvincent.com/feed/
|
||||
http://liviallewellyn.com/feed/
|
||||
https://www.kristidemeester.com/blog-feed.xml
|
||||
https://www.lucysnyder.com/index.php/feed/
|
||||
https://www.emilyruthverona.com/blog-feed.xml
|
||||
https://www.elizabethhand.com/welcome?format=rss
|
||||
https://www.jamielackey.com/feed/
|
||||
https://cv-hunt.com/feed/
|
||||
https://authorjenniferallisprovost.com/feed/
|
||||
https://jezzywolfe.wordpress.com/feed/
|
||||
https://lmariewood.com/feed/
|
||||
https://www.leemurray.info/blog-feed.xml
|
||||
https://meghanarcuri.com/feed/
|
||||
https://nicolecushing.wordpress.com/feed/
|
||||
https://saratantlinger.com/feed/
|
||||
https://sunnymoraine.com/feed/
|
||||
https://lauramauro.com/feed/
|
Loading…
x
Reference in New Issue
Block a user