Fixed stuff

This commit is contained in:
Thomas Baruchel 2022-11-05 15:33:01 +01:00
parent b09626dc20
commit 52426bf0ab
2 changed files with 6 additions and 3 deletions

View File

@ -2,12 +2,13 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://git.sdf.org/baruchel/feeds/raw/branch/master/src/blog.rst</id>
<title>Th. Baruchel's personal Atom feed</title>
<subtitle>Thomas Baruchel's casual blog concerning Computer Science</subtitle>
<author>
<name>Thomas Baruchel</name>
<email>baruchel@sdf.org</email>
</author>
<rights>CC BY-SA 4.0</rights>
<updated>2022-11-05T15:24:47.592152</updated>
<updated>2022-11-05T15:32:51</updated>
<link href="https://git.sdf.org/baruchel/feeds/raw/branch/master/src/blog.rst" />
<link href="https://git.sdf.org/baruchel/feeds/raw/branch/master/atom/blog.xml" rel="self" />
<generator uri="https://git.sdf.org/baruchel/feeds/src/branch/master/rst2atom.py">rst2atom</generator>

View File

@ -60,7 +60,7 @@ def find_date(d):
for k in c.extract().split(" "):
try:
t = dateutil.parser.parse(k)
return t.isoformat()
return t.isoformat(timespec='seconds')
except dateutil.parser.ParserError:
pass
raise dateutil.parser.ParserError
@ -101,6 +101,7 @@ print("""<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>%s</id>
<title>%s</title>
<subtitle>%s</subtitle>
<author>
<name>%s</name>
<email>%s</email>
@ -113,10 +114,11 @@ print("""<?xml version="1.0" encoding="utf-8"?>
""" % (
meta["original-source"],
html["title"],
meta["description"],
docinfos["Author:"],
docinfos["Contact:"],
meta["copyright"],
datetime.datetime.now().isoformat(),
datetime.datetime.now().isoformat(timespec='seconds'),
meta["original-source"],
meta["syndication-source"],
generator_uri, generator_name