Ok, so now you know that RockBox allows me to use my Ipod like any other USB drive. But how do I manage my podcasts? Well, I’m glad you asked because the answer is the power of the command line.
Hpodder is a command line utility that can keep track of podcasts for you. To add a feed I tell it to hpodder add http://feed.xml and then run hpodder without arguments to download all the episodes. But how do I keep track of which ones I’ve listened to already? The obvious solution is to delete them once I’m done with them. The problem with that is that those deleted episodes will be downloaded the next time I run hpodder. The solution to that is easy. I simply run hpodder catchup after downloading new episodes, so that subsequent runs will only download the episodes I haven’t listened to yet.
So now the next (and trickiest) question is how to synchronize the files on the Ipod with those on the hard drive. Rsync did a great job of copying a mirror image of the hard drive files to the mp3 player. But then when I deleted an episode that I was finished with (on either the hard drive or the Ipod) rsync would put it back again. Luckily I found another tool that was able to do what I wanted: Unison.
Unison’s website explains that it “allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.” It took quite a bit of reading and experimenting before I found the magic combination of arguments to make it play nicely, quickly and silently with the Ipod’s fat32 file system. But once I got it all figured out, I wrote a quick shell script to automate everything:
hpodder
hpodder catchup
echo "Please plug in the ipod now, and hit enter to continue"
read
unison -batch -fastcheck true -pretendwin -perms 0 /home/daniel/audio/podcasts/ /media/ipod/audio/podcasts/
So after all that explaining, my podcast solution is extremely simple. After I’m done listening to an episode, I delete it. Then, when I run out of stuff to listen to I run the above script and I’m good to go again. I’ve been doing it this way for several weeks now, and I just can’t get over how uber convenient it is for me. It’s way better than what I was doing before. Another win for Linux and Open Source Software!