diff --git a/parse.py b/parse.py index 831adb6..db2f072 100644 --- a/parse.py +++ b/parse.py @@ -10,6 +10,7 @@ SIZE_IDS = (312, 313, 314, 316, 319, 320, 321, 322, 323, 324) BREAKFASTWISHES_ID = 309 # Wie heißt die Athenanas? ATHENE_ID = 305 # ID of the question of how the logo image is to be named +ATHENE_CUSTOM_ID = 306 # custom naming of the Athenanas HUMAN_ID = 147 # ticket for a human MASCOT_ID = 148 # ticket for a mascot # Rahmenprogramm @@ -122,7 +123,7 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di ret += f"*
{wish[1]}
\n" ret += "\n" - ret += ('== Ja/Nein-Abfragen ==\n' + ret += ('== Checkbox-Abfragen ==\n' '{|class="wikitable sortable"\n' '! Frage !! Antwort !! Anzahl\n' '|-\n') @@ -140,7 +141,14 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di '! Variante !! Stimmen\n' '|-\n') for variant, count in quest_answers[ATHENE_ID].items(): - ret += f"|| {prefix(variant[0])} {variant[1]} || {count}\n|-\n" + if "Sonstiges" not in variant[1]: + ret += f"|| {prefix(variant[0])} {variant[1]} || {count}\n|-\n" + else: + ret += f"|| {prefix(variant[0])} {variant[1]} || " + for custom in quest_answers[ATHENE_CUSTOM_ID]: + ret += f"{custom[1]}
\n" + ret = ret[:-6] + ret += f"\n|-\n" ret += "|}\n" return ret