Setting up peapod – a pod catcher

Just to get used to stuff, I first “installed” peapod, a quite neat command line driven pod catcher. Get the application from http://www.peapodpy.org.uk/.

Note that this installation is done on linux! Windows users may be able to do the same thing, but to be honest I haven’t tried. My linux boxes run 24×7, whereas my windows machines are either doing something different or need to go to bed early.

My installation was essentially

wget http://peapodpy.org.uk/downloads/peapod-latest.tar.gz
unzip peapod* /usr/local/bin
ln -s /usr/local/lib/peapod-0.5/peapod.py /usr/local/bin/peapod

Note that the version number may differ. As of today it’s 0.7.2.

The last line to be able to run peapod without remembering where you put it.

If nothing else, at least easy to change afterwards.

Configuration

Read up on the very sparse document on configuration. Essentially you get a default config in ~/.peapod/peapod.xml after you run peapod the first time.

I changed mine to look like

<?xml version=‘1.0′ encoding=‘UTF-8′?>
<peapod>
<options>
<savedir>~/podcasts</savedir>
<verbose>true</verbose>
<max_threads>3</max_threads>
<savestyle>date</savestyle>
<maxfetch>3</maxfetch>
</options>

<feed>
<title>LugRadio</title>
<url>http://www.lugradio.org/episodes.rss</url>
</feed>
</peapod>

I’m not all that interested in LugRadio, but let’s leave it at that for the moment.

This will put all your desired radio shows in your home directory in a sub directory named podcasts.Under that directory there will be sub directories with date names. That is very nice when you move everything onto an mp3-player that playes sequentially and keeps a current position.

I personally believe I need to pull stuff often, so I want a cron job executed hourly. Either you link a script into /etc/cron.hourly. or you configure the same thing via webmin and have it run as your user – not as root!.

The script I run looks like this:

#!/bin/bash
/usr/local/bin/peapod
cd ~
# Delete dir older than 6 days (that should ensure they are empty)
dirs=`find ~/podcasts -mindepth 1 -type d -ctime +6`
if [ -n "${dirs}" ]; then
        echo Deleting ${dirs}
        rm -r ${dirs}
fi

This script invokes peapod to download all your casts, then finds all directories older than 6 days under ~/podcasts that are older than 6 days and clears them out. You will this have a 6 day rolling window of casts. Change that to suit your needs.

More to follow on both what radio shows to download and how to move the stuff onto your player.

–Jesper

  • Share/Bookmark

Leave a comment

Your comment