Enjoying Podcasts on Linux

Discover how to use bashpodder as a podcatching client.

Last month’s “Tech Support” column described how to use gtkpod to connect your iPod to Linux. The column also mentioned podcasting, evidently a new concept for many, given the number of questions that have poured in during the past month. So, this time around, let’s dive into podcasting with the Penguin.

Podcasting is a method of distributing audio or video files automatically. Say that you produce your own Linux radio show and want to feed the show to your listening audience whenever a new episode becomes available. Simply create an RSS feed with an enclosure tag that points to the new episode — that’s called a podcast.

Podcasting, although named after the iPod, is certainly not limited to Apple’s popular player. You can use any MP3 player or your computer to listen to podcasts. You use a podcatcher or aggregator to check the RSS feed on a regular basis and automatically download any new media files.

While there are a variety of podcatchers available for Linux, the one recommended most often is bashpodder. bashpodder is a small and fast script that keeps things extremely simple. Licensed under the GPL, bashpodder was written by Linc and is available from http://linc.homeunix.org: 8080/scripts/bashpodder/. The only requirements for bashpodder are bash, wget, and sed, which are staples of virtually every Linux distribution (and are readily available on Mac OS X, Solaris, AIX, and probably almost every other Unix variant on the planet).

The is no configure or make install process for bashpodder, as it’s only a shell script. Just download the bashpodder script, the XSL style sheet, and a configuration file into the directory that you’d like to run bashpodder from. The instructions are shown in Figure One.

FIGURE ONE: bashpodder requires three pieces: the script, an XSL style sheet, and a configuration file

$ cd $HOME/bin
$ wget http://linc.homeunix.org:8080/scripts/bashpodder/bashpodder.shell
$ wget http://linc.homeunix.org:8080/scripts/bashpodder/parse_enclosure.xsl
$ wget http://linc.homeunix.org:8080/scripts/bashpodder/bp.conf

Next, make sure that the bashpodder script is executable. Run chmod 755 bashpodder.shell. Finally, edit the bp.conf file. bp.conf is a list of podcast RSS feeds that you’d like to subscribe to, one per line. The default configuration file comes with some of Linc’s favorites, but you can modify and extend to taste. If you’re interested in hearing about Linux (in addition to reading about it), consider one or more of the Linux-related podcasts.” The Linux Link Tech Show”, available from http://thelinuxlink.net/tllts/tllts.rss, is produced by members of the Lehigh Valley Linux User Group, which includes bashpodder author Linc.” LQ Radio”, podcasting from http://radio.linuxquestions.org/syndicate/lq.php, includes both the” LQ Podcast” and the” LQ Radio Show.” LugRadio is a biweekly British radio show that takes a relaxed, humorous look at Linux and open source. Tune in to http://www.lugradio.org/episodes.rss. (A quick search on Google yields many, many more Linux podcasts and podcasts on hundreds of other topics.)

Now that you have your configuration file loaded with the podcasts you’d like to listen to, run bashpodder. Change to the bashpodder directory and type $./bashpodder.shell.

If you get a No such file or directory error the first time you run the script, ignore it, as it’s perfectly normal. The first run of the script may take a while to complete, as bashpodder downloads all of the shows in each feed. During subsequent runs, only new shows are downloaded, hastening the experience.

Once you’ve verified that the bashpodder script runs properly, you can add it to your crontab to get updates in the middle of the night:

02 00 * * * cd /path/to/bashpodder && ./bashpodder.shell

(Change /path/to/bashpodder to the directory where you installed bashpodder.) This crontab entry runs every night at 2 AM and automatically download new podcasts in a new directory (formatted as YYYY-MM-DD).

Because the script is so simple and easy to understand, it’s received a large number of user-contributed patches that either modify or extend its operation. Visit http://linc.homeunix.org: 8080/scripts/bashpodder/user_contributed/ to see if any of these modifications suit your needs. Someone has even written a graphical user interface (GUI) front-end for bashpodder using Xdialog. If a bashpodder GUI interests you, head over to http://linc.homeunix.org: 8080/scripts/bashpodder/gui/ for the download and step-by-step installation instructions.

The world of podcasting gives you a large catalog of quality and gratis audio programming. bashpodder makes subscribing to this content simple and automated. Using bashpodder is easy; more difficult is sampling the many shows that are available, choosing the ones you prefer, and setting aside enough time to listen to them all. But that’s a good problem to have. Enjoy.

Jeremy Garcia is the founder and administrator of the newly redesigned LinuxQuestions.org, a free, friendly, and active Linux community. Please send questions and feedback to class="emailaddress">jeremy@linuxquestions.org.

Comments are closed.