Several months ago I needed a way to keep my "blogroll" (list of RSS feeds I read, as seen on the side of my blog index page) up to date. Luckily, my news aggregator kept all the information in an OPML file called myChannels.opml. All I needed to do was extract the relveant information, sort it, spit out some HTML that can be included via SSI or PHP, and set it up to run from cron so that I don't have to think about it.
So I spent a few minutes on the problem and hacked out opml2html.pl. It's simple but does the job for me. Simply feed it an OPML file on STDIN and it'll spit back the XHTML code on STDOUT. That means you can run it like this: opml2html.pl < foo.opml > bar.html
A while back someone asked me how it I did this, so I sent the script. A few days ago, fellow Yahoo Michael Radwin asked how I did it. I sent him the script too. It turns out that his aggregator also produces a useful OPML file. He sent back patch today that improved it. That was enough to convince me that it's probably useful enough to share.
If someone is willing to patch your code, odds are good that several others are willing to use it.
Posted by jzawodn at December 26, 2002 02:51 PM