#!/usr/bin/perl
# Time-stamp: "2024-11-14 05:15:26 MST"
#
# See http://www.interglacial.com/rss/ for info on RSS feeds
#

use strict;
use constant DEBUG => $ENV{'MAILTO'} ? 0 : 2;

use XML::RSS::SimpleGen 12;

my $nombre = 'pokey_the_penguin';

rss_new(
  (my $base = 'http://yellow5.com/pokey/archive/'),
  "Pokey the Penguin"
);
rss_daily();
rss_webmaster('sburke@pobox.com');
rss_self_url(      "http://interglacial.com/rss/$nombre.rss" );
rss_generator_url( "http://interglacial.com/rss/$nombre.pl" );
rss_livejournal( 'pokeypeng' );
rss_item_limit(5);

get_url( $base );

my @them;
while( m{<a href="(index\d+\.html)"><i>([^\n\r]*?)</i></a><p>}g ) {
  push @them, [ "$base$1", $2 ];
  for(  $them[-1][1]  ) { $_ = lc $_ if $_ eq uc($_) }
  DEBUG and print "@{$them[-1]}\n";
}

foreach my $it (reverse @them) { rss_item( $it->[0], $it->[1] ) }

rss_item_count or die "$0: No items?";
rss_save("$nombre.rss", 100);
exit;

