stats about food preference

This commit is contained in:
Johannes 2023-10-06 18:34:57 +02:00
parent 897d03c5ed
commit 1b021758f2

View file

@ -14,6 +14,8 @@ MASCOT_ID = 148 # ticket for a mascot
# Rahmenprogramm
RAHMERST_ID = 308
RAHMZWEIT_ID = 317
# Yummy!
ESSEN_ID = 302
def parse(filename: Union[str, Path]) -> Tuple[
@ -94,6 +96,16 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di
ret += f"|| {program[1]} || {count}\n|-\n"
ret += "|}\n\n"
ret += ('== Essen ==\n'
'{|class="wikitable sortable"\n'
'! Präferenz !! gewählt\n'
'|-\n')
for pref, count in quest_answers[ESSEN_ID].items():
ret += f"|| {pref[1]} || {count}\n|-\n"
ret += ("|}\n"
"Unverträglichkeiten/Allergien konnten auch angegeben werden, Antworten beim Pretix-Team erfragen."
"\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"