Files
FargoImport/fargo.bat
2026-03-22 23:39:52 -04:00

35 lines
943 B
Batchfile

@echo off
:: ============================================================
:: FargoImport - run.bat
:: Runs main.py using the project's virtual environment.
::
:: Usage examples:
::
:: Credit only:
:: run.bat --credit fetch.dat
::
:: Debit only:
:: run.bat --debit fetch.dat
::
:: Both at once and import to YNAB:
:: run.bat --credit credit.dat --debit debit.dat --ynab-import
::
:: List YNAB transactions from the past 7 days:
:: run.bat --ynab-transactions 7
::
:: Increase lookback window to 7 days:
:: run.bat --credit credit.dat --debit debit.dat --lookback 7
:: ============================================================
:: Change to the folder this .bat file lives in
cd /d "%~dp0"
:: Activate the virtual environment
call .venv\Scripts\activate.bat
:: Run main.py, forwarding all arguments passed to this script
python main.py %*
:: Keep the window open so you can read the output
pause