stats for Rahmenprogramm

This commit is contained in:
Johannes 2023-10-06 18:31:00 +02:00
parent 379b90ea3d
commit 897d03c5ed

View file

@ -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"* <pre>{wish[1]}</pre>\n"