2024-05-13 20:50:01 +00:00
|
|
|
from ItemRelate import main as relate
|
|
|
|
import json
|
2024-05-14 04:08:37 +00:00
|
|
|
import os
|
2024-05-13 20:50:01 +00:00
|
|
|
|
2024-05-14 04:08:37 +00:00
|
|
|
if os.path.getsize("TestFile/items.json") == 0:
|
|
|
|
with open("TestFile/adhd.json","r") as json_file:
|
|
|
|
scale = json.load(json_file)
|
|
|
|
que=relate(scale)
|
|
|
|
with open("TestFile/items.json","w") as items:
|
|
|
|
items.write(json.dumps(que))
|
|
|
|
else:
|
|
|
|
with open("TestFile/items.json","r") as items:
|
|
|
|
que = json.load(items)
|
2024-05-13 20:50:01 +00:00
|
|
|
|
2024-05-14 04:08:37 +00:00
|
|
|
print(que)
|