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 compressed version of itself (minimal whitespaces).
|
|
|
|
Compressed files are useful for lowering the amount of data sent.
|
2022-06-13 03:54:53 +00:00
|
|
|
|
|
|
|
Usage: python compress_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
|
2021-05-01 14:19:33 +00:00
|
|
|
json.dump(json.load(open(infile)), open(outfile, "w"))
|