Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: RSS feed creation?

7 views
Skip to first unread message

Stefan Behnel

unread,
Nov 7, 2011, 2:22:37 AM11/7/11
to pytho...@python.org
Dan Stromberg, 06.11.2011 21:00:
> Is there an opensource Python tool for creating RSS feeds, that doesn't
> require large dependencies?
>
> I found feedformatter.py on pypi, but it seems a little old, and its sole
> automated test gives a traceback.
>
> Is there a better starting point?
>
> (I'd of course prefer something that'll run on 3.x and 2.x, but will settle
> for either)

I'd just go with ElementTree and builder.py.

http://effbot.org/zone/element-builder.htm

http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/builder.py

Building an RSS-API on top of that is so trivial that it's not worth any
further dependencies anyway. Not sure if this version of builder.py runs in
Py3, but it certainly won't be hard to fix even if it doesn't currently.

Stefan

Stefan Behnel

unread,
Nov 7, 2011, 3:24:59 AM11/7/11
to pytho...@python.org
Stefan Behnel, 07.11.2011 08:22:
> Dan Stromberg, 06.11.2011 21:00:
>> Is there an opensource Python tool for creating RSS feeds, that doesn't
>> require large dependencies?
>>
>> I found feedformatter.py on pypi, but it seems a little old, and its sole
>> automated test gives a traceback.
>>
>> Is there a better starting point?
>>
>> (I'd of course prefer something that'll run on 3.x and 2.x, but will settle
>> for either)
>
> I'd just go with ElementTree and builder.py.
>
> http://effbot.org/zone/element-builder.htm
>
> http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/builder.py

Hmm, interesting, that last link doesn't seem to work for me anymore.
Here's a copy, however:

http://svn.effbot.org/public/stuff/sandbox/elementlib/builder.py

There's also an extended version for lxml.etree:

https://raw.github.com/lxml/lxml/master/src/lxml/builder.py

You'll quickly see if it works as expected with plain ET when you use it.
It should in general.

Adam Tauno Williams

unread,
Nov 7, 2011, 11:54:52 AM11/7/11
to pytho...@python.org
On Mon, 2011-11-07 at 08:22 +0100, Stefan Behnel wrote:
> Dan Stromberg, 06.11.2011 21:00:
> > Is there an opensource Python tool for creating RSS feeds, that doesn't
> > require large dependencies?
> > I found feedformatter.py on pypi, but it seems a little old, and its sole
> > automated test gives a traceback.
> > Is there a better starting point?
> > (I'd of course prefer something that'll run on 3.x and 2.x, but will settle
> > for either)
> I'd just go with ElementTree and builder.py.
> http://effbot.org/zone/element-builder.htm

+1
<http://docs.python.org/library/xml.etree.elementtree.html>

RSS is just XML, just use the XML toolchain.

And use <http://validator.w3.org/feed/#validate_by_input> to check what
you create.

0 new messages