From: Stefano Rivera Date: Sat, 17 May 2014 20:14:33 +0000 (+0200) Subject: Strip underscory stuff from JSON X-Git-Tag: 0.1~29^2 X-Git-Url: https://git.ctpug.org.za/?p=naja.git;a=commitdiff_plain;h=8598915c56882240cebef4a68fde0fb9a37a1fe7 Strip underscory stuff from JSON --- 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)