From 0a370285a1b0baa8dc656f6c0ab69af559ca0c09 Mon Sep 17 00:00:00 2001 From: Jon Schneider Date: Mon, 14 Aug 2023 18:26:08 -0400 Subject: [PATCH] Improves post date formatting --- generate-ebooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate-ebooks.py b/generate-ebooks.py index 3695eb0..30a0278 100755 --- a/generate-ebooks.py +++ b/generate-ebooks.py @@ -13,6 +13,7 @@ from PIL import Image, ImageFile import time from datetime import date +from dateutil.parser import parser # Cached data (RSS feed XML) CACHED_DATA = os.path.join(os.path.dirname(__file__), ".cached") @@ -282,7 +283,7 @@ def createBookData(posts): '\n' + \ '

' + post.title.decode('utf-8') + "

\n" + \ '

By ' + post.author.decode('utf-8') + "

\n" + \ - '

' + post.date.decode('utf-8') + "

\n" + \ + '

' + parser().parse(post.date.decode('utf-8')).strftime("%A %B %-d, %Y") + "

\n" + \ text + \ '' + \ '')