Skip to content

Instantly share code, notes, and snippets.

@SEJeff
Created April 14, 2011 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SEJeff/920328 to your computer and use it in GitHub Desktop.
Save SEJeff/920328 to your computer and use it in GitHub Desktop.
Atom feed generator
# 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