2022-06-13 03:54:53 +00:00
|
|
|
'''
|
2022-06-25 07:19:55 +00:00
|
|
|
A generic file used for turning a json into a "clean" version of itself (human-friendly whitespace).
|
|
|
|
Clean files are useful for human reading and dev debugging.
|
|
|
|
|
2022-06-13 03:54:53 +00:00
|
|
|
|
|
|
|
Usage: python clean_json.py [infile rel path] [outfile rel path]
|
|
|
|
'''
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
import json
|
2022-06-25 23:35:09 +00:00
|
|
|
import argparse
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser(description="Pull data from wynn API.")
|
|
|
|
parser.add_argument('infile', help='input file to read data from')
|
|
|
|
parser.add_argument('outfile', help='output file to dump clean data into')
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
infile, outfile = args.infile, args.outfile
|
2022-06-13 03:54:53 +00:00
|
|
|
json.dump(json.load(open(infile)), open(outfile, "w"), indent = 2)
|