From 63f9e40fc64150fac39546134d5e706d0964eeee Mon Sep 17 00:00:00 2001 From: Trygve Date: Sat, 21 May 2022 16:27:59 +0200 Subject: [PATCH] Resultater fra xml og live mtr --- dev.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/dev.py b/dev.py index 1988b07..3bb85c9 100644 --- a/dev.py +++ b/dev.py @@ -1,16 +1,25 @@ import otime +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__": - event = otime.Event(0, 'supercup') - event.import_ttime_cnf('k2ds/tt.cnf') - event.import_ttime_db('k2ds/db.csv') - event.import_mtr_file('k2ds/mtr.txt') - #card_punches = otime.card_punch.list_from_mtr_f('sc_2021_ttime/mtr.csv') - event.match_runners_cards() - event.create_start_list_pdf('starttimes.pdf') - #event.get_xml_res().write('Resultater.xml') + event = otime.Event(0, 'Jukola-testløp') + #event.import_ttime_cnf('k2ds/tt.cnf') + #event.import_ttime_db('k2ds/db.csv') + #event.import_mtr_file('k2ds/mtr.txt') + #card_punches = otime.card_punch.list_from_mtr_f('sc_2021_ttime/mtr.csv') + #event.match_runners_cards() + #event.create_start_list_pdf('starttimes.pdf') + #event.get_xml_res().write('Resultater.xml') + event.import_ttime_cnf('/home/trygve/Dokumenter/Jukola_uttak/tt.cnf') + event.runners = otime.runners_from_xml_entries('/home/trygve/Dokumenter/Jukola_uttak/entries_Nattøkt,_Jukola-testløp.xml', event.o_classes) + event.card_dumps = mtr.dump_all('/dev/ttyUSB0') + event.match_runners_cards() + event.get_xml_res().write('Resultater_uttak.xml') + for n in event.card_dumps: + print(n.card, n.controls)