diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2022-07-09 15:18:29 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2022-07-09 15:18:29 +0200 |
| commit | 8efb5b6772282e11e212edf67c8befe22ea8c06f (patch) | |
| tree | 2a29179a85698973fe2724ce9fc601ca96a4f944 /build-concerts.py | |
| parent | 1dd8b8f4e036d2ef10a2504df1a281966f454b04 (diff) | |
| download | quatuorbellefeuille.com-8efb5b6772282e11e212edf67c8befe22ea8c06f.tar.xz | |
Add plumbing to update next concert on the frontpage
Diffstat (limited to 'build-concerts.py')
| -rwxr-xr-x | build-concerts.py | 12 |
1 files changed, 1 insertions, 11 deletions
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', |
