Skip to content

Commit

Permalink
Improves post date formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-Schneider committed Aug 14, 2023
1 parent 1f2062e commit 0a37028
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generate-ebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -282,7 +283,7 @@ def createBookData(posts):
'<body>\n' + \
'<h1 class="chapter">' + post.title.decode('utf-8') + "</h1>\n" + \
'<h3>By ' + post.author.decode('utf-8') + "</h3>\n" + \
'<h4> ' + post.date.decode('utf-8') + "</h4>\n" + \
'<h4> ' + parser().parse(post.date.decode('utf-8')).strftime("%A %B %-d, %Y") + "</h4>\n" + \
text + \
'</body>' + \
'</html>')
Expand Down

0 comments on commit 0a37028

Please sign in to comment.