✨feature: Add windows batch file, add support for xlsx output
This commit is contained in:
17
print-estimate.bat
Normal file
17
print-estimate.bat
Normal 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%
|
||||
Reference in New Issue
Block a user