From 1e57e56643a72b4376eaedb4595444395ce98cb6 Mon Sep 17 00:00:00 2001 From: jerem Date: Sat, 13 Jun 2026 14:54:15 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20lanceur=20Windows=20(run.bat)=20et?= =?UTF-8?q?=20doc=20associ=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++++++- run.bat | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 run.bat diff --git a/README.md b/README.md index 2ad9caf..08d30d2 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,19 @@ Petit outil local pour constituer un fichier CSV de prospects (bars, restaurants ## Lancement +**macOS / Linux :** + ```bash ./run.sh ``` -La première fois, l'installation prend quelques minutes. Ensuite le serveur démarre et l'interface s'ouvre dans votre navigateur sur http://127.0.0.1:5000. Arrêt : `Ctrl-C` dans le terminal. +**Windows** (Python 3.11+ installé avec l'option « Add python.exe to PATH ») : + +```bat +run.bat +``` + +La première fois, l'installation prend quelques minutes (environnement Python + téléchargement de Chromium). Ensuite le serveur démarre et l'interface s'ouvre dans votre navigateur sur http://127.0.0.1:5000. Arrêt : `Ctrl-C` dans le terminal. ## Utilisation diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..44af2a0 --- /dev/null +++ b/run.bat @@ -0,0 +1,22 @@ +@echo off +setlocal +chcp 65001 >nul +cd /d "%~dp0" + +REM Utilise le lanceur "py" s'il existe (recommande), sinon "python" du PATH +where py >nul 2>nul +if %errorlevel%==0 ( + set "PY=py -3" +) else ( + set "PY=python" +) + +if not exist .venv ( + echo Premiere installation ^(environnement Python + Chromium^), patientez quelques minutes... + %PY% -m venv .venv + .venv\Scripts\python.exe -m pip install --upgrade pip + .venv\Scripts\python.exe -m pip install -r requirements.txt + .venv\Scripts\python.exe -m playwright install chromium +) + +.venv\Scripts\python.exe app.py