Index of /Development/MDTools/tcb-rss/files

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[   ]TCB-RSS-0.51.tar.gz 2005-03-04 15:38 11K 
[   ]TCB-RSS-0.50.tar.gz 2005-03-04 15:38 9.9K 
[   ]Changes 2005-03-04 15:38 205  

TCB::RSS - helper scripts for RSS scripts


NAME

TCB::RSS - helper scripts for RSS scripts


SYNOPSIS

  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";


DESCRIPTION

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.

FUNCTIONS

parse_updates ( FILE )
Reads FILE for update information, and returns a list of items suitable of being added to an XML::RSS object *in reverse order* from what's in the file - ie, the last item in the file is the first added. Dies if the file couldn't be opened.


NOTES

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.


SEE ALSO

rss.cgi, newrss.cgi, etc


AUTHOR

Written by Tim Skirvin <tskirvin@ks.uiuc.edu> and <tskirvin@killfile.org>.


HOMEPAGE

http://www.ks.uiuc.edu/Development/MDTools/tcb-rss/


LICENSE

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

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>.