Last active
August 29, 2015 14:14
-
-
Save piranha/29f71cc3f7e7175b9dca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> </text> | |
</template> | |
</stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment