On Oct 18, 2005, at 11:22 AM, Ed Howland wrote:
Robert Citek wrote:
Final version:
http://www.cwelug.org/cgi-bin/wiki.cgi?Rubypodder#bashpodder2
Added a bit of error checking and simplified the logging.
"The bash-fu is strong with this one".
-- D. Vader, 1977.
And it is easier to read as well. Nice job.
You're too kind. And thanks for the rubypodder code. However, I
think I might need to understand a bit more about xml. So I looked
at the original bashpodder.shell script and noticed that it used
xsltproc. So I created a stripped-down version of the original
script to extract the url names from one podcast rss:
#!/bin/bash
{ cat<<"eof"
<?xml version="1.0"?>
<stylesheet version="1.0"
xmlns="http://www.w3.org/1999/XSL/Transform">
<output method="text"/>
<template match="/">
<apply-templates select="/rss/channel/item/enclosure"/>
</template>
<template match="enclosure">
<value-of select="@url"/><text> </text>
</template>
</stylesheet>
eof
} > parse_enclosure.xsl
wget -q http://radio.weblogs.com/0142912/categories/bluegrassexpress/
rss.xml -O - |
xsltproc parse_enclosure.xsl -
Now I've got an excuse to learn xsl, too. :) I figure I'll take the
above script and convert it to ruby. That should be good practice.
Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software. Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent
_______________________________________________
CWE-LUG mailing list
[email protected]
http://www.cwelug.org/
http://www.cwelug.org/archives/
http://www.cwelug.org/mailinglist/