- audio/Modul {N}/filename.mp3 — fiecare modul în subdirector separat
pentru copiere pe telefon și transfer între PC-uri.
- PDF-urile se păstrează ca sursă în summaries/pdf/ (fără extract txt).
- transcribe_status="pdf_source_only" pentru lecțiile PDF → summarize.py
le filtrează automat.
- Fix coliziune manifest transcript_path (stem-based, nu preserve prior).
- .bat per modul (M2-M8) + dispatchers run_pc1_all (M2-M5) + run_pc2_all
(M6-M8) pentru partajare work pe 2 PC-uri.
- prepare_pc2_bundle.py: zip cu scripts + manifest + .env + PDFs pentru
PC2 (self-installs whisper.cpp/model/ffmpeg la primul run).
- M1 whisper complete (49/49 audio+vimeo transcrise).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
74 lines
2.1 KiB
Python
74 lines
2.1 KiB
Python
"""
|
|
Create a zip bundle for PC2 (runs M6-M8 transcription).
|
|
Includes: scripts, manifest, credentials, docs. Excludes: large files.
|
|
|
|
After unzipping on PC2:
|
|
1. Copy audio/Modul 6/, audio/Modul 7/, audio/Modul 8/ from PC1 into the
|
|
same relative path on PC2.
|
|
2. Run run_pc2_all.bat (auto-installs whisper.cpp + model + ffmpeg).
|
|
|
|
Usage: .venv/Scripts/python.exe prepare_pc2_bundle.py
|
|
Output: pc2_bundle.zip in current directory.
|
|
"""
|
|
import sys
|
|
import zipfile
|
|
from pathlib import Path
|
|
|
|
sys.stdout.reconfigure(encoding="utf-8")
|
|
|
|
FILES = [
|
|
"download.py",
|
|
"transcribe.py",
|
|
"summarize.py",
|
|
"courses.py",
|
|
"setup_whisper.py",
|
|
"md_to_pdf.py",
|
|
"retranscribe_tail.py",
|
|
"requirements.txt",
|
|
".env",
|
|
"CLAUDE.md",
|
|
"run.bat",
|
|
"run_practitioner.bat",
|
|
"run_practitioner_M6.bat",
|
|
"run_practitioner_M7.bat",
|
|
"run_practitioner_M8.bat",
|
|
"run_pc2_all.bat",
|
|
"nlp-practitioner/manifest.json",
|
|
]
|
|
|
|
OUT = Path("pc2_bundle.zip")
|
|
|
|
def main():
|
|
root = Path(".").resolve()
|
|
missing = [f for f in FILES if not (root / f).exists()]
|
|
if missing:
|
|
print("MISSING files, aborting:")
|
|
for f in missing:
|
|
print(f" {f}")
|
|
return 1
|
|
|
|
with zipfile.ZipFile(OUT, "w", zipfile.ZIP_DEFLATED) as zf:
|
|
for f in FILES:
|
|
zf.write(root / f, arcname=f)
|
|
print(f" added: {f}")
|
|
|
|
# Include PDF sources (user may want them on PC2 too, 7 MB total)
|
|
pdf_dir = root / "nlp-practitioner" / "summaries" / "pdf"
|
|
if pdf_dir.exists():
|
|
for pdf in sorted(pdf_dir.glob("*.pdf")):
|
|
arc = pdf.relative_to(root).as_posix()
|
|
zf.write(pdf, arcname=arc)
|
|
print(f" added: {arc}")
|
|
|
|
size_mb = OUT.stat().st_size / 1_048_576
|
|
print(f"\nCreated {OUT} ({size_mb:.1f} MB)")
|
|
print(f"\nNext:")
|
|
print(f" 1. Copy {OUT.name} to PC2")
|
|
print(f" 2. On PC2: extract to a folder (e.g. D:/nlp-master)")
|
|
print(f" 3. Copy audio/Modul 6/, audio/Modul 7/, audio/Modul 8/ from PC1")
|
|
print(f" 4. Run: run_pc2_all.bat")
|
|
return 0
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|