Create a podcast from a directory
I chose a really simple implementation, a python program that re-cursed the directory where the media files are stored and created an RSS xml file based on the content.
It only implements the base RSS specification, there are a number of tags for providing additional meta data, particularly for use with iTunes, but for my purposes this wasn't required. For more information about the RSS standard and podcasts see http://www.podcast411.com/howto_1.html.
I also chose to output the xml as strings rather than using an XML parser, simply because it seemed like a significant overhead (mainly in terms of learning how) just to output a simple structure.
This script has only been tested for my requirements and its not really designed to have a tremendous amount of re-use, but feel free to adapt it to your needs.
Python script - createRSSFeed.py
The script expects 2 parameters:
- The path where the media files are stored
- The path of the output rss file
Update - I came across some problems when there was escape characters in the xml, so had to write a function to encode text to make it xml safe.
Update - Dan Goff sent me on a modified version of this program which uses the mutagen library to include data from ID3 tags in mp3 files