peerplays_migrated/programs/genesis_util/python_format.py

15 lines
324 B
Python
Raw Permalink Normal View History

#!/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, indent=2, sort_keys=True)