Skip to content

Instantly share code, notes, and snippets.

@psd
Created December 17, 2010 15:31
Show Gist options
  • Save psd/745113 to your computer and use it in GitHub Desktop.
Save psd/745113 to your computer and use it in GitHub Desktop.
XSLT to convert a delicious XML export into a TiddlyWiki
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<!--
translate delicious export XML into a codeless TiddlyWiki XHTML
this may be then imported into a TiddlyWiki / TiddlySpace
-->
<xsl:template match="/">
<xhtml>
<body>
<div id="storeArea">
<xsl:apply-templates select="//post"/>
</div>
</body>
</xhtml>
</xsl:template>
<xsl:template match="post">
<xsl:variable name="time"><xsl:value-of select="translate(@time, '-:ZT ', '')"/></xsl:variable>
<div modifier="delicious" title="{@description}" url="{@href}" created="{$time}" tags="{@tag}">
<xsl:if test="@shared">
<xsl:attribute name="shared"><xsl:value-of select="@shared"/></xsl:attribute>
</xsl:if>
<pre><xsl:value-of select="@extended"/></pre>
</div>
</xsl:template>
</xsl:stylesheet>
@psd
Copy link
Author

psd commented Dec 22, 2010

curl api.del.icio.us/v1/posts/all -u user:pass > delicious.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment