2023-10-02 17:54:32 +00:00
|
|
|
#! /usr/bin/env python3
|
|
|
|
from datetime import datetime
|
|
|
|
from pathlib import Path
|
|
|
|
|
2023-11-15 09:59:40 +00:00
|
|
|
from parse import parse, rahmprog_stats, wiki_stats
|
2023-10-02 17:54:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
def print_wiki_stats(filename: str) -> None:
|
|
|
|
path = Path(filename)
|
|
|
|
timestamp = datetime.fromtimestamp(path.stat().st_ctime)
|
2023-10-16 09:20:56 +00:00
|
|
|
print(f"Stand: {timestamp.strftime('%d.%m.%Y %H:%M Uhr')}")
|
2023-10-02 17:54:32 +00:00
|
|
|
print(wiki_stats(*parse(path)))
|
|
|
|
|
|
|
|
|
2023-11-15 09:59:40 +00:00
|
|
|
FILENAME = "koma89_pretixdata.json"
|
|
|
|
|
|
|
|
|
2023-10-02 17:54:32 +00:00
|
|
|
if __name__ == "__main__":
|
2023-11-15 09:59:40 +00:00
|
|
|
#print_wiki_stats(FILENAME)
|
|
|
|
with open("rahmprogramm_wahlen.csv", "w") as f:
|
|
|
|
f.write(rahmprog_stats(FILENAME))
|