Skip to content

Instantly share code, notes, and snippets.

@piranha
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piranha/29f71cc3f7e7175b9dca to your computer and use it in GitHub Desktop.
Save piranha/29f71cc3f7e7175b9dca to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<!--
Convert podcast RSS to commands for curl.
Originally from bashpodder, modified by Alexander Solovyov.
Usage:
xsltproc podcast2wget.xsl path/to/podcast.rss
OR
curl -s url/to/podcast.rss | xsltproc podcast2wget.xsl
-->
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
<param name="quote">"</param>
<output method="text"/>
<template match="/">
<apply-templates select="/rss/channel/item"/>
</template>
<template match="item">
<text>curl </text>
<value-of select="$quote"/>
<value-of select="enclosure/@url"/>
<value-of select="$quote"/>
<text> -C - -o </text>
<value-of select="$quote"/>
<value-of select="title"/>
<text>.mp3</text>
<value-of select="$quote"/>
<text>&#10;</text>
</template>
</stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment