From 2a2260cda72c11bc43b20c16f1a5e91f99b9dfe6 Mon Sep 17 00:00:00 2001 From: Ryan Kegel Date: Sun, 22 Mar 2026 23:39:52 -0400 Subject: [PATCH] added batch file. --- .gitignore | 4 ++++ fargo.bat | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 fargo.bat diff --git a/.gitignore b/.gitignore index 82f0c3a..5f424d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ /data/ +*.dat +*.json +/ynab.yml +/.venv/ diff --git a/fargo.bat b/fargo.bat new file mode 100644 index 0000000..d72a4fb --- /dev/null +++ b/fargo.bat @@ -0,0 +1,34 @@ +@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