Opprydning og navnendringer

This commit is contained in:
2022-05-11 15:07:33 +02:00
parent 643e3623e0
commit ac2bdab1cf
5 changed files with 133 additions and 107 deletions

20
cli.py
View File

@@ -17,11 +17,11 @@ def print_runners(Runners):
table.add_column("Status", justify="right", style="blue")
for i in Runners:
try:
o_class = i.o_class.name
except:
o_class = ''
table.add_row(i.fullname(), i.club ,str(i.card), o_class, i.status())
try:
o_class = i.o_class.name
except:
o_class = ''
table.add_row(i.fullname(), i.club ,str(i.card), o_class, i.status())
console = Console()
console.print(table)
@@ -146,14 +146,14 @@ def main():
args = parser.parse_args()
if args.command == 'show_runners':
event = otime.event(0, 'NoName')
event = otime.Event(0, 'NoName')
event.import_ttime_cnf(args.ttcnf)
event.import_ttime_db(args.ttdb)
event.import_mtr_file(args.mtr)
event.match_runners_cards()
print_runners(event.runners)
elif args.command == 'show_runner':
event = otime.event(0, 'NoName')
event = otime.Event(0, 'NoName')
event.import_ttime_cnf(args.ttcnf)
event.import_ttime_db(args.ttdb)
event.import_mtr_file(args.mtr)
@@ -167,7 +167,7 @@ def main():
elif args.command == 'show_result':
event = otime.event(0, 'NoName')
event = otime.Event(0, 'NoName')
event.import_ttime_cnf(args.ttcnf)
event.import_ttime_db(args.ttdb)
event.import_mtr_file(args.mtr)
@@ -184,12 +184,12 @@ def main():
else:
print_class_result(event.runners, o_class)
elif args.command == 'show_classes':
event = otime.event(0, 'NoName')
event = otime.Event(0, 'NoName')
event.import_ttime_cnf(args.ttcnf)
print_o_classes(event.o_classes)
elif args.command == 'create_xml':
event = otime.event(0, 'NoName')
event = otime.Event(0, 'NoName')
event.import_ttime_cnf(args.ttcnf)
event.import_ttime_db(args.ttdb)
event.import_mtr_file(args.mtr)