2022-06-12 20:54:53 -07:00
|
|
|
'''
|
2022-06-25 00:19:55 -07:00
|
|
|
A generic file used for turning a json into a compressed version of itself (minimal whitespaces).
|
|
|
|
Compressed files are useful for lowering the amount of data sent.
|
2022-06-12 20:54:53 -07:00
|
|
|
|
|
|
|
Usage: python compress_json.py [infile rel path] [outfile rel path]
|
|
|
|
'''
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
import json
|
2022-06-25 16:35:09 -07: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
|
2021-05-01 07:19:33 -07:00
|
|
|
json.dump(json.load(open(infile)), open(outfile, "w"))
|