diff --git a/scripts/csv_to_json.py b/scripts/csv_to_json.py new file mode 100755 index 0000000..60e8c31 --- /dev/null +++ b/scripts/csv_to_json.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import csv, json, sys + +if len(sys.argv) != 3: + print("Usage: csv_to_json ") + sys.exit(1) + +with open(sys.argv[1]) as f: + data = list(csv.DictReader(f)) + +with open(sys.argv[2], 'w') as f: + json.dump(data, f, indent=2) \ No newline at end of file