Compare commits

...

3 Commits

Author SHA1 Message Date
Random936
e0bc08ea9a Some more filters for ledger update.jq 2026-06-08 12:48:38 -04:00
Random936
4e6211130f Adding savings account check 2026-05-16 09:50:51 -04:00
Random936
70d20e13ae Updates to leger account regex in jq 2026-05-07 21:57:06 -04:00

View File

@@ -11,11 +11,15 @@ def categorize_transaction:
elif test("ALASKA\\s+AIR") then "Expenses:Travel:Flights" elif test("ALASKA\\s+AIR") then "Expenses:Travel:Flights"
elif test("HELP\\.UBER\\.COMCA") then "Expenses:Travel:Taxi" elif test("HELP\\.UBER\\.COMCA") then "Expenses:Travel:Taxi"
elif test("STEAM GAMES") then "Expenses:Entertainment:Games" elif test("STEAM GAMES") then "Expenses:Entertainment:Games"
elif test("YouTubePremium|DOORDASHDASHPASS|Prime\\s+Video\\s+Channels|TIDAL\\.COM|Amazon Grocery|SIMPLEFIN BRIDGE|(APPLE\\.COM.*RECURRING$)") then "Expenses:Subscriptions" elif test("OLLAMA|YouTubePremium|DOORDASHDASHPASS|Prime\\s+Video\\s+Channels|TIDAL\\.COM|Amazon Grocery|SIMPLEFIN BRIDGE|(APPLE\\.COM.*RECURRING$)") then "Expenses:Subscriptions"
elif test("MOMS OF|SAFEWAY\\.COM|MAYORGA") then "Expenses:Food:Groceries" elif test("MOMS OF|SAFEWAY\\.COM|MAYORGA") then "Expenses:Food:Groceries"
elif test("CHICK-FIL-A|GEMELLIS\\s+ITALIAN|CHIPOTLE|SHEETZ|KUNG\\s+FU\\s+TEA") then "Expenses:Food:Restaurants" elif test("PROJECT GLOW \\(FOOD\\)|SPICELIFE|CHICK-FIL-A|GEMELLIS\\s+ITALIAN|CHIPOTLE|SHEETZ|KUNG\\s+FU\\s+TEA") then "Expenses:Food:Restaurants"
elif test("GRUBHUB|DD\\s+\\*DOORDASH") then "Expenses:Food:Delivery" elif test("GRUBHUB|DD\\s+\\*DOORDASH") then "Expenses:Food:Delivery"
elif test("MARKET@WORK") then "Expenses:Food:Snacks" elif test("MARKET@WORK") then "Expenses:Food:Snacks"
elif test("PROJECT GLOW \\(BEV\\)|NAGADI COFFEE|BLACK LION CAFE") then "Expenses:Luxuries:Drinks"
elif test("PROG SELECT INS") then "Expenses:Auto:Insurance"
elif test("AUTOZONE") then "Expenses:Auto:Maintenance"
elif test("Interest earned") then "Income:Interest"
else "UNKNOWN" end; else "UNKNOWN" end;
def format_transactions: def format_transactions:
@@ -35,9 +39,11 @@ def format_transactions:
def rename_accounts: def rename_accounts:
map(.name |= ( map(.name |= (
if (.| startswith("Adv Plus Banking")) then "Checking" if (.| contains("7778")) then "Checking"
elif (.| startswith("Unlimited Cash Rewards Visa Signature")) then "Credit" elif (.| contains("8704")) then "Assets:Sofi:Checking"
elif (.| startswith("Amazon Prime Rewards Visa Signature")) then "Amazon" elif (.| contains("5809")) then "Credit"
elif (.| contains("3116")) then "Amazon"
elif (.| contains("3013")) then "Savings"
end)); end));
.accounts | rename_accounts | format_transactions[] .accounts | rename_accounts | format_transactions[]