These are the old pages from the weblog as they were published at Cornell. Visit www.allthingsdistributed.com for up-to-date entries.

October 08, 2003

Simple Tool to Download RSS Enclosures

There have been a few activities at the rss enclosures front, notable an enclosure-to-ipod gateway Kevin Marks plans to build and for which Adam Curry has set up an experimental syncPod feed.

I agree with Greg that automatic downloads of large enclosures is not necessarily a 'good thing' , but I also didn't want to miss out on the fun of some of the enclosures available. And since I long ago left radio behind my aggregators do not support enclosures. So I hacked something together in 20 lines of C# and you now have a small tool to download enclosures. If you want to get the off-hour behavior that radio also obeys, stick the tool in your windows scheduler.

From the readme file:

GetRSSEnclosures

usage: getrssenclosures url [url*]

The program takes one or more urls of RSS files and scans those for items with an enclosure tag. Each of the enclosures it finds it will download into the current directory if the file does not exist yet. Progress and error messages are written into a file named getrssenclosures.log. The executable requires the .NET Framework V1.1.

If one wants to emulate the way radio userland handles enclosures, one should stick this program into the windows scheduler to achieve downloads during off-hours.

Caveat: This is a hack, there is very limited error checking and recovery, nor does it check whether the size and media type of the enclosure are identical to that specified in the enclosure tag. Use at you own risk, this program may corrupt your file system, and cause irreparable damage to your system. See the source files in getrssenclosures-src.zip for details.

Todo: make this into a plug-in for Ephpod, make a version with a UI so people can pick which enclosures to download.

Download: executable - source files. Enjoy!

Posted by Werner Vogels at October 8, 2003 08:42 PM
TrackBacks

Comments

I have made an XSLT RSS feedcombiner (slow with many files and feeds and all feeds need to be well-formed for it to work) in which I today included RSS 2 enclosure. My Blogroll file has a link to Adam's experimental syncpod file.
The media content(MP3 file) is automatically played by a SMIL custom audio element (streams the MP3!) when the feed item is selected.
(You need IE6 with msxml4, transformation may take some minutes)

http://cybarber.ath.cx/ATOMRSSfeedcombiner.html

William A Slabbekoorn

Posted by: cybarber on October 9, 2003 09:30 AM