From cc2b8ab9be1c911068e5d619aa2637abf2d5d73e Mon Sep 17 00:00:00 2001 From: "yi.cheng" Date: Wed, 23 Aug 2023 16:43:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0psd=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check_lost.py | 20 ++++++++++++++++++++ 缺失psd检测.bat | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 check_lost.py create mode 100644 缺失psd检测.bat diff --git a/check_lost.py b/check_lost.py new file mode 100644 index 0000000..0372cd9 --- /dev/null +++ b/check_lost.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +#coding:utf-8 + +import os, sys + +def check_lost(path): + psd_ids = [] + max_id = 0 + for root, dirs, files in os.walk(path): + for name in files: + psd_id = name.split("_")[0] + psd_ids.append(psd_id) + max_id = max(max_id, int(psd_id)) + + for i in range(1, max_id + 1): + if str(i) not in psd_ids: + print("缺失: " + str(i)) + +if __name__ == '__main__': + check_lost(sys.argv[1]) \ No newline at end of file diff --git a/缺失psd检测.bat b/缺失psd检测.bat new file mode 100644 index 0000000..20f4efe --- /dev/null +++ b/缺失psd检测.bat @@ -0,0 +1,2 @@ +python check_lost.py ./art_assets +pause \ No newline at end of file