From 7544a9facfc6060fe941c171312fd8fd42f4cccb Mon Sep 17 00:00:00 2001 From: Marius Mutu Date: Thu, 23 Apr 2026 09:00:31 +0300 Subject: [PATCH] chore: copy_m6_m8_to_pc2.bat (Tailscale + robocopy), scoate bundle obsolete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PC2 are deja proiectul git, deci prepare_pc2_bundle.py + zip-ul asociat sunt inutile. Le înlocuiesc cu un script robocopy peste admin share Tailscale: copy_m6_m8_to_pc2.bat -> copiază audio/Modul 6-8 pe lenovo-aio-birou (\lenovo-aio-birou\E$\proiecte\nlp-master\...) Resumable (/Z), multithread (/MT:8). Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 2 -- copy_m6_m8_to_pc2.bat | 40 ++++++++++++++++++++++++ prepare_pc2_bundle.py | 73 ------------------------------------------- 3 files changed, 40 insertions(+), 75 deletions(-) create mode 100644 copy_m6_m8_to_pc2.bat delete mode 100644 prepare_pc2_bundle.py diff --git a/.gitignore b/.gitignore index 280ca06..b5594ca 100644 --- a/.gitignore +++ b/.gitignore @@ -43,8 +43,6 @@ __pycache__/ nlp-practitioner/audio/ nlp-practitioner/audio_wav/ -# PC2 bundle (build artifact, regenerable via prepare_pc2_bundle.py) -pc2_bundle.zip # Recon scratch scratch_recon.py diff --git a/copy_m6_m8_to_pc2.bat b/copy_m6_m8_to_pc2.bat new file mode 100644 index 0000000..3b1b338 --- /dev/null +++ b/copy_m6_m8_to_pc2.bat @@ -0,0 +1,40 @@ +@echo off +:: Copiază audio Modul 6/7/8 pe PC2 (lenovo-aio-birou) peste Tailscale. +:: Folosește admin share E$ (default activ pe Windows Pro). +:: Robocopy e resumable (/Z) — dacă pică rețeaua, rerulezi și continuă. +setlocal +cd /d "%~dp0" + +set "PC2=lenovo-aio-birou" +set "DEST=\\%PC2%\E$\proiecte\nlp-master\nlp-practitioner\audio" + +echo ============================================== +echo Copiez audio Modul 6/7/8 -^> %PC2% +echo Destinatie: %DEST% +echo ============================================== + +:: Sanity check — accesibil share-ul? +if not exist "%DEST%" ( + echo. + echo [X] %DEST% nu e accesibil. + echo Verifica: + echo - tailscale status pe PC2 arata online? + echo - File and Printer Sharing activ pe PC2? + echo - Admin share E$ activ ^(net share pe PC2^)? Daca nu, creeaza share manual. + echo - Credentialele de admin local pe PC2 sunt cerute la prima conexiune. + echo. + pause + exit /b 1 +) + +robocopy "nlp-practitioner\audio\Modul 6" "%DEST%\Modul 6" /E /Z /MT:8 /NFL /NDL +robocopy "nlp-practitioner\audio\Modul 7" "%DEST%\Modul 7" /E /Z /MT:8 /NFL /NDL +robocopy "nlp-practitioner\audio\Modul 8" "%DEST%\Modul 8" /E /Z /MT:8 /NFL /NDL + +echo. +echo ============================================== +echo Gata. Verifica pe PC2: +echo dir "E:\proiecte\nlp-master\nlp-practitioner\audio\Modul 6" +echo dir "E:\proiecte\nlp-master\nlp-practitioner\audio\Modul 7" +echo dir "E:\proiecte\nlp-master\nlp-practitioner\audio\Modul 8" +echo ============================================== diff --git a/prepare_pc2_bundle.py b/prepare_pc2_bundle.py deleted file mode 100644 index ed1d61c..0000000 --- a/prepare_pc2_bundle.py +++ /dev/null @@ -1,73 +0,0 @@ -""" -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())