Browse files

even better

  • Loading branch information...
1 parent bb936ea commit fddd05d5a5e0fe1ba595c1f4aa06cbfbf4195aa8 Ivo van Doesburg committed Feb 8, 2011
Showing with 6 additions and 4 deletions.
  1. +3 −3 lastfm2txt.xsl
  2. +3 −1 weekly.sh
View
6 lastfm2txt.xsl
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
- <xsl:template match="track"><xsl:value-of select="artist"/> - <xsl:value-of select="name"/>
- </xsl:template>
+<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
+<xsl:template match="track"><xsl:value-of select="artist"/><xsl:text> </xsl:text><xsl:value-of select="name"/>
+</xsl:template>
</xsl:stylesheet>
View
4 weekly.sh
@@ -1,2 +1,4 @@
#!/bin/sh
-curl http://ws.audioscrobbler.com/2.0/user/quarkness/weeklytrackchart.xml | xsltproc lastfm2csv.xsl -
+
+curl http://ws.audioscrobbler.com/2.0/user/$1/weeklytrackchart.xml | xsltproc lastfm2txt.xsl - >weeklytrackchart.$1.txt
+

0 comments on commit fddd05d

Please sign in to comment.