December
2006
Podcast Script
I do like to play around with things you know and even though wordpress allows me to create enclosures for my podcasts, I wanted to actually create my own podcast PHP scripts. This kind of stuff is fun!
For sometime now I’ve been working on a little project I’m calling podcreate, which is basically a set of quick and dirty scripts which actually get the job done very well indeed. The main aim is to loop around a directory looking for mp3 files, well in fact media files in general and build an array of items, which I can use to build RSS feeds with enclosure tags which hold information about the type and size of file and so on and can be used in podcatching software to automatically download those files. I cheated, the date of the podcast comes directly from the file name so there is a limitation on a file structure and that’s my excuse for not building ID3 tag reading in, which I know about.
The link below isn’t to my main podcast feed, because wordpress handles that for me:
Podcreate came about due to a couple of reasons, firstly a website which hosted audio downloads didn’t offer any podcast feeds, there was another site which didn’t offer any rss feeds at all so I set about screen scraping those sites and creating my own feeds, thus parsing their HTML and turning it into my XML, within the limits that has the scripts work well until the web master of one of those sites gets inconsistent with file names. Secondly I was recording episodes of Home and Away for one of my best friends on my PVR and I thought, hmm why not vidcast these episodes to him, save me buying some DVDs?
I have lots of fun doing stuff like this, take radioripper for example, which is a screen scraping script which will take a URL from the BBC listen again archives and produce some mplayer scripts for me, that will download a BBC radio show and transcode it to mp3. I love it!