#!/usr/local/bin/perl -w
#dan's perl rss aggregator from http://ilrt.org/discovery/2001/05/rss-agg
#hacked to use my photo feeds feeds
#use strict;
use XML::RSS;
use LWP::Simple;
my $dir="http://www.ilrt.bristol.ac.uk/discovery/2003/03/rss/";
my $content;
my @remote = (
$dir . "2003.rss",
$dir . "2002.rss",
$dir . "2001.rss",
$dir . "2000.rss"
);
# TODO: use eval () to recover from XML::RSS errors
print header();
print "last update: ".`date`."
"; #sigh, can't be bothered to perlman
print <
HTML
my @todo=@remote;
print "
For more information see the Semantic Web group page
Search using keyword
HTML } sub footer { return <This viewer uses Dan Brickley's codeThis is a little traversal program which goes through a directory picking out index.html and readme.html, and getting the titles to build an rss file. For usage, see Makefile, for files (perl and the rss files) see directory.
|
$rss->{'channel'}->{'title'}
$rss->{'channel'}->{'description'} |
|
HTML
# print channel image
if ($rss->{'image'}->{'link'}) {
print <
\n"; } # print the channel items foreach my $item (@{$rss->{'items'}}) { if ($full && $item->{'description'} ) { print " ";
print $item->{'description'};
print " HTML } # if there's a copyright element if ($rss->{'channel'}->{'copyright'}) { print <$rss->{'channel'}->{'copyright'} HTML return 0; } print < |