add stats about university
This commit is contained in:
parent
a52204fba1
commit
2416875ec0
1 changed files with 11 additions and 0 deletions
11
parse.py
11
parse.py
|
@ -26,6 +26,8 @@ BOOLEAN_IDS = (
|
||||||
301, # Mörderspiel
|
301, # Mörderspiel
|
||||||
311, # nur Rufname auf Badge
|
311, # nur Rufname auf Badge
|
||||||
)
|
)
|
||||||
|
# where are U from?
|
||||||
|
UNI_ID = 300
|
||||||
|
|
||||||
|
|
||||||
def parse(filename: Union[str, Path]) -> Tuple[
|
def parse(filename: Union[str, Path]) -> Tuple[
|
||||||
|
@ -136,6 +138,15 @@ def wiki_stats(items: Dict[int, str], count_items: Dict[int, int], questions: Di
|
||||||
ret += f"|| {quest_titles[field]}: || {answer[1]} || {count}\n|-\n"
|
ret += f"|| {quest_titles[field]}: || {answer[1]} || {count}\n|-\n"
|
||||||
ret += "|}\n\n"
|
ret += "|}\n\n"
|
||||||
|
|
||||||
|
unis = set()
|
||||||
|
for uni in quest_answers[UNI_ID]:
|
||||||
|
unis.add(uni[1].split()[-1])
|
||||||
|
ret += (f'== anwesende Unis ==\n'
|
||||||
|
f'Insgesamt {len(unis)}. (Keine Garantie, dass diese automatisierte'
|
||||||
|
f' Erkennung sowie folgende Liste korrekt ist.)\n\n'
|
||||||
|
+ ', '.join(sorted(unis))
|
||||||
|
+ '\n\n')
|
||||||
|
|
||||||
def prefix(id_):
|
def prefix(id_):
|
||||||
return "Mensch sagt:" if id_ == HUMAN_ID else "Maskottchen sagt:" if id_ == MASCOT_ID else ""
|
return "Mensch sagt:" if id_ == HUMAN_ID else "Maskottchen sagt:" if id_ == MASCOT_ID else ""
|
||||||
ret += ('== Wie heißt das Ding? ==\n'
|
ret += ('== Wie heißt das Ding? ==\n'
|
||||||
|
|
Loading…
Reference in a new issue