I've checked in some changes to schemerss. This fixes the remove channel
bug I mentioned last week. I've also moved the html rendering code out of
the rssparser module, into a new module named rsshtmlview. Other than the
bugfix, the functionality of the application should be unchanged.
However, the rssparser module can now be used as a general purpose library
for reading rss channels, which I've documented very briefly (and without
following any doc conventions, yet) in doc.txt.
As an aside, this means that schemerss is no longer only an "app" - it's
also a library, so strictly speaking, at least part of it is now in the
wrong cvs directory :) The library modules are rsscomm, rssconfig and
rssparser. The app modules are rssservlet, addchannel, rsshtmlview.
A summary of the changes follows:
* rsscomm: moved url->filename to rssconfig, to support updated
get-channel-file-list
* rssconfig: modified get-channel-file-list to return filenames in same
order as urls appear in config file - fixes the "remove channel" bug.
* rssparser:
* refactored html rendering code into rsshtmlview - included removing some
view-specific parameters from functions like process-channel, process-rss.
* changed process-channel to return an rss-channel struct, instead of
calling display-channel, to support other uses.
* renamed process-rss to sxml->rss-channel, since it now returns an
rss-channel struct, via process-channel.
* implemented set of read-rss-channel functions to read an rss channel
from a port, file, url struct, or url string.
* rsshtmlview: changed rss->html to use read-rss-channel-from-file
* rssservlet: changed to require rsshtmlview instead of rssparser
Feel free to change anything, of course.
I haven't yet checked in my code to monitor an rss channel and send
notifications when new items are detected. I originally tried to develop
this the lazy way, using a thread per channel being monitored, but I ran
into a bug in multithreaded use of MzScheme's tcp-connect, on Windows.
(I've posted a fix to PLT list.) I now need to either add some
code to work around this bug until the MzScheme fix is integrated, or change
the logic to avoid threads. I'll check something in next week.
Anton
|