Tag mixin & fixes
This commit is contained in:
parent
7316480289
commit
1d206295b7
116 changed files with 1669 additions and 802 deletions
22
utilities/json_pretty_print.py
Normal file
22
utilities/json_pretty_print.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
data = {}
|
||||
def save_json(json_file):
|
||||
with open(json_file) as read_file:
|
||||
data = json.load(read_file)
|
||||
with open(json_file, "w") as data_file:
|
||||
json.dump(data, data_file, indent=4, sort_keys=True)
|
||||
|
||||
path = "D:\\BetterEnd\\BetterEnd_1.16.3\\utility_res\\item"
|
||||
|
||||
files = []
|
||||
# r=root, d=directories, f = files
|
||||
for r, d, f in os.walk(path):
|
||||
for file in f:
|
||||
if '.json' in file:
|
||||
files.append(os.path.join(r, file))
|
||||
|
||||
for f in files:
|
||||
print(f)
|
||||
save_json(f)
|
Loading…
Add table
Add a link
Reference in a new issue