-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCardCreator.py
More file actions
27 lines (20 loc) · 677 Bytes
/
CardCreator.py
File metadata and controls
27 lines (20 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import json
from modules.CardConstructor import CardConstructor
import modules.InWork.CardCreatorGUI as CardCreator
inp_typ = "JSON"
if inp_typ == "JSON":
with open('CardCreator.json', 'r') as f:
json_file = json.load(f)
'''
if json_file['aktion'] == 'new':
with open('data/' + json_file["Title"] + '.json', 'w') as f:
u = json.dumps(json_file, indent=4)
f.write(u)
elif json_file['aktion'] == 'open':
with open('data/' + json_file['Cardname'] + '.json', 'r') as u:
json_file = json.load(u)
'''
card1 = CardConstructor(json_file)
card1.generateCard()
elif inp_typ == "GUI":
CardCreator.GUI()