Slug: rss-puller Date: 2001-01-20 Title: RSS Puller layout: post

After spending time learning just about every other interesting scripting language undet the sun, I realized recently that I had totally neglected a powerful tool, right under my nose: Applescript.

Now, Applescript is often maligned by the general scripting community as being a too verbose. Indeed, it's english-like syntax is fairly verbose, but incredibly flexible as well. This is not, however, going to be an Applescript tutorial, so I'll suffice it to say that I've been learning Applescript, and in doing so decided to also throw in someof my other passions, XML and web-based news syndication.

So I've created RSSPuller. RSSPuller is an applescript applet that works with a fantastic Mac outliner called BrainForest. Brainforest Professional is the desktop version of a Aportis's Palm outliner. BrainForest is also very scriptable, with a flexible object model for manipulating outlines. Here's what you end up with from RSSPuller:

Firstly, some background on RSS: the Resource Description Framework is an XML format that is used by news websites to let other sites syndicate their news headlines. Several other RSS readers have been developed, most notably Jeff Barr's Headline Viewer.

RSSPuller let's you create an outline of RSS sources, which are then filled in for you with the news headlines and links when the script is run. I'm using the iDo Script Scheduler to run the script every 30 minutes.

The script takes an outline of RSS sources from Brainforest, and using URLs stored in the note field of the outline object, downloads the RSS file. NOte: it only downloads the files for those sources which have been checked off (marked as done) in the sources outline. In this way you can select which sources to get at any particular time.

RSSPuller then creates subnodes under each headline, and a subnode of the headline for the link. It also sets the start and due dates on the source node to the current time, so you can see when it was last updated.

The script could be more intelligent - I'd like to have it use other features of BrainForest's rich set of tree-item properties. For example, it would be better to have the script run more often, and have it use the due dates to check when it should next download that file. Then I could set it to update less often for some sources, and more often others. I could also use the frequency property to store a number of minutes.

If you'd like to try RSSPuller, you can download it. You can also get the text here.

Of course, you'll need BrainForest Profession for the Macintosh ($30 from Aportis)

There don't seem to be any show stopper bugs here, but I wouldn't suggest using this script yet if you're afraid to dig into Script Editor once in a while.