La til xml export som valg

This commit is contained in:
Trygve 2022-05-30 16:26:39 +02:00
parent caca1fac99
commit aee318bd0e

View File

@ -21,7 +21,7 @@ def main():
case 1:
import_menu()
case 2:
print('export')
export_menu()
case 3:
print('edit')
case 4:
@ -131,7 +131,8 @@ def export_menu():
global event
while True:
try:
print(''' 1. export otime file
print(''' 1. Export otime file
2. Export iof 3.0 xml file
2. Back''')
try:
opt = int(input('Choose an option (1-2): '))
@ -142,9 +143,13 @@ def export_menu():
case 1:
filename = input('File: ')
f = open(filename, 'w')
f.write(event.create_json_file)
f.write(event.create_json_file())
case 2:
filename = input('File: ')
event.get_xml_res().write(filename)
case 3:
break
except FileNotFoundError: