views:

1531

answers:

4

Hi,

I'd like to parse rss feeds and download podcasts on my ReadyNas which is running 24/7 anyway.

So I'm thinking about having a shell script checking periodically the feeds and spawning wget to download the files.

What is the best way to do the parsing?

Thanks!

+1  A: 

I read about XMLStartlet here and there

But is there a port to ReadyNas NV+ available?

Oli
+2  A: 

Do you have access to awk? Maybe you could use XMLGawk

cddr
A: 

You can use xsltproc from libxml2 and write a simple xsl stylesheet that parses the rss and outputs a list of links.

rjack
+4  A: 

Sometimes a simple one liner with shell standard commands can be enough for this:

 wget -q -O- "http://www.rss-specifications.com/rss-podcast.xml" | grep -o '<enclosure url="[^"]*' | grep -o '[^"]*$' | xargs wget -c

Sure this does not work in any case, but it's often good enough.