peerplays_migrated/programs/genesis_util/canonical_format.py

15 lines
337 B
Python
Raw Normal View History

2015-10-12 20:22:28 +00:00
#!/usr/bin/env python3
import argparse
import json
import sys
if len(sys.argv) < 3:
print("syntax: "+sys.argv[0]+" INFILE OUTFILE")
sys.exit(0)
with open(sys.argv[1], "r") as infile:
genesis = json.load(infile)
with open(sys.argv[2], "w") as outfile:
json.dump(genesis, outfile, separators=(',', ':'), sort_keys=True)