diff options
author | Magnus Hagander | 2008-11-03 14:21:31 +0000 |
---|---|---|
committer | Magnus Hagander | 2008-11-03 14:21:31 +0000 |
commit | 9ab5977ef92388ce5371306583199d59dc94461e (patch) | |
tree | 6975d533db84199937c4261b73a222d93b84ee62 /planet/generator.py | |
parent | b303aadba57c7b6e6710dad6e20b47dd644a06f4 (diff) |
Include full text of all feeds in the RSS feed.
Create second RSS feed that contains the truncated entries,
like the one before.
git-svn-id: file:///Users/dpage/pgweb/svn-repo/trunk@2260 8f5c7a92-453e-0410-a47f-ad33c8a6b003
Diffstat (limited to 'planet/generator.py')
-rwxr-xr-x | planet/generator.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/planet/generator.py b/planet/generator.py index a895d2bb..0e46d3c2 100755 --- a/planet/generator.py +++ b/planet/generator.py @@ -48,6 +48,12 @@ class Generator: description = 'Planet PostgreSQL', generator = 'Planet PostgreSQL', lastBuildDate = datetime.datetime.utcnow()) + rssshort = PyRSS2Gen.RSS2( + title = 'Planet PostgreSQL (short)', + link = 'http://planet.postgresql.org', + description = 'Planet PostgreSQL (short)', + generator = 'Planet PostgreSQL', + lastBuildDate = datetime.datetime.utcnow()) psycopg2.extensions.register_type(psycopg2.extensions.UNICODE) self.db.set_client_encoding('UTF8') @@ -61,6 +67,12 @@ class Generator: link=post[1], guid=PyRSS2Gen.Guid(post[0],post[7]), pubDate=post[2], + description=post[4])) + rssshort.items.append(PyRSS2Gen.RSSItem( + title=post[5] + ': ' + post[3], + link=post[1], + guid=PyRSS2Gen.Guid(post[0],post[7]), + pubDate=post[2], description=desc)) self.items.append(PlanetPost(post[0], post[1], post[2], post[3], post[5], post[6], desc)) @@ -69,6 +81,7 @@ class Generator: self.feeds.append(PlanetFeed(feed[0], feed[1], feed[2])) rss.write_xml(open("www/rss20.xml","w"), encoding='utf-8') + rssshort.write_xml(open("www/rss20_short.xml","w"), encoding='utf-8') self.WriteFromTemplate('index.tmpl', 'www/index.html') for staticfile in self.staticfiles: |