Cooking with Linux - Podcast on the Menu
Relax, François! I wasn't trying to scare you. I pulled your earphones out because it is nearly time for our guests to arrive, and I couldn't seem to get your attention any other way. What were you listening to anyhow? The New Scientist podcast? Very nice, mon ami. I did not realize that you were fascinated by science stories. I must admit, that particular podcast is one of my favorites as well. I regularly download several programs including that one. Sometimes I listen to them on the Linux system where I have downloaded them. Other times, I copy them to my handheld and take them on the road. Podcasts are a great diversion on trains or while sitting in waiting rooms. Best of all, there are tons of great programs out there, from pros and amateurs alike with topics covering pretty much anything you can think of.
Quoi? It takes a while, you say? You don't really manually download all your podcasts, do you? Right-click and Save As off the Web page? Really, François, there are much better ways to do this. Luckily, those helpful programs are the subject of tonight's menu. But for now, I see that our guests have arrived and we must attend to them immédiatement! Welcome, everyone, to Chez Marcel, home of fine wine, delectable Linux fare and, of course, the most excellent clientele. Please, allow me to help you to your tables. Make yourselves comfortable. François, to the wine cellar! Head to the north wing and bring back the 2002 New Zealand Pinot Noir, the Marlborough, please.
François and I were just discussing podcasts and the need for some way to download and collect them effectively. Chasing down podcasts, looking for new programs and downloading them can take a frightful amount of time. That's why podcast aggregators are such a great idea and why so many clients exist. Some graphical clients are rich and complex, like the wine—we'll look at one shortly. Others are much simpler. One of the simplest podcast aggregators I've seen, Linc Fessenden's BashPodder, is nothing more than a bash shell script and a tiny one at that. Head over to the BashPodder Web site (see the on-line Resources), and download the bashpodder.shell script and the parse_enclosure.xsl file. When you get the two, copy them into the folder of your choice. Then, have a look at the script. At less than 1K, you won't believe how simple it is.
Excellent, François. That was very fast. Please pour for our guests. Enjoy, mes amis.
A sample configuration file, bp.conf, is also available for download from the BashPodder site. The sample file includes some of Linc's favorite podcast feeds, so feel free to download it if you are curious as to his tastes, but the format is simple enough that you won't need it. bp.conf is simply a collection of feed links. For instance, here's a file with three feeds, one for the New Scientist podcast, Brian Ibbott's Coverville and the BBC's excellent In Our Time.
http://www.newscientist.com/podcastfeed.ns http://www.coverville.com/index.xml http://www.bbc.co.uk/radio4/history/inourtime/mp3/podcast.xml
I store this file in the same directory from which I run the bashpodder.shell script file:
The script creates a folder with the date of the run as its name (for example, 2006-01-04). BashPodder runs silently and downloads all of the current podcasts to that folder. Set the program to run in a cron job, and you will always be right up to date. Be warned, however, that BashPodder will download all of the current downloads for the particular feed. There's no picking and choosing.
Eskild Hustvedt's GoldenPod is also a command-line driven program that is simple to use and easy to set up in a cron job for unattended downloads. This one uses Perl instead of bash and adds some useful features that aren't present in the much simpler BashPodder. GoldenPod can run silently (with the -s command switch), but it also can report on its progress as it works. You can elect to download only the most recent podcast in a series rather than the entire collection (which can sometimes be huge). GoldenPod also can list available podcasts without downloading, copy files to a portable player, clean up old podcasts and provide statistics on how much space your podcasts are taking up. All this for less than 32K.
Get your copy of GoldenPod from the Web site (see Resources) and extract the tarball into the directory of your choice. If you simply run ./goldenpod from the folder in which you extracted it, the program will report that your podcast list is empty, but it also will create two new directories for you in your home folder. The first is called .goldenpod, which contains your configuration files and podcast list. The second is called Podcasts, and this is where your podcasts will be downloaded. In the ~/.goldenpod folder, there are two files: goldenpod.conf and podcasts.conf. The format of the podcasts.conf file—a text file that you can edit using your favorite editor—is the same as BashPodder's bp.conf file, essentially a list of podcast feed addresses.
Once you have added feeds, simply run the program again to start the download. You may want to try goldenpod --dry-run to see what you are in for or goldenpod -f to download only the latest. You then can see the progress of your downloads on your terminal (Figure 1).
When the download is done, you'll find m3u playlist files in each of the podcast directories corresponding to your feeds (for example, ~/Podcasts/catalog/showname/showname.m3u). Sure, it's all command line, but once again, this is a great program to run in a cron job, quietly in the background, perhaps while you sleep. From time to time, it is also a good idea to run the program with the --stats option to see how many programs you have and how much space they are taking up.
Of course, there are graphical podcast aggregators for Linux as well, which, by their nature, expand upon the feature sets of the two I've mentioned. The perfect podcast aggregator would, for starters, contain its own directory of podcasts, categorized into an easy-to-search list of topics. Complement that with an easy one-button system to add feeds, a new show scanning feature so you don't have to go looking for the latest shows and a system of automatic scheduled downloads running in the background, and you've got the makings of a great program. As it turns out, Scott Grayban's CastPodder does all those things. Your first step toward podcast Nirvana is to head over to the CastPodder Web site (see Resources) and download a copy of the latest program. There, you'll find packages for Mandriva and Debian, as well as tarred and gzipped source packages.
When you start CastPodder for the first time (command name: CastPodder), it creates a folder and subfolder called iPodderData/downloads in your home directory. You can override this default by selecting Preferences from the File menu. The CastPodder interface itself has the usual menu bar running along the top offering access to all the program's features. There are four main tabs labeled Downloads, Subscriptions, Podcast Directory and Cleanup. If it isn't already selected when you start, click the Podcast Directory tab, and you'll see a list of folders describing various directories and top podcast collections available. Before you go hunting for interesting shows, click the Refresh icon on the far left of the icon bar. That's the best way to make sure you are working from a recent list.
Now, let's get back to those podcast directories. Perhaps the most interesting here is the iPodder.org : Podcasting Central folder, because it contains the massive list of podcasts from iPodder.org. Click the small arrow next to the folder to list the categories, subcategories and, finally, all the various podcasts that correspond to that category. To subscribe to a podcast, click the title and then click the Add button. If the podcast you want isn't listed here, you can add it manually by clicking Tools on the menu bar and selecting Add a Feed. As you subscribe to various podcasts, subdirectories with the names of those podcasts will be created in ~/iPodderdata/downloads. For instance, I have folders called Coverville, New Scientist Podcast and Quirks and Quarks from CBC Radio among others. Each folder holds that particular show's podcasts, so make sure you have a lot of disk space.
Let's go back to the Subscriptions tab (Figure 3). A list of all the podcasts to which you have subscribed is in the top half of the main window. Click any of these shows, and the bottom pane lists the various episodes, the size of the show and its location on the Web. Look to the far left next to the episode title, and you'll see a check box. Click this box to flag the episode for download. If there is a little green arrow next to the episode title, that means it already has been downloaded to your Linux system.
Once you have selected the episodes you want, click the first button on the left of the icon bar, the one that says Scan for new Feeds when you pause your mouse cursor over it. The button will turn gray, and the download of your podcasts will begin. To see the progress of those downloads, click on the Downloads tab. You'll see the current state of the download, as well as the speed and percentage completed of the transfer (Figure 4).
Finally, we get to the whole point of finding and downloading all these shows, and that's listening to them. Take a look again at that little green arrow to the left of your downloaded episodes (this applies to both the Download and the Subscriptions tab). Either double-click the entry or right-click and select Play episode in media player from the pop-up menu. By default, XMMS will start to play the program you've chosen (Figure 5). It's possible to override this choice of player, but your choices are limited to XMMS, the Beep Media Player and no player at all. To make the change, click File on the menu bar and select Preferences. Then, in the Preferences window, click on the Player tab.
CastPodder swallows down into a nice, lemony applet in your system tray so that the program can keep running out of the way. This is particularly handy when you consider CastPodder's scheduling functionality. From the Subscriptions tab, click the Scheduler button on the icon bar to automate your podcast downloads. Automatic updates and downloads to subscribed feeds can be set to run at a specific time of day or at regular intervals throughout the course of the day. That way, you don't have to spend time checking up on new episodes. Just let CastPodder do the work for you.
It appears, mes amis, that closing time is almost upon us. Still, I should mention one final CastPodder feature before I finish and that has to do with cleaning up. Earlier on, I mentioned that it is good to have lots of free space if you get into the habit of downloading several podcasts. It is also a good idea to clean up those old shows as new ones continue to be downloaded. Click the Cleanup tab and CastPodder lets you select individual episodes by the podcast feed name and easily delete them. It is also possible to select them all with a single click should you want every episode deleted.
It is now closing time, but I see that many of you are in the middle of searching for and subscribing to many interesting programs in the podcastverse. Take a little more time, mes amis. I'm sure that François will be more than happy to refill your glasses one final time before before we say, “Au revoir”. Hmm...perhaps one of you can check to see if there are any podcasts dedicated to wine. On that note, please raise your glasses, mes amis, and let us all drink to one another's health. A votre santé Bon appétit!
Resources for this article: /article/8829.
Marcel Gagné is an award-winning writer living in Mississauga, Ontario. He is the author of Moving to Linux: Kiss The Blue Screen of Death Goodbye!, 2nd edition (ISBN 0-321-35640-3), his fourth book from Addison-Wesley. He also makes regular television appearances as Call for Help's Linux guy. Marcel is also a pilot, a past Top-40 disc jockey, writes science fiction and fantasy, and folds a mean Origami T-Rex. He can be reached via e-mail at firstname.lastname@example.org. You can discover lots of other things (including great Wine links) from his Web site at www.marcelgagne.com.
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal
- New Products
- Flexible Access Control with Squid Proxy
- Users, Permissions and Multitenant Sites
- Security in Three Ds: Detect, Decide and Deny
- High-Availability Storage with HA-LVM
- Tighten Up SSH
- DevOps: Everything You Need to Know
- Solving ODEs on Linux
- Non-Linux FOSS: MenuMeters
- diff -u: What's New in Kernel Development