projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d480e4
)
Strip underscory stuff from JSON
author
Stefano Rivera
<stefano@rivera.za.net>
Sat, 17 May 2014 20:14:33 +0000
(22:14 +0200)
committer
Stefano Rivera
<stefano@rivera.za.net>
Sat, 17 May 2014 20:15:44 +0000
(22:15 +0200)
tools/gen_json.py
patch
|
blob
|
history
diff --git
a/tools/gen_json.py
b/tools/gen_json.py
index e3468cd530ea1be35970a5e4670c907bb5c7ff33..c274f9ce864309548be0b9a89cfc8846fd618de4 100755
(executable)
--- 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)