From 8efb5b6772282e11e212edf67c8befe22ea8c06f Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sat, 9 Jul 2022 15:18:29 +0200 Subject: Add plumbing to update next concert on the frontpage --- build-concerts.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'build-concerts.py') diff --git a/build-concerts.py b/build-concerts.py index 6e99673..ed37864 100755 --- a/build-concerts.py +++ b/build-concerts.py @@ -9,6 +9,7 @@ from helpers import ( guess_language, read_concerts, relative_path, + split_concerts, tmplocale, touchup_plaintext, ) @@ -19,17 +20,6 @@ from helpers import ( # - canceled => warning -def split_concerts(concerts, threshold): - cutoff = len(concerts) - - for i, c in enumerate(concerts): - if c.time > threshold: - cutoff = i - break - - return reversed(concerts[:cutoff]), concerts[cutoff:] - - LOCALIZED_TEXT = { 'en': { 'past': 'Past concerts', -- cgit v1.2.3