From 52426bf0abbe91097d0fedc7858f843840981666 Mon Sep 17 00:00:00 2001 From: Thomas Baruchel Date: Sat, 5 Nov 2022 15:33:01 +0100 Subject: [PATCH] Fixed stuff --- atom/blog.xml | 3 ++- rst2atom.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/atom/blog.xml b/atom/blog.xml index c97ed81..547b821 100644 --- a/atom/blog.xml +++ b/atom/blog.xml @@ -2,12 +2,13 @@ https://git.sdf.org/baruchel/feeds/raw/branch/master/src/blog.rst Th. Baruchel's personal Atom feed + Thomas Baruchel's casual blog concerning Computer Science Thomas Baruchel baruchel@sdf.org CC BY-SA 4.0 - 2022-11-05T15:24:47.592152 + 2022-11-05T15:32:51 rst2atom diff --git a/rst2atom.py b/rst2atom.py index 655d5d1..8342c13 100644 --- a/rst2atom.py +++ b/rst2atom.py @@ -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(""" %s %s + %s %s %s @@ -113,10 +114,11 @@ print(""" """ % ( 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