Files
2nd/scratch/find_refined_placeholders.py
T

31 lines
888 B
Python

import os
import re
base_path = r'E:\Wiki\2nd\10_Wiki\Topics'
placeholder_patterns = [
r'> 지식 요약 작업 중',
r'> 지식 요약 정보 추출 중',
r'본문 구조화 작업 중'
]
found_files = []
for root, dirs, files in os.walk(base_path):
for f in files:
if f.endswith('.md'):
file_path = os.path.join(root, f)
if len(file_path) > 240: continue
try:
with open(file_path, 'r', encoding='utf-8', errors='ignore') as f_obj:
content = f_obj.read()
matches = [re.search(p, content) for p in placeholder_patterns]
if any(matches):
found_files.append(file_path)
except:
pass
print(f"Found {len(found_files)} specific placeholder files.")
for f in found_files:
print(f"{f}")