This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
def minify(filename): | |
newname = filename.replace('.json', '.min.json') # Output file name | |
new_file_location = os.path.join( | |
'./compressed/', newname) # Output file location | |
with open(filename, encoding="utf8") as fp: | |
print("Compressing file: " + filename) |