Spaces:
Sleeping
Sleeping
Add German rulebook PDFs and recursive PDF discovery in build_index
Browse files- 4 German PDFs (Rulebook, Zone Survival, Addon D&F, Mission Guide)
- build_index.py now walks subdirectories (de_files/) recursively
- Index rebuilt: 904 chunks total (380 EN + 524 DE)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Files changed (5)
123version https://git-lfs.github.com/spec/v1oid sha256:ac4a7b64a348f30008291c4579ad8f8e2c1aa66b9d9905427ca14a472b034d30size 15761315123version https://git-lfs.github.com/spec/v1oid sha256:5f5b5f79ee58882e78aacbedd8c3868a77b2577b6ede7e5d2b2ed7cf37e33191size 15076798123version https://git-lfs.github.com/spec/v1oid sha256:da45ec4cc6177abb2c57d4e795f775830088101b820287327b935fd7bc4cc85esize 13728651123version https://git-lfs.github.com/spec/v1oid sha256:e562d53edc22af2dd06bbc7228b1fc1c790e4d69ca99f5f708a068da3cbef4d5size 2346323422 unmodified lines232425262627282930313233343536373833343539404142434422 unmodified lines if not os.path.isdir(game_dir): raise FileNotFoundError(f"Kein Datenverzeichnis: {game_dir}")
pdf_files = [f for f in sorted(os.listdir(game_dir)) if f.endswith(".pdf")] # PDFs rekursiv finden (inkl. Unterordner wie de_files/) pdf_files = [] for root, _dirs, files in os.walk(game_dir): for f in sorted(files): if f.endswith(".pdf"): pdf_files.append(os.path.join(root, f))
if not pdf_files: raise FileNotFoundError(f"Keine PDFs in {game_dir}")
print(f"Verarbeite {len(pdf_files)} PDFs für '{game}'...\n")
all_chunks = [] for filename in pdf_files: pdf_path = os.path.join(game_dir, filename) print(f" 📄 {filename}") for pdf_path in pdf_files: rel_path = os.path.relpath(pdf_path, game_dir) print(f" 📄 {rel_path}") chunks = parse_pdf(pdf_path, game) print(f" → {len(chunks)} Chunks") all_chunks.extend(chunks)data/raw/stalker/de_files/DE_STALKER_Addon_D&F.pdfAdded+3
data/raw/stalker/de_files/DE_STALKER_Rulebook.pdfAdded+3
data/raw/stalker/de_files/DE_STALKER_SG_Mission_Guide.pdfAdded+3
data/raw/stalker/de_files/DE_STALKER_Zone Survival.pdfAdded+3
scripts/build_index.py+10-4