stats for Rahmenprogramm
This commit is contained in:
parent
379b90ea3d
commit
897d03c5ed
1 changed files with 20 additions and 1 deletions
21
parse.py
21
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
|
# 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
|
# ID of wishlist for ewiges Frühstück
|
||||||
BREAKFASTWISHES_ID = 309
|
BREAKFASTWISHES_ID = 309
|
||||||
# Wie heißt die Athenanas?
|
# Wie heißt die Athenanas?
|
||||||
ATHENE_ID = 305 # ID of the question of how the logo image is to be named
|
ATHENE_ID = 305 # ID of the question of how the logo image is to be named
|
||||||
HUMAN_ID = 147 # ticket for a human
|
HUMAN_ID = 147 # ticket for a human
|
||||||
MASCOT_ID = 148 # ticket for a mascot
|
MASCOT_ID = 148 # ticket for a mascot
|
||||||
|
# Rahmenprogramm
|
||||||
|
RAHMERST_ID = 308
|
||||||
|
RAHMZWEIT_ID = 317
|
||||||
|
|
||||||
|
|
||||||
def parse(filename: Union[str, Path]) -> Tuple[
|
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 += f"|| {questions[size_id]}: || {size[1]} || {count}\n|-\n"
|
||||||
ret += "|}\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'
|
ret += '== Wünsche an das ewige Frühstück ==\n'
|
||||||
for wish in quest_answers[BREAKFASTWISHES_ID]:
|
for wish in quest_answers[BREAKFASTWISHES_ID]:
|
||||||
ret += f"* <pre>{wish[1]}</pre>\n"
|
ret += f"* <pre>{wish[1]}</pre>\n"
|
||||||
|
|
Loading…
Reference in a new issue