From 897d03c5edada33e62831aec0162945fe9ddf4b5 Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 6 Oct 2023 18:31:00 +0200 Subject: [PATCH] stats for Rahmenprogramm --- parse.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/parse.py b/parse.py index 039220b..f7af422 100644 --- a/parse.py +++ b/parse.py @@ -4,13 +4,16 @@ from typing import Dict, Tuple, Union # I have just python3.8 here :( # ids of the questions which represent a size of a merch product -SIZE_IDS = (312, 313, 314, 316, 319, 320, 321, 322, 323) +SIZE_IDS = (312, 313, 314, 316, 319, 320, 321, 322, 323, 324) # ID of wishlist for ewiges Frühstück BREAKFASTWISHES_ID = 309 # Wie heißt die Athenanas? ATHENE_ID = 305 # ID of the question of how the logo image is to be named HUMAN_ID = 147 # ticket for a human MASCOT_ID = 148 # ticket for a mascot +# Rahmenprogramm +RAHMERST_ID = 308 +RAHMZWEIT_ID = 317 def parse(filename: Union[str, Path]) -> Tuple[ @@ -75,6 +78,22 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di ret += f"|| {questions[size_id]}: || {size[1]} || {count}\n|-\n" ret += "|}\n\n" + ret += ('== Rahmenprogramm ==\n' + '=== Erstwahlen ===' + '{|class="wikitable sortable"\n' + '! Programmpunkt !! gewählt\n' + '|-\n') + for program, count in quest_answers[RAHMERST_ID].items(): + ret += f"|| {program[1]} || {count}\n|-\n" + ret += ('|}\n' + '=== Zweitwahlen ===\n' + '{|class="wikitable sortable"\n' + '! Programmpunkt !! gewählt\n' + '|-\n') + for program, count in quest_answers[RAHMZWEIT_ID].items(): + ret += f"|| {program[1]} || {count}\n|-\n" + ret += "|}\n\n" + ret += '== Wünsche an das ewige Frühstück ==\n' for wish in quest_answers[BREAKFASTWISHES_ID]: ret += f"*
{wish[1]}
\n"