Atom is now valid

This commit is contained in:
Stefan Ritter 2009-04-08 21:50:54 +02:00
parent 117a6de1d1
commit 568719f945

View File

@ -109,21 +109,22 @@ if feed_display == "atom":
blog_title_md5sum = generate_uuid(blog_title) blog_title_md5sum = generate_uuid(blog_title)
title_md5sum = generate_uuid(title) title_md5sum = generate_uuid(title)
print 'Content-type: text/html\n' print 'Content-type: application/atom+xml\n'
print '<?xml version="1.0" encoding="utf-8"?>' print '<?xml version="1.0" encoding="utf-8"?>'
print '<feed xmlns="http://www.w3.org/2005/Atom">' print '<feed xmlns="http://www.w3.org/2005/Atom">'
print '<link href="' + blog_url + '/?feed=atom" rel="self" type="application/atom+xml"/>'
print ' <author>' print ' <author>'
print ' <name>' + blog_title + '</name>' print ' <name>' + blog_title + '</name>'
print ' </author>' print ' </author>'
print ' <title>' + blog_title + '</title>' print ' <title>' + blog_title + '</title>'
print ' <id>urn:uuid:' + blog_title_md5sum + '</id>' print ' <id>urn:uuid:' + blog_title_md5sum + '</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]) + '-0' + str(date[1]) + '-' + str(date[2]) + 'T' + str(date[3]) + ':' + str(date[4]) + ':' + str(date[5]) + 'Z</updated>'
print '' print ''
print ' <entry>' print ' <entry>'
print ' <title>' + title + '</title>' print ' <title>' + title + '</title>'
print ' <link href="' + blog_url + '/?p=' + title + '"/>' print ' <link href="' + blog_url + '"/>'
print ' <id>urn:uuid:' + title_md5sum + '</id>' print ' <id>urn:uuid:' + title_md5sum + '</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]) + '-0' + str(date[1]) + '-' + str(date[2]) + 'T' + str(date[3]) + ':' + str(date[4]) + ':' + str(date[5]) + 'Z</updated>'
print ' </entry>' print ' </entry>'
print '</feed>' print '</feed>'