From 28ef8c28422882150bef4874b3030321aff8add0 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Mon, 21 Feb 2022 16:18:30 +0100 Subject: [wip] Make list of concert items in RSS feed --- build-concerts.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'build-concerts.py') 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 -- cgit v1.2.3