Description
Here's another 'starter' script that may prove useful if you want to
consume an RSS feed but wish to have more control over it than the
default CT RSS plugin allows. It is a lightly-modified version of the
one documented at http://www.learningpython.com/2006/01/14/rss-reader-part-one/,
and is tailored to handle the Slashdot feed. Still, it demonstrates how
to grab XML content and could be easily expanded upon. Thanks to the
original author, selsine@gmail.com, the script is pretty well documented.
The script outputs the existing news items on Slashdot.org and does
some simple CT-style formatting so a table of contents is generated at
the top of the topic page and inline links to the actual web pages are
built. Additionally, there's a little regular expression magic at work
to parse out some garbage at the end of the descriptive text as well as
eliminate CT formatting issues if a double dash (--) is encountered.
There are some remaining known formatting issues, such as odd paragraph
breaks and other HTML escape codes.
Script originally posted to the official ConnectedText forum here.
Screenshot
Requirements
ConnectedText 2.0.0.1 or later and an Internet connection.
Installation
Cut and paste the inline code from this file into a ConnectedText topic (page) of your choice.
Enhancements, Suggestions, Etc.
As noted in the description above, there are still some formatting issues involving paragraph breaks and other strange characters from time to time -- that's probably a good starting spot.
There are several RSS modules for Python out there as well that you could use; I've tried to avoid incorporating modules not in the standard distribution merely because of the difficulty I've had in the past in getting Python within CT to see them.
