| Name | Last modified | Size | Description | |
|---|---|---|---|---|
| Parent Directory | - | |||
| Changes | 2005-03-04 15:38 | 205 | ||
| TCB-RSS-0.50.tar.gz | 2005-03-04 15:38 | 9.9K | ||
| TCB-RSS-0.51.tar.gz | 2005-03-04 15:38 | 11K | ||
TCB::RSS - helper scripts for RSS scripts
use TCB::RSS; use XML::RSS; use CGI;
$CHANNEL = (
'title' => "TCB Group",
'link' => "http://www.ks.uiuc.edu/",
'language' => "en",
'description' => "Changes on the TCB Group Web Site",
'copyright' => "Copyright 2005, UIUC Board of Trustees",
'pubDate' => scalar localtime,
'webMaster' => 'webmaster@ks.uiuc.edu',
'lastBuildDate' => scalar localtime
'syn' => {
'updatePeriod' => "daily",
'updateFrequency' => "1",
'updateBase' => "2005-03-34T00:00",
},
);
## Create the RSS channel
my $rss = new XML::RSS;
$rss->channel( %{$CHANNEL} );
## Read the updates from $FILE
my @updates = TCB::RSS->parse_updates($FILE);
foreach (@updates) { $rss->add_item( %{$_} ) }
## Print the RSS information print CGI->header, $rss->as_string, "\n";
TCB::RSS provides code for using a shared file to listing updates that are then shared with XML::RSS or other related code. This can be used for any number of useful web site maintenance tricks.
The file format looks like this:
Title: RSS feed URL: http://www.ks.uiuc.edu/cgi-bin/rss.cgi Date: Fri Mar 04 11:53:43 CST 2005 A new RSS feed setup. ###
The returned object is a hashref containing the following fields:
{ 'title' => "RSS feed",
'link' => "http://www.ks.uiuc.edu/cgi-bin/rss.cgi",
'description' => "A new RSS feed setup",
'pubDate' => "Fri Mar 04 11:53:43 CST 2005" }
The '###' is the delimiter between entries.
rss.cgi, newrss.cgi, etc
Written by Tim Skirvin <tskirvin@ks.uiuc.edu> and <tskirvin@killfile.org>.
http://www.ks.uiuc.edu/Development/MDTools/tcb-rss/
This code is distributed under the University of Illinois Open Source
License. See
http://www.ks.uiuc.edu/Development/MDTools/tcb-system/license.html for
details.
Copyright 2003-2005, Tim Skirvin <tskirvin@killfile.org>
Copyright 2005 by the University of Illinois Board of Trustees and Tim Skirvin <tskirvin@ks.uiuc.edu>.