Strip underscory stuff from JSON
authorStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 20:14:33 +0000 (22:14 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Sat, 17 May 2014 20:15:44 +0000 (22:15 +0200)
tools/gen_json.py

index e3468cd530ea1be35970a5e4670c907bb5c7ff33..c274f9ce864309548be0b9a89cfc8846fd618de4 100755 (executable)
@@ -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)