athenanas: show custom names

This commit is contained in:
Johannes 2023-10-06 18:56:32 +02:00
parent 34ccc61835
commit f3dedeb7e8

View file

@ -10,6 +10,7 @@ SIZE_IDS = (312, 313, 314, 316, 319, 320, 321, 322, 323, 324)
BREAKFASTWISHES_ID = 309
# Wie heißt die Athenanas?
ATHENE_ID = 305 # ID of the question of how the logo image is to be named
ATHENE_CUSTOM_ID = 306 # custom naming of the Athenanas
HUMAN_ID = 147 # ticket for a human
MASCOT_ID = 148 # ticket for a mascot
# Rahmenprogramm
@ -122,7 +123,7 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di
ret += f"* <pre>{wish[1]}</pre>\n"
ret += "\n"
ret += ('== Ja/Nein-Abfragen ==\n'
ret += ('== Checkbox-Abfragen ==\n'
'{|class="wikitable sortable"\n'
'! Frage !! Antwort !! Anzahl\n'
'|-\n')
@ -140,7 +141,14 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di
'! Variante !! Stimmen\n'
'|-\n')
for variant, count in quest_answers[ATHENE_ID].items():
if "Sonstiges" not in variant[1]:
ret += f"|| {prefix(variant[0])} {variant[1]} || {count}\n|-\n"
else:
ret += f"|| {prefix(variant[0])} {variant[1]} || "
for custom in quest_answers[ATHENE_CUSTOM_ID]:
ret += f"{custom[1]}<br/>\n"
ret = ret[:-6]
ret += f"\n|-\n"
ret += "|}\n"
return ret