Compare commits
2 commits
0217bf4611
...
1b39c3085e
Author | SHA1 | Date | |
---|---|---|---|
1b39c3085e | |||
bdf63adb0d |
1 changed files with 25 additions and 0 deletions
25
parse.py
25
parse.py
|
@ -55,4 +55,29 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di
|
||||||
for item_id, item_name in items.items():
|
for item_id, item_name in items.items():
|
||||||
ret += f"|| {item_name} || {count_items.get(item_id)}\n|-\n"
|
ret += f"|| {item_name} || {count_items.get(item_id)}\n|-\n"
|
||||||
ret += "|}\n"
|
ret += "|}\n"
|
||||||
|
|
||||||
|
# ids of the questions which represent a size of a merch product
|
||||||
|
size_ids = (312, 313, 314, 316, 319, 320, 321, 322, 323)
|
||||||
|
ret += ('== Merch-Größenverteilung ==\n'
|
||||||
|
'{|class="wikitable sortable"\n'
|
||||||
|
'! Größe/Eigenschaft !! Wert !! Anzahl\n'
|
||||||
|
'|-\n')
|
||||||
|
for size_id in size_ids:
|
||||||
|
for size, count in quest_answers[size_id].items():
|
||||||
|
ret += f"|| {questions[size_id]}: || {size[1]} || {count}\n|-\n"
|
||||||
|
ret += "|}\n"
|
||||||
|
|
||||||
|
athene_id = 305 # ID of the question how the logo image is to be named
|
||||||
|
human_id = 147 # ticket for a human
|
||||||
|
mascot_id = 148 # ticket for a mascot
|
||||||
|
def prefix(id_):
|
||||||
|
return "Mensch sagt:" if id_ == human_id else "Maskottchen sagt:" if id_ == mascot_id else ""
|
||||||
|
ret += ('== Wie heißt das Ding? ==\n'
|
||||||
|
'{|class="wikitable sortable"\n'
|
||||||
|
'! Variante !! Stimmen\n'
|
||||||
|
'|-\n')
|
||||||
|
for variant, count in quest_answers[athene_id].items():
|
||||||
|
ret += f"|| {prefix(variant[0])} {variant[1]} || {count}\n|-\n"
|
||||||
|
ret += "|}\n"
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in a new issue