Created
April 14, 2011 19:48
-
-
Save SEJeff/920328 to your computer and use it in GitHub Desktop.
Atom feed generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copied from the django source but added feed_url so the write actually works. | |
import sys | |
from django.utils import feedgenerator | |
feed = feedgenerator.Atom1Feed( | |
title=u"Poynter E-Media Tidbits", | |
link=u"http://www.poynter.org/column.asp?id=31", | |
feed_url=u"http://rss.feed_url/", | |
description=u"A group weblog by the sharpest minds in online media/journalism/publishing.", | |
language=u"en", | |
) | |
feed.add_item( | |
title="Hello", | |
link=u"http://www.holovaty.com/test/", | |
description="Testing." | |
) | |
feed.write(sys.stdout, 'utf-8') | |
print "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment