From 0729fb76b52dcdaaf6d9b7f4dd60bc0099f067c3 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Mon, 21 Feb 2022 21:22:10 +0100 Subject: [wip] Add CDATA Doesn't work yet, the tags get escaped. Maybe lxml has a simpler API? --- build-concerts.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'build-concerts.py') diff --git a/build-concerts.py b/build-concerts.py index 0e5a70b..4f55f12 100755 --- a/build-concerts.py +++ b/build-concerts.py @@ -6,6 +6,7 @@ import re from sys import argv from helpers import ( + DATE_FORMATTERS, guess_language, read_concerts, relative_path, @@ -138,18 +139,6 @@ DETAILS_TEMPLATE = '''\ ''' -DATE_FORMATTERS = { - 'en': { - 'date': lambda d: d.strftime('%A %B %-d, %Y'), - 'time': lambda d: d.strftime('%I:%M %P'), - }, - 'fr': { - 'date': lambda d: d.strftime('%A %-d %B %Y').capitalize(), - 'time': lambda d: d.strftime('%Hh%M'), - }, -} - - def detail_block(tag, classes, content): opener = f'<{tag} class="{" ".join(classes)}">' closer = f'' -- cgit v1.2.3