Note: This document is in the process of being rewritten.
This module can be used to generate podcast feeds in RSS format.
It is licensed under the terms of both, the FreeBSD license and the LGPLv3+. Choose the one which is more convenient for you. For more details have a look at license.bsd and license.lgpl.
More details about the project:
- Repository: https://github.com/lkiesow/python-feedgen
- Documentation: http://lkiesow.github.io/python-feedgen/
- Python Package Index: https://pypi.python.org/pypi/feedgen/
Currently, you'll need to clone this repository, and create a virtualenv and install lxml and dateutils.
To create a feed simply instantiate the Podcast class and insert some data::
>>> from feedgen.feed import Podcast
>>> fg = Podcast()
>>> fg.name('Some Testfeed')
>>> fg.author( {'name':'John Doe','email':'[email protected]'} )
>>> fg.website( href='http://example.com', rel='alternate' )
>>> fg.image('http://ex.com/logo.jpg')
>>> fg.description('This is a cool feed!')
>>> fg.website( href='http://larskiesow.de/test.atom')
>>> fg.language('en')
Note that for the methods which set fields that can occur more than once in a feed you can use all of the following ways to provide data:
- Provide the data for that element as keyword arguments
- Provide the data for that element as dictionary
- Provide a list of dictionaries with the data for several elements
Example::
>>> fg.contributor( name='John Doe', email='[email protected]' )
>>> fg.contributor({'name':'John Doe', 'email':'[email protected]'})
>>> fg.contributor([{'name':'John Doe', 'email':'[email protected]'}, ...])
- We do not follow the RSS recommendation to encode &, < and > using
hexadecimal character reference (eg.
<
), simply because lxml provides no documentation on how to do that when using the text property.