Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools/json-normalize
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2013-01-05 00:53:49 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2013-01-05 00:53:49 (GMT)
commit007a6a839e3ee6b2e21b740ae5ea694ddbc0d405 (patch)
treed548b6848ebe5474ff19cf8ffaed807210bd07d9 /tools/json-normalize
parent82f7ae46a8d39c336b0504f45274bda3c6b93bbd (diff)
More appropriate naming
Diffstat (limited to 'tools/json-normalize')
-rwxr-xr-xtools/json-normalize23
1 files changed, 0 insertions, 23 deletions
diff --git a/tools/json-normalize b/tools/json-normalize
deleted file mode 100755
index 069908d..0000000
--- a/tools/json-normalize
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-
-import argparse
-import json
-from operator import itemgetter
-
-parser = argparse.ArgumentParser()
-parser.add_argument("paths", nargs="+", help="path to the json file")
-parser.add_argument("--sort-by", help="dictionary key to sort by")
-args = parser.parse_args()
-
-for path in args.paths:
- in_file = open(path, "rb")
- data = json.load(in_file)
- in_file.close()
-
- if args.sort_by is not None:
- data.sort(key=itemgetter(args.sort_by))
-
- out_file = open(path, "wb")
- json.dump(data, out_file, sort_keys=True, indent=4)
- out_file.write('\n')
- out_file.close()