X-Git-Url: https://git.ctpug.org.za/?p=naja.git;a=blobdiff_plain;f=tools%2Fgen_json.py;h=c274f9ce864309548be0b9a89cfc8846fd618de4;hp=e3468cd530ea1be35970a5e4670c907bb5c7ff33;hb=8598915c56882240cebef4a68fde0fb9a37a1fe7;hpb=9d480e4daa18ef9c266c4fe485b9109b61a182c2 diff --git a/tools/gen_json.py b/tools/gen_json.py index e3468cd..c274f9c 100755 --- a/tools/gen_json.py +++ b/tools/gen_json.py @@ -29,6 +29,12 @@ def convert_to_json(directory, update=True): import yaml with open(yaml_path) as yaml_f: obj = yaml.safe_load(yaml_f) + + # These old objects, referenced in cards + for k in obj.keys(): + if k.startswith('_'): + del obj[k] + with open(json_path, 'w') as json_f: json.dump(obj, json_f, indent=2)