import hashlib
import os
import time
import configparser
import uuid
import sys
import json
import zipfile
Asset = {"assets":{}}
def test_file_md5(file_path):
test = hashlib.md5()
if os.path.isfile(file_path):
with open(file_path, "rb") as f:
while True:
data = f.read(8096)
if not data:
break
else:
test.update(data)
ret = test.hexdigest()
Asset["assets"][file_path] = {}
Asset["assets"][file_path]["md5"] = ret
Asset["assets"][file_path]["compressed"] = False
MyzipFile(os.path.abspath(file_path),os.path.abspath(file_path) + ".zip")
def test_dir_md5(file_path):
test_abs_path = os.path.abspath(file_path)
# print(test_abs_path)
os.chdir(test_abs_pa