forked from Trygve/otime
La til xml export som valg
This commit is contained in:
parent
caca1fac99
commit
aee318bd0e
11
wizard.py
11
wizard.py
@ -21,7 +21,7 @@ def main():
|
|||||||
case 1:
|
case 1:
|
||||||
import_menu()
|
import_menu()
|
||||||
case 2:
|
case 2:
|
||||||
print('export')
|
export_menu()
|
||||||
case 3:
|
case 3:
|
||||||
print('edit')
|
print('edit')
|
||||||
case 4:
|
case 4:
|
||||||
@ -131,7 +131,8 @@ def export_menu():
|
|||||||
global event
|
global event
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
print(''' 1. export otime file
|
print(''' 1. Export otime file
|
||||||
|
2. Export iof 3.0 xml file
|
||||||
2. Back''')
|
2. Back''')
|
||||||
try:
|
try:
|
||||||
opt = int(input('Choose an option (1-2): '))
|
opt = int(input('Choose an option (1-2): '))
|
||||||
@ -142,9 +143,13 @@ def export_menu():
|
|||||||
case 1:
|
case 1:
|
||||||
filename = input('File: ')
|
filename = input('File: ')
|
||||||
f = open(filename, 'w')
|
f = open(filename, 'w')
|
||||||
f.write(event.create_json_file)
|
f.write(event.create_json_file())
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
filename = input('File: ')
|
||||||
|
event.get_xml_res().write(filename)
|
||||||
|
|
||||||
|
case 3:
|
||||||
break
|
break
|
||||||
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
Loading…
Reference in New Issue
Block a user