1ac17b95e2
- validate_anlage.py (+ bin-Wrapper): Pruefung vor der SCL fuer beide Wege (Struktur, Zuordnungen, Aktualitaet der JSON, Korrekturen ohne Ziel); scl_skeleton ruft sie auf (Warnung, --strict bricht ab) - DerivedTro.key: stabiler Schluessel (ID der ID-Datei); hw_overrides.ini, <csv>_jam_names.ini und tro_overrides.ini greifen ueber ID oder Schluessel, eine Umbenennung in TRO_EDIT laesst sie bestehen; JAM_AREA traegt KEY - --read-tros liest die CONNECTION_ARROW-Bloecke mit -> [<csv>.edit_connections]; tro_flow.apply_connection_edits wendet sie nach link_tros an - tro_annotate --anlage zeichnet Marker/Verbindungen aus der Anlagen-JSON - INI-Korrekturen auch mit BOM lesbar (utf-8-sig) - Ablauf CSV/DXF+TIA -> Anlagen-JSON -> (BricsCAD) -> SCL in doc/Python_Scripts.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.0 KiB
Batchfile
31 lines
1.0 KiB
Batchfile
@echo off
|
|
REM ================================================================
|
|
REM SPS_SKEL - Anlagen-JSON pruefen, bevor daraus SCL wird
|
|
REM ================================================================
|
|
REM Aufruf:
|
|
REM bin\validate_anlage.bat --json mubea_anlage.json
|
|
REM bin\validate_anlage.bat --json dematic_merge_anlage.json --strict
|
|
REM
|
|
REM Die JSON wird in %SKEL_RESULTS% gesucht. Exit-Code 0 = bereit,
|
|
REM 5 = nicht bereit (Fehler; mit --strict auch Warnungen).
|
|
REM ================================================================
|
|
|
|
setlocal
|
|
|
|
REM Umgebung setzen (SKEL_DATA, SKEL_RESULTS, SKEL_LIB, PYTHONPATH ...)
|
|
call "%~dp0setenv.bat" >nul
|
|
|
|
REM Virtuelle Umgebung nutzen, falls vorhanden (pydantic wird benoetigt)
|
|
if exist "%SPS_SKEL%\.venv\Scripts\activate.bat" (
|
|
call "%SPS_SKEL%\.venv\Scripts\activate.bat"
|
|
)
|
|
|
|
REM Python-Interpreter bestimmen (py-Launcher bevorzugt, sonst python)
|
|
set "PY=py"
|
|
py --version >nul 2>&1 || set "PY=python"
|
|
|
|
"%PY%" "%SKEL_LIB%\validate_anlage.py" %*
|
|
set "RC=%ERRORLEVEL%"
|
|
|
|
endlocal & exit /b %RC%
|