代码初始化

This commit is contained in:
Giao committed 2026-10-09 18:23:57 +08:00
1 parent c2f5cd98ff
commit e3efeb74ad
2439 files changed
+305661 -1

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
import os, json
ROOT = r'e:\MCStudioDownload\work\3027246179@qq.com\Cpp\AddOn\0aaaa4f2f16c46e8964025a5ab0ecc02'
bad = []
for pack in ['behavior_pack_kcH4M5u0', 'resource_pack_t7eJjrxY']:
for dp, dn, fn in os.walk(os.path.join(ROOT, pack)):
for n in fn:
if n.endswith('.json'):
p = os.path.join(dp, n)
try:
with open(p, encoding='utf-8') as f:
json.load(f)
except Exception as e:
bad.append('%s :: %s' % (os.path.relpath(p, ROOT), e))
with open(os.path.join(ROOT, '_sa_hanhua_out', '_tmp', 'json_check.txt'), 'w', encoding='utf-8') as f:
f.write('\n'.join(bad) if bad else 'ALL JSON OK')
print('bad=%d' % len(bad))