feature: Add windows batch file, add support for xlsx output

This commit is contained in:
Keith Solomon
2025-12-07 17:31:43 -06:00
parent 4bd45bf2de
commit 26fa801aca
5 changed files with 211 additions and 14 deletions

17
print-estimate.bat Normal file
View File

@@ -0,0 +1,17 @@
@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%