Atom feed fixes:

* Added blog_url to configuration
* Feed title linked to blog_url
This commit is contained in:
Stefan Ritter 2009-03-24 20:41:48 +01:00
parent 6bfd0d4bde
commit acb6432d3c
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@ configuration = ConfigParser.ConfigParser()
configuration.read('configuration') configuration.read('configuration')
blog_title = configuration.get('personal', 'blog_title') blog_title = configuration.get('personal', 'blog_title')
blog_url = configuration.get('personal', 'blog_url')
keywords = configuration.get('personal', 'keywords') keywords = configuration.get('personal', 'keywords')
entries_dir = configuration.get('personal', 'entries_dir') entries_dir = configuration.get('personal', 'entries_dir')
entries_suffix = configuration.get('personal', 'entries_suffix') entries_suffix = configuration.get('personal', 'entries_suffix')
@ -126,7 +127,7 @@ if feed_display == "atom":
title_md5sum_5 = title_md5sum[20:32] title_md5sum_5 = title_md5sum[20:32]
print ' <title>' + title + '</title>' print ' <title>' + title + '</title>'
print ' <link href="http://www.thehappy.de/~xeno/"/>' print ' <link href="' + blog_url + "/>'
print ' <id>urn:uuid:' + title_md5sum_1 + '-' + title_md5sum_2 + '-' + title_md5sum_3 + '-' + title_md5sum_4 + '-' + title_md5sum_5 + '</id>' print ' <id>urn:uuid:' + title_md5sum_1 + '-' + title_md5sum_2 + '-' + title_md5sum_3 + '-' + title_md5sum_4 + '-' + title_md5sum_5 + '</id>'
print ' <updated>' + str(date[0]) + '-' + str(date[1]) + '-' + str(date[2]) + 'T' + str(date[3]) + ':' + str(date[4]) + ':' + str(date[5]) + 'Z</updated>' print ' <updated>' + str(date[0]) + '-' + str(date[1]) + '-' + str(date[2]) + 'T' + str(date[3]) + ':' + str(date[4]) + ':' + str(date[5]) + 'Z</updated>'
print ' </entry>' print ' </entry>'

View File

@ -1,5 +1,6 @@
[personal] [personal]
blog_title: A BlogThon Blog blog_title: A BlogThon Blog
blog_url: http://www.thehappy.de/
keywords: please,change,me keywords: please,change,me
entries_dir: entries/ entries_dir: entries/
entries_suffix: txt entries_suffix: txt