From 5fd8a8ccd70952517f1eb352b8bfa891565fb85f Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Thu, 18 Jan 2024 15:52:11 +0100 Subject: [PATCH] Make file name of section turniermeldung more ascii-stable. --- ...ankfurt-a-m-kohler-juergen-kohler-petra-mas-iii-b-std.md} | 0 ...-groossweier-kohler-juergen-kohler-petra-mas-iii-b-std.md} | 0 .../competitionNotificationReader/competitionParser.py | 5 ++++- 3 files changed, 4 insertions(+), 1 deletion(-) rename content/turniermeldung/2024/{2024-01-21-frankfurt a.m.-kohler-juergen-kohler-petra-mas-iii-b-std.md => 2024-01-21-frankfurt-a-m-kohler-juergen-kohler-petra-mas-iii-b-std.md} (100%) rename content/turniermeldung/2024/{2024-02-24-achern-grooßweier-kohler-juergen-kohler-petra-mas-iii-b-std.md => 2024-02-24-achern-groossweier-kohler-juergen-kohler-petra-mas-iii-b-std.md} (100%) diff --git a/content/turniermeldung/2024/2024-01-21-frankfurt a.m.-kohler-juergen-kohler-petra-mas-iii-b-std.md b/content/turniermeldung/2024/2024-01-21-frankfurt-a-m-kohler-juergen-kohler-petra-mas-iii-b-std.md similarity index 100% rename from content/turniermeldung/2024/2024-01-21-frankfurt a.m.-kohler-juergen-kohler-petra-mas-iii-b-std.md rename to content/turniermeldung/2024/2024-01-21-frankfurt-a-m-kohler-juergen-kohler-petra-mas-iii-b-std.md diff --git a/content/turniermeldung/2024/2024-02-24-achern-grooßweier-kohler-juergen-kohler-petra-mas-iii-b-std.md b/content/turniermeldung/2024/2024-02-24-achern-groossweier-kohler-juergen-kohler-petra-mas-iii-b-std.md similarity index 100% rename from content/turniermeldung/2024/2024-02-24-achern-grooßweier-kohler-juergen-kohler-petra-mas-iii-b-std.md rename to content/turniermeldung/2024/2024-02-24-achern-groossweier-kohler-juergen-kohler-petra-mas-iii-b-std.md diff --git a/scripts/read-competition-notification/competitionNotificationReader/competitionParser.py b/scripts/read-competition-notification/competitionNotificationReader/competitionParser.py index 17282a46..5db8c672 100644 --- a/scripts/read-competition-notification/competitionNotificationReader/competitionParser.py +++ b/scripts/read-competition-notification/competitionNotificationReader/competitionParser.py @@ -105,11 +105,14 @@ class CompetitionParser: namePartnerin = self._cleanName(self._partnerin) competition = f'{self._group} {self._class} {self._section}' competitionName = self._cleanName(competition) + ort = self._cleanName(self._ort) + + filename = f'{self._date}-{ort}-{namePartner}-{namePartnerin}-{competitionName}.md' return os.path.join( prefix, self._date[0:4], - f'{self._date}-{self._ort.lower()}-{namePartner}-{namePartnerin}-{competitionName}.md' + re.sub(self._reDashes, '-', filename) ) def getContent(self) -> str: