[plt-scheme] scheme rss available
Bruce Butterfield
bab at entricom.com
Fri Apr 4 15:31:00 EST 2003
For those of you who just can't get enough news, I've written an RSS
servlet for the PLT web server. The cvs server at sourceforge is giving
me a hard time about checking in the code but until I get that
straightened out it is available from me via email. I've attached the
documentation file for those interested...
-------------- next part --------------
_RSS_ Collection
=======================
This collection provides parsing, transform, network, and
configuration support for RSS (Really Simple Syndication) files. The
associated servlet allows a user to add, browse, delete, and refresh a
set of RSS "channels". A good introduction to RSS is at:
http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html?page=1
This version supports RSS versions 0.91, 0.92, 1.0, and 2.0. Support
for 0.90 is shaky.
Prerequisites
======================
SSAX is used to parse the RSS files. A version for PLT is available
at:
http://www196.pair.com/lisovsky/download/ssax/ssax-20021009.plt
Note that you need a version that contains 'parse-error.ss'; the
version noted above has it.
Installation
======================
Unwrap the tarball in $PLTHOME/collects. This will create an rss
collection. Create the directory:
$PLTHOME/collects/web-server/default-web-root/servlets/rss
Move the files rss/rssservlet.ss and rss/addchannel.ss to this new
servlet directory. That's it!
Configuration
======================
The file $PLTHOME/collects/rss/rss-config contains user-configurable
parameters:
((paths (datadir "data") (channeldir "channels"))
(mychannels
("http://www.infoworld.com/rss/news.rdf"
"http://slashdot.org/slashdot.rss"))
(refresh 3600)
(timeout 10))
The 'mychannels' parameter is a list of feed URLs; this may be edited
by hand or (preferably) updated through the servlet. In this inital
version 'refresh' and 'timeout' parameters are unused. The 'paths'
parameters indicate where the RSS files and any other configuration
information will be stored. The 'datadir' parameter should be relative
to the rss directory.
Startup
======================
Start the web server ($PLTHOME/bin/web-server-text -p 8080, for
example), fire up a browser and point to
http://localhost:8080/servlets/rss/rssservlet.ss
You should see a banner page and some content (old, since the
distribution comes with existing RSS files). Click the 'Reload
channels' link to get fresh news. 'Add Channel' takes you to a page
(ugly, but what are you gonna do?) in which you enter the URL for a
feed you want to add. A handy site to find RSS feeds is:
http://www.syndic8.com.
Use the 'Remove channel' links to do the obvious.
Notes
=======================
This is an initial release so it's a little raw. Main issues:
1) Channel download is synchronous and on-demand only.
2) Pages are a bit ugly but I'm not a web designer.
3) No user-defined style-sheets.
4) Target URLs are '_self', should be able to configure this.
5) Adding a channel is error-prone and ugly. Should be able to use
rss 'cloud' to derive selection lists.
6) No easy way to remove bad or broken RSS URLs from configuration
other than by hand editing rss-config.
7) It's a little delicate; need more exception support in the parser
and the download components.
Questions and comments to: Bruce Butterfield bab at entricom.com
More information about the plt-scheme
mailing list