I swutched again to Juice as my podcatcher. One of the coolest Juice features is its ability to syncronize your feed list with a remote OPML URL. An OPML file is actually a list (or nested lists) described in a standard way in XML. In our case, a list of RSS feeds (one for each podcast)
As far as I know, the most popular link managment tool is del.icio.us, a tool I love for its power and simplicity. del.icio.us allow you to export all your links in RSS which is cool. So, I wrote a quick and dirty PHP script that converts this RSS export to an OPML list (see at the end of this post). The script makes use of the excelent MagpieRSS rss/atom parsing library.
Now, let’s say my del.icio.us username is “vrypan2″ and I tag all podcast feeds with the tags “podcast” and “feed”. This is my del.icio.us page, and http://del.icio.us/vrypan2/podcast+feed are my podcast AND feed links.
I just edit my script and set $username=”vrypan2″ and $tag=”podcast+feed”. To make it easier for you to test it, I also installed it at http://vrypan.net/linkblog/delicious2opml.php.
Then I go to Juice -> Preferences ->Feed Manager ->OPML URL and paste the above link.
Now, whenever I add a new link to my del.icio.us account (tagged podcast and feed), Juice will add it to my feedlist!
(The idea could be extended to other applications that use lists of URLs in OPML format. I would also love to see this turn into a service…)
UPDATE: It turned out that the whole thing excited others too. Especially Les, puts down some intersting ideas, read his post Use del.icio.us to build & share Reading Lists?
—
Here is the PHP script:
< ?php
$username = "vrypan2" ;
$tag = "podcast+feed" ;
header('Content-Type: text/xml') ;
define('MAGPIE_DIR', './inc/');
require_once(MAGPIE_DIR.'rss_fetch.inc');
$url = "http://del.icio.us/rss/$username/$tag/";
$rss = fetch_rss( $url );
// print_r($rss) ;
$items = $rss->items ;
?>
<opml version="1.1">
<head>
<title>del.icio.us list2OPML: < ?= $username ?>/< ?= $tag ?></title>
<link>http://del.icio.us/< ?= $username ?>/< ?= $tag ?></link>
<ttl>3600</ttl>
</head>
<body>
<outline text="del.icio.us 2 OPML">
< ?php
for($i=0; $i<count($items); $i++) {
echo "\t\t\t<outline title=\"{$items[$i]['title']}\" text=\"{$items[$i]['title']}\" type=\"rss\" htmlUrl=\"\" xmlUrl=\"{$items[$i]['link']}\"/> \n" ;
}
?>
</outline>
</body>
</opml>
Nice script! I had to tweak it a little bit, but once I did it worked perfectly. I have been looking for something similar so that I could upload my del.icio.us bookmarks into my wordpress.com blog. It doesn’t just accept and parse RSS. It needs OPML. Go figure. Anyway, nice work.