otime/dev.py

22 lines
564 B
Python
Raw Normal View History

import otime
2022-05-21 14:27:59 +00:00
import mtr
from rich import print
from rich import inspect
from rich.console import Console
from rich.columns import Columns
from rich.table import Table
if __name__ == "__main__":
2022-06-01 15:44:33 +00:00
event = otime.Event(0, 'testevent')
event.import_xml_entries('k2ds/entries.xml')
event.import_mtr_file(open('k2ds/mtr.txt', 'r'))
event.match_all()
for runner in event.runners:
print(runner.fullname(), runner.fee.name)
with open('test.otime', 'w') as f:
f.write(event.create_json_file())
event.create_invoices('test.pdf')