Feb 9, 2011, 9:45 AM
Post #1 of 1
Advice Needed for New Project Perl Podcast Manager
I'm posting I'm basically here to get some advice on modules to use and general project design for a little Perl podcast downloader I'm planning to write.
I'm posing in the beginner's section because I don't think my experience (and certainly my recent experience) is quite up to spec for the intermediate forum. Although a while back I did write a little gtk app using Perl and somewhat fell for the language (http://mikeysfog.wikispaces.com/XGamer).
The podcast downloader I'm hoping to write is loosely inspired by PerlPodder (http://sourceforge.net/projects/perlpodder/). I've gone through the code for PerlPodder and in my limited experience it seems rather sloppy and certainly isn't very effective for the kind of use I have in mind (just a simple no fuss podcast downloader).
I'm an Xfce Linux user so I'm thinking of using GTK to make a status icon with a menu that get populated with the last X days (say 2 weeks) of podcasts, ordered into menu items for each podcast station and with a sub menu for each program in that station.
The Naked Scientist > The Naked Scientists 11.02.06 - Low Energy High Power Processing
The Naked Astronomer The Naked Scientists 11.01.30 - Leprosy: The Low Down
The Infinite Monkey Cage The Naked Scientists 11.01.23 - Analysing Antimatter
The Naked Scientists 11.01.16 - Do Metal Spinal Implants Lure Lightning
Now I want to keep the construction of this as simple as possible so I'm not wanting to manage massive quantities of data on the downloaded files. So I was thinking of just downloading the RSS using XML::RAI and using XML::RAI::Enclosure to get the links to the url's, and managing which files have been downloaded against their file name ordered into folders with the name of the podcast. And for the title and description of the actual episodes I was thinking of storing it in the tags of the file itself. This is potentially a little tricky as I don't know for sure what file type I'm going to be getting and I don't know what modules would be best for storing info into the tags or which tags to use - say for mp3 would the description go into the 'comments' tag and the 'title' into title, and the Podcast's name into 'artist'?
I'm not entirely sure how the flow of control works in Perl within a GTK application either. If I create my GTK status icon with right click menu can I assume that any calls to functions will have their own process so the app can then continue idling checking for new podcasts, or will that just result in an unresponsive application?
Well, I would love to know what you think and if you've any suggestions.