DB_JOB/작업파일/_collect_targets.py
hehihoho3 b0acd1e705 백업: 셀병합 정상화(D~J)+KDHC 옵션2/행높이17, 오늘(06-21) 제출 17곳 검수·압축
- 공공기관2/3 작업본 + 오늘 제출 17곳 D~J 카테고리 셀병합 정상화
- 한국지역난방공사 옵션2(고아셀 F98 수정)+전행 높이17
- 제출_프리랜서2_2026-06-21.zip 생성(17개 xlsx, 2,468행)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 13:21:26 +09:00

27 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
import os, io, json
ROOT=r"D:\01.프로젝트\DB수집"
SKIP_DIR={"_backup","backup","_temp","_스크립트","_nshots","_naudit","_shots",".git","_gnb","__pycache__"}
def skipname(b):
bl=b.lower()
if b.startswith("~$"): return True
if "backup" in bl or "conflicted" in bl: return True
for s in ("_작업현황","작업현황","_취합","취합본","예시","자료_취합","교육청_작업현황"):
if s in b: return True
return b.startswith("_")
work=[]; sub=[]; other=[]
for dp,dn,fn in os.walk(ROOT):
dn[:]=[d for d in dn if d not in SKIP_DIR and "backup" not in d.lower()]
for f in fn:
if not f.endswith(".xlsx"): continue
if skipname(f): continue
p=os.path.join(dp,f)
rel=os.path.relpath(p,ROOT)
if "제출폴더" in rel: sub.append(rel)
elif "참고파일" in rel: other.append(rel)
else: work.append(rel)
io.open(r"D:\01.프로젝트\DB수집\작업파일\_targets.json","w",encoding="utf-8").write(json.dumps({"work":work,"sub":sub,"other":other},ensure_ascii=False,indent=0))
print("WORK",len(work),"SUB",len(sub),"OTHER",len(other))
print("\n--- WORK (기존문서) ---")
for x in work: print(" ",x)