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 | |
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
-rwxr-xr-x | planet/generator.py | 13 | ||||
-rw-r--r-- | planet/template/index.tmpl | 3 |
2 files changed, 15 insertions, 1 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: diff --git a/planet/template/index.tmpl b/planet/template/index.tmpl index 3d80283e..a9da1fd1 100644 --- a/planet/template/index.tmpl +++ b/planet/template/index.tmpl @@ -9,7 +9,8 @@ </ul> <div class="planetRightTitle">Feeds</div> <ul> - <li><a href="rss20.xml"><img src="img/feed-icon-14x14.png" alt="rss" /></a> <a href="rss20.xml">Planet PostgreSQL</a></li> + <li><a href="rss20.xml"><img src="img/feed-icon-14x14.png" alt="rss" /></a> <a href="rss20.xml">All feeds (full entries)</a></li> + <li><a href="rss20_short.xml"><img src="img/feed-icon-14x14.png" alt="rss" /></a> <a href="rss20_short.xml">All feeds (short entries)</a></li> </ul> <div class="planetRightTitle">Planet</div> <p><a href="policy.html">Policy</a> for being listed on Planet PostgreSQL</p> |