15 lines
423 B
Python
15 lines
423 B
Python
|
import os
|
||
|
import pickle
|
||
|
import base64
|
||
|
paths = os.path.dirname(__file__).replace("\\", "/")
|
||
|
pickle_jar = {}
|
||
|
print("packing...")
|
||
|
for i in os.listdir(paths+"/res"):
|
||
|
print(f"pack {i}")
|
||
|
with open(paths+"/res/"+i, "rb") as file:
|
||
|
pickle_jar[i.split(".")[0]] = base64.b64encode(file.read())
|
||
|
print("write...")
|
||
|
with open(paths+"/../magictk/res.pickle", "wb") as file:
|
||
|
pickle.dump(pickle_jar, file)
|
||
|
print("done!")
|