As I've begun ramping up my podcast production a bit, I've also started running into some error-prone tedium associated with getting all the files and their associated incantations updated and distributed to all the right places. To help matters, I put together some Python code that automates some of the process. By design, the code doesn't push anything live at this point--although it would be fairly straightforward to extend it to do so.
The script:
- Gets information such as duration from MP3 file
- Creates an XML file for insertion into an iTunes podcast feed
- Uploads previously-created MP3 and OGG files to Amazon S3
- Creates a draft blog post on Blogger with a label (tag)
Given my workflow, I still need to:
- Update master iTunes podcast feed XML file
- Upload edited file to S3
- Make the newly uploaded XML and MP3/OGG files public
- Make Blogger post public
That may sound like a bit of manual work, but these are pretty quick and straightforward steps relative to the actions taken by the script. For example, the script gets the file size of the MP3 file and calculates the duration, which are needed for the iTunes feed.
You'll need to install boto (https://github.com/boto/boto.git) for S3 access and mpeg1audio (https://github.com/Ciantic/mpeg1audio/) to extract the duration from the MP3 file. You'll also need to setup the appropriate accounts on Blogger and S3 and set a number of global variables before you can use the script.
No comments:
Post a Comment