Currently browsing opml
Mon, 8 May 2006 14:35 UTC
It seems I’ve been focused on OPML for the past few posts, and why not? OPML appears to be gaining a lot of attention lately. There’s even an OPML Camp in Boston later this month.
So, what’s all the fuss about? Adam Green summarizes his vision for the future of OPML on the OPML Camp blog:
I see OPML as an extremely flexible container for many types of XML and HTML data. Its simplicity and extensibility means that it can be used to bring together many types of structured content that are currently being developed on the Web, such as microcontent, attention data, identity data, and data that will eventually comprise the Semantic Web. OPML won’t replace these many efforts, it will help integrate them, by providing a common packaging mechanism.
Adam Green, OPML Camp blog
As of right now, many sites are using RSS as a common content delivery format. While RSS works for syndication, though, I think that it lacks the extensibility and context to fill the role of this “flexible container.” OPML won’t replace RSS, but it will aid in its delivery. So, I’m a little more than casually interested in seeing the application and future direction of OPML.
Along these lines, Dave Winer, launched today his new Share Your OPML service, the purpose of which is to “gather a community of subscription lists, in OPML format, and aggregate them in interesting ways.” It’s unclear to me (right now) the practical value of this service, since I was unable to discover how to actually generate OPML from the site. If the site were to provide OPML feeds for each data display, then its value would be readily apparent. Right now, I can only find an OPML feed for the Top 100 shared feeds.
Nevertheless, in the spirit of signing up for every new service out there, you can view my shared feeds here.
No Comments
Permalink
Tags: opml, rss, semantic-web, web-2.0, xml
Sat, 6 May 2006 15:40 UTC
UPDATE: Please note that del.icio.us has updated their API in the time since I wrote this. I have updated the URLs in my examples accordingly. The authentication is much safer since they are now using SSL.
The other day, I mentioned that I generate my blogroll from an OPML file. Until recently, this OPML file was generated manually by me whenever I updated my blogroll in NewsFire.
Now, there are some problems with NewsFire, one of which is that you cannot generate OPML for a specific group or selection of blogs (NetNewsWire excels in this area, however). Instead, the OPML file generated is a dump of all your feeds. This was not ideal for me, since I then had to go through and clean up the OPML before uploading it to my site. Needless to say, I updated my OPML as little as possible.
After my last blog post, I posted a comment to Chris’s blog saying that he should do something similar. That is, I suggested he generate his blogroll from an OPML file instead of del.icio.us, which has the unfortunate limitation of only 30 items per RSS feed. He replied, saying that he would then have to update two places (his feed reader and del.icio.us) instead of only one. In short, it would create more work. After assessing my practices, I cannot agree more.
So, I investigated a way to get around the 30-feed limitation in del.icio.us, and I found that their API allows you to do just this, albeit with a few restrictions of its own, which I’ll explain in a few moments. Using the del.icio.us API, instead of their RSS feeds, I was able to use the following code to first check whether my del.icio.us account has been updated since I last cached their data, and, if so, to grab all of the links for a particular tag and cache the data to a file for later use:
<?php
$username = 'your_username';
$password = 'your_password';
$cache_file = '/tmp/blogroll.xml';
$update = simplexml_load_file("https://{$username}:{$password}@api.del.icio.us/v1/posts/update");
if (strtotime($update['time']) > filemtime($cache_file))
{
$data = file_get_contents("https://{$username}:{$password}@api.del.icio.us/v1/posts/all?tag=blogroll");
file_put_contents($cache_file, $data);
}
$blogroll = simplexml_load_file($cache_file);
foreach ($blogroll->post as $blog)
{
echo '<a href="' . htmlentities($blog['href']) . '">';
echo htmlentities($blog['description']);
echo "</a><br />\n";
}
?>
This code sample uses SimpleXML to traverse the nodes of the XML documents retrieved from del.icio.us. It first polls del.icio.us with a request to see the update timestamp. Checking this before executing a query to see all posts saves bandwidth for del.icio.us and can help us determine whether our cached file needs updating. This is also the recommended practice (from del.icio.us).
This approach can help you grab all of your links (or all links for a specific tag) from del.icio.us. I’ve noted several issues, however:
- You can specify a tag to the
/posts/all command with ?tag=tagname, but you cannot specify a combination of tags to retrieve
- You cannot specify a tag to the
/posts/update command, so the update timestamp received is for your last overall update to del.icio.us—if specifying a tag to /posts/all, then it would be beneficial to specify a tag to this command, saving del.icio.us even more bandwidth
- This method requires HTTP authentication; you’ll notice how I passed a username and password through the URL to retrieve the data—you can retrieve only your links; whereas, using RSS, you may retrieve anyone’s links, but you are limited to their 30 most recent links
Finally, I have implemented this approach using my blogroll tag on del.icio.us. My OPML file is now generated nightly (if detecting updates to del.icio.us). This will end up saving me quite a bit of time, since I can use the del.icio.us plugin for Firefox to add any site I visit to my blogroll, and, then, I can import the generated OPML into my feed reader at my leisure, with little to no headache.
You can see my script, which is executed by a nightly cron job, here. You may notice that it’s using a getRSSLocation() function to auto-discover the RSS feed from each site for inclusion in the OPML file. I grabbed this function from Keith Deven’s site, and you can see my implementation of it here.
4 Comments »
Permalink
Tags: delicious, netnewswire, newsfire, opml, rss, xml
Thu, 4 May 2006 14:53 UTC
The other day, I came across Scott Johnson’s PHP OPML Reading List. Offering an OPML reading list for others to download is a great idea, and, since I’ve not yet blogged about it, I wanted to point out that I’ve been doing this for a long while now. On my home page, under the “syndicate” heading, is a link to my OPML blogroll. Feel free to import my OPML into your feed reader; that’s what it’s there for. (Please also note that I use SimpleXML to generate the blogroll on my home page from this list.)
There’s a lot of overlap between Scott’s and my list; however, I think both lists provide a good overview of some of the great PHP bloggers out there—and I know there are many more than are on these lists, as pointed out by Chris.
In other news, the PHP development team released PHP 5.1.3 earlier this week, and, shortly thereafter, a user reported a critical bug with data in the $_POST array when submitting from a multi-part form. As of right now, there is no official release update posted on the PHP downloads page, but Chris provides a link to download the 5.1.4 source from a mirror.
I’ve already compiled and updated from the new source, and I encourage you to do the same.
UPDATE (5/5/06 4:30 UTC): The PHP team has made an official announcement concerning the 5.1.4 release on their Web site and have updated the downloads page.
No Comments
Permalink
Tags: blogging, community, feed-reader, opml, php, xml
Wed, 17 Mar 2004 12:14 UTC
I was hunting around today for a good RSS reader, when I found something called Pluck. It sounded interesting enough, so I decided to check it out. Boasting claims of no adware/spyware, I thought, “Well, maybe it’s okay.” Still, claims or no claims, I am always wary of freeware. Nonetheless, I wanted to see what it could do and whether it was what I wanted. In short, it wasn’t. It was a plugin for Microsoft Internet Explorer. This planted another seed in my head. “What if,” thought I, “Mozilla has such an extension for Firefox?” So, I proceeded to Mozilla.org.
I went to the extensions page for Firefox, where I found an RSS Reader Panel extension. It works great for what I wanted. I have now placed my entire blogroll into the panel, which pulls the RSS links from any specified bookmark folder. It also provides a Feedster search bar, and it can import and export OPML files. I’m thinking about exporting my OPML files regularly and importing them into my blogroll on this site. That way, I can keep both lists in sync.
No Comments
Permalink
Tags: firefox, mozilla, opml, pluck, rss-reader, sage