18 lines
575 B
Batchfile
18 lines
575 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
:: Location of the project (adjust if you move the repo)
|
|
set "PROJECT_DIR=C:\Users\ksolo\Projects\3D Print Estimator"
|
|
set "PY_SCRIPT=%PROJECT_DIR%\estimator.py"
|
|
set "CONFIG=%PROJECT_DIR%\printer-config.json"
|
|
|
|
:: First arg = output format (csv/json/xlsx), default to csv if omitted
|
|
set "FMT=%~1"
|
|
if "%FMT%"=="" set "FMT=csv"
|
|
|
|
:: Second arg = optional output path. Only pass --out when provided to avoid argparse errors.
|
|
set "OUT_ARG="
|
|
if not "%~2"=="" set "OUT_ARG=--out \"%~2\""
|
|
|
|
python "%PY_SCRIPT%" --config "%CONFIG%" --output-format "%FMT%" %OUT_ARG%
|