del.icio.us API to Atom

Tuesday, Jul 15 2008, 13:00 EDT

This transform will produce an Atom feed from the XML returned by the del.icio.us API for requests to the resources in http://del.icio.us/api/posts/.

Please read the documentation over there for how to request your coveted data from the service. For experimenting, you can get by with something like

wget http://username:password@del.icio.us/api/posts/all -O - \
| xsltproc delicious-atom.xslt -

Here’s some sample output (I’ll put some pretty-printing in here when I can be bothered):

delicious.xml:
<?xml version='1.0' standalone='yes'?>
<posts update="2005-11-11T04:13:36Z" user="ap">
  <post href="http://www.xml.com/pub/a/2004/06/16/dive.html" description="The Atom Link Model" extended="This article explores several of the most common link types that are already deployed in Atom feeds today." hash="853d2a735f7f0ebd0ea4e7ab1027d787" tag="xml syndication atom" time="2005-02-22T12:14:34Z" />
  <post href="http://diveintomark.org/archives/2004/05/27/howto-atom-linkblog" description="How to make a linkblog in Atom" hash="94355ada26fa936b67f57ba52f320e99" tag="syndication atom" time="2005-02-22T12:12:58Z" />
</posts>
Output:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>del.icio.us links for ap</title><id>http://del.icio.us/ap</id><link href="http://del.icio.us/ap"/><updated>2005-11-11T04:13:36Z</updated><author><name>ap</name><uri>http://del.icio.us/ap</uri></author>
<entry><title>The Atom Link Model</title><summary>This article explores several of the most common link types that are already deployed in Atom feeds today.</summary><link href="http://www.xml.com/pub/a/2004/06/16/dive.html"/><link rel="related" href="http://del.icio.us/url/853d2a735f7f0ebd0ea4e7ab1027d787"/><id>http://del.icio.us/url/853d2a735f7f0ebd0ea4e7ab1027d787</id><updated>2005-02-22T12:14:34Z</updated><category scheme="http://del.icio.us/ap/" term="xml"/><category scheme="http://del.icio.us/ap/" term="syndication"/><category scheme="http://del.icio.us/ap/" term="atom"/></entry>
<entry><title>How to make a linkblog in Atom</title><link href="http://diveintomark.org/archives/2004/05/27/howto-atom-linkblog"/><link rel="related" href="http://del.icio.us/url/94355ada26fa936b67f57ba52f320e99"/><id>http://del.icio.us/url/94355ada26fa936b67f57ba52f320e99</id><updated>2005-02-22T12:12:58Z</updated><category scheme="http://del.icio.us/ap/" term="syndication"/><category scheme="http://del.icio.us/ap/" term="atom"/></entry>
</feed>