1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-22 11:56:42 +00:00

crab _min is gone crab (also stdlib updates)

This commit is contained in:
bleck9999 2021-07-27 19:46:48 +01:00
parent 40d8bb8ba4
commit d68912f5e5
No known key found for this signature in database
GPG key ID: D0CA0C41DB616843

View file

@ -1,6 +1,6 @@
# Copyright (c) 2021 bleck9999
# https://github.com/bleck9999/ts-minifier
# Version: 4fc47b37
# Version: b9ea46f3
import argparse
import re
@ -11,7 +11,8 @@ sub_funcs = {'while': "_h", 'print': "_p", 'println': "_l", 'mountsys': "_s", 'm
'mkdir': "_k", 'memory': "_m", 'ncatype': "_n", 'pause': "_w", 'color': "_a", 'menu': "__", 'emu': "_u",
'clear': "_x", 'timer': "_t", 'deldir': "_g", 'fsexists': "_f", 'delfile': "_z", "copydir": "c_",
"movefile": "_v", "payload": "_j", "readfile": "_o", "writefile": "w_", "setpixels": "y_", "printpos": "p_",
"emmcread": "e_", "emmcwrite": "f_", "emummcread": "r_", "emummcwrite": "s_"}
"emmcread": "e_", "emmcwrite": "f_", "emummcread": "r_", "emummcwrite": "s_", "escapepath": "x_",
"combinepath": "a_"}
replace_functions = False
@ -177,5 +178,8 @@ if __name__ == '__main__':
with open(file, 'r') as f:
r = minify(f.read())
file = file.split(sep='.')[0].split(sep='/')[-1]
f = open(f"{dest}/{file}_min.te", 'w')
if dest != '.':
f = open(f"{dest}/{file}.te", 'w')
else:
f = open(f"{dest}/{file}_min.te", 'w')
f.write(r)