import sys, os, re, json sys.stdout.reconfigure(encoding='utf-8') base_dir = "resources/knowledge/original/원가계산/건설공사_표준품셈" # find all .md files in the subdirectories of base_dir all_md_files = [] for root, dirs, files in os.walk(base_dir): for f in files: if f.endswith('.md') and not f.startswith('_') and '개정사항' not in f and '2026년_건설공사_표준품셈.md' not in f: all_md_files.append(os.path.join(root, f)) print(f"Total MD files in chapters: {len(all_md_files)}") for p in sorted(all_md_files): rel = os.path.relpath(p, base_dir) print(f" - {rel}")