Instant podcasts, in 50 lines of perl

I have a directory full of stuff that I've recorded off the radio. I'd like to listen to it on my phone on the way to work. And the most convenient way to do that is to create a podcast of that directory. That way, whenever I record more stuff, I just have to update the podcast and the files magically appear on my phone.

I am, of course, far too lazy to edit XML by hand, and I want something that will work in a terminal. I was surprised that I couldn't find anything like this. Well, I could. It was 1300 lines of PHP. I've not got anything against PHP, but 1300 lines of code for such a simple task? Really?

Here's my version. Tell it a source directory, a target directory, and the address of that directory in HTTP-land, and Bob's yer uncle.

5 Comments

Could you perhaps show us the 1300-line PHP version? :)

Here's my 140-line Ruby version :) It extracts mp3 EXIF to fill up iTunes metadata as well.
https://github.com/miyagawa/dircaster

Leave a comment

About David Cantrell

user-pic I'm in yur test resultz analyzn yr failz