wynnbuilder-forked-for-changes/py_script/validate.py
2021-07-05 07:13:04 -07:00

12 lines
327 B
Python

import json
import sys
with open(sys.argv[1]) as infile:
data = json.load(infile)
duplicate_map = dict()
for item in data["items"]:
if item["name"] in duplicate_map:
print("DUPLICATE: " + str(item["id"]) + " <-> " + str(duplicate_map[item["name"]]["id"]))
else:
duplicate_map[item["name"]] = item