koma-pretix-parser/main.py

32 lines
821 B
Python
Executable file

#! /usr/bin/env python3
from datetime import datetime
from pathlib import Path
from parse import badge_data, moerder_list, parse, rahmprog_stats, wiki_stats
def print_wiki_stats(filename: str) -> None:
path = Path(filename)
timestamp = datetime.fromtimestamp(path.stat().st_ctime)
print(f"Stand: {timestamp.strftime('%d.%m.%Y %H:%M Uhr')}")
print(wiki_stats(*parse(path)))
FILENAME = "koma89_pretixdata.json"
if __name__ == "__main__":
# uncomment relevant stuff
print("Nothing to do!")
#print_wiki_stats(FILENAME)
#with open("rahmprogramm_wahlen.csv", "w") as f:
# f.write(rahmprog_stats(FILENAME))
#with open("badge_data.csv", "w") as f:
# f.write(badge_data(FILENAME))
#with open("moerder_list.csv", "w") as f:
# f.write(moerder_list(FILENAME))