From b69ad911fd033d34e829e3d6dc69a726a58f4c4c Mon Sep 17 00:00:00 2001 From: jackyan Date: Tue, 7 Nov 2023 14:09:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4psd?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=EF=BC=8C=E5=85=BC=E5=AE=B9windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check_compress_psd.py | 10 ++++++---- version.json | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/check_compress_psd.py b/check_compress_psd.py index 1c8f03b..f57cfa2 100644 --- a/check_compress_psd.py +++ b/check_compress_psd.py @@ -199,6 +199,7 @@ def convert_2_zip_file(path, is_activity_psd): os.chdir("../") if is_activity_psd: os.chdir("../") + os.remove(path) ###生成version文件 @@ -276,14 +277,15 @@ if __name__ == '__main__': try: ret = parse_psd(psd_file) - is_activity_psd = psd_file.find("activity/main_psd/") != -1 or psd_file.find("activity/level_psd/") != -1 + is_activity_psd = psd_file.find("activity/main_psd/") != -1 or psd_file.find("activity\\main_psd\\") != -1 or psd_file.find("activity/level_psd/") != -1 or psd_file.find("activity\\level_psd\\") != -1 + print(f"is_activity_psd = {is_activity_psd}") if ret: #检测成功,压缩到zip convert_2_zip_file(psd_file, is_activity_psd) versions[key] = hash_now - write_version() + write_version() except Exception as e: print(name + " 解析失败:" + repr(e) + ",请检查命名规范,比如auto_1_1=>auto_1 或 patch_1_1=>patch_1") elif hash_now == hash_old: - is_activity_psd = src_file.find("activity/main_psd/") != -1 - convert_2_zip_file(src_file, is_activity_psd) \ No newline at end of file + is_activity_psd = src_file.find("activity/main_psd/") != -1 or src_file.find("activity\\main_psd\\") != -1 or src_file.find("activity/level_psd/") != -1 or src_file.find("activity\\level_psd\\") != -1 + convert_2_zip_file(src_file, is_activity_psd) diff --git a/version.json b/version.json index c523ea2..c285c03 100644 --- a/version.json +++ b/version.json @@ -3,6 +3,9 @@ "10": "bff3c44bdb4d9fbd400c03caa5542c7e96dd20fc", "100": "4f2e650222b8a35caabcb3a40ae70a06be569ca5", "1000": "30f7a47babe2d9574ff2415ef664004f1d0e6f8f", + "100001": "f71f353df73daecced3eb4253a3bf2dcdfcac72a", + "100002": "fc085bb41136c34c678cadfdaa96e6d14a5a560d", + "100003": "ce054ba6412262fe5b5700cc7311a2d1f96e75ed", "1001": "74193ab6b792045ca31c7f4ef99d14fbe82fc146", "1002": "0ea4c3d6149d447b36e01ed3f5f14f0dac65b195", "1003": "23739159f0934160b8b603e83ad051722d08f82a",