Windows-Unterstützung: .bat-Skripte, Font-Werkzeuge in Python

- libs/glyphextract.py ersetzt die grep/sed/bc-Logik von extract-glyph.sh,
  extract-font.sh und fonttest.sh (die .sh rufen es nur noch auf);
  schreibt FONTNAME= und <font>.cfg nach $PICCREATE_OUT
- bin/*.bat: setenv, piccreate, svgconvert, webscan, extract-glyph,
  extract-font, fonttest, setup-venv; .gitattributes für CRLF
- piccreate.py: Hintergrund als file:// URL (Windows-Pfade)
- svgconvert.py: magick statt convert, Configs/CSV als UTF-8
- webscan.py: Installationshinweise für Windows
- doc/README.md: Abschnitt Windows, Font-Werkzeuge aktualisiert

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael Stangl
2026-10-09 09:29:02 +02:00
co-authored by Claude Opus 5.5
parent 4897883938
commit 29c066b45a
18 changed files with 471 additions and 209 deletions
+47
View File
@@ -0,0 +1,47 @@
@echo off
rem ================================================================
rem PICCREATE - Python Virtual Environment einrichten (Windows)
rem ================================================================
setlocal
rem nicht das Python aus einer alten .venv nehmen
set "PICCREATE_PYTHON="
if exist "%~dp0..\.venv\Scripts\python.exe" goto :installed
rem Python fuer das Anlegen der .venv suchen
for /f "delims=" %%P in ('py -3 -c "import sys; print(sys.executable)" 2^>nul') do set "PICCREATE_PYTHON=%%P"
if not defined PICCREATE_PYTHON for /f "delims=" %%P in ('python -c "import sys; print(sys.executable)" 2^>nul') do set "PICCREATE_PYTHON=%%P"
if not defined PICCREATE_PYTHON (
echo Python 3 nicht gefunden. Bitte installieren von https://www.python.org
echo oder mit: winget install Python.Python.3.13
exit /b 1
)
call "%~dp0setenv.bat" || exit /b 1
echo Initialisiere Python virtual environment...
"%PICCREATE_PYTHON%" -m venv "%PICCREATE%\.venv" --upgrade-deps
if errorlevel 1 (
rmdir /s /q "%PICCREATE%\.venv" 2>nul
echo Fehlgeschlagen.
exit /b 1
)
echo Erfolgreich.
echo Installiere erforderliche Python Packages...
"%PICCREATE%\.venv\Scripts\pip" install -r "%PICCREATE%\requirements.txt" -q || exit /b 1
echo Erfolgreich.
goto :browser
:installed
call "%~dp0setenv.bat" || exit /b 1
echo Erforderliche Python Packages bereits installiert!
:browser
rem Browser fuer webscan
if exist "%LOCALAPPDATA%\ms-playwright\chromium*" (
echo Playwright Browser bereits installiert!
exit /b 0
)
echo Installiere Playwright Browser...
"%PICCREATE%\.venv\Scripts\playwright" install chromium || exit /b 1
echo Erfolgreich.
exit /b 0