summaryrefslogtreecommitdiff
path: root/build-concerts.py
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2022-02-21 16:18:30 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2022-02-21 16:18:30 +0100
commit28ef8c28422882150bef4874b3030321aff8add0 (patch)
tree674d30c8c2e2e60dbc2a6f1b288d72105d591ff7 /build-concerts.py
parent8ea5a391e289c4e35995b00b9ef5ec91a26cb5d7 (diff)
downloadquatuorbellefeuille.com-28ef8c28422882150bef4874b3030321aff8add0.tar.xz
[wip] Make list of concert items in RSS feed
Diffstat (limited to 'build-concerts.py')
-rwxr-xr-xbuild-concerts.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/build-concerts.py b/build-concerts.py
index 7b0f75d..d1a7c11 100755
--- a/build-concerts.py
+++ b/build-concerts.py
@@ -1,13 +1,11 @@
#!/usr/bin/env python3
-from contextlib import contextmanager
from datetime import datetime
-import locale
from pathlib import Path
import re
from sys import argv
-from helpers import guess_language, read_concerts, relative_path
+from helpers import guess_language, read_concerts, relative_path, tmplocale
# TODO: change some jargon:
@@ -65,16 +63,6 @@ THUMBNAIL_TEMPLATE = '''\
'''
-@contextmanager
-def tmplocale(lang):
- old_lang, encoding = locale.getlocale()
- try:
- locale.setlocale(locale.LC_TIME, (lang, encoding))
- yield
- finally:
- locale.setlocale(locale.LC_TIME, (old_lang, encoding))
-
-
def format_credits(illustration):
credits = illustration.source_name