~mcoll/money

A small forth library to track expenses
Add N43.awk
Add filtering to readme
feat: Filtering using awk

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~mcoll/money
read/write
git@git.sr.ht:~mcoll/money

You can also use your local clone with git send-email.

#Money

A small simple forth library to keep track of personal expenses. No frills. Just month by month expenses split into categories.

Easy to extend and hack into.

#Usage

Create a expenses.fth file and add

INCLUDE money.fth

MAY MONTH
   200000   NONE   s" Salary"  REC
END

JUN MONTH
   200000   NONE   s" Salary"  REC 
  -100000   ESS    s" Car"     REC
  -3480     ESS    s" Food"    REC
  -9280     HOBBY  s" SICP"    REC
END

BYE

Then you can run make or gforth expenses.fth and you'll get something like

MAY
NET GAIN: 2000.00e

EXPENSES
     NONE: 2000.00e
      ESS: 0.00e
    HOBBY: 0.00e
  EAT-OUT: 0.00e
   SAVING: 0.00e

JUNE
NET GAIN: 872.40e

EXPENSES
     NONE: 4000.00e
      ESS: -1034.80e
    HOBBY: -92.80e
  EAT-OUT: 0.00e
   SAVING: 0.00e

#Filtering

You can filter by using the make filter command. For example

$ make filter name=IKEA

[marcecoll@nixos:~/expenses]$ make filter name=IKEA
awk -f filter.awk -v FILTER=IKEA expenses.fth | gforth -e 'quit'

INCLUDE money.fth  ok
MAY MONTH  ok 3
  -14453    ESS     s" IKEA"        REC  ok 3
END MAY
NET GAIN: -144.53e

EXPENSES
   INCOME: 0.00e
      ESS: -144.53e
    HOBBY: 0.00e
  EAT-OUT: 0.00e
   TRAVEL: 0.00e
     GIFT: 0.00e
   SAVING: 0.00e

 ok
JUN MONTH  ok 3
END JUNE
NET GAIN: 0.00e

EXPENSES
   INCOME: 0.00e
      ESS: 0.00e
    HOBBY: 0.00e
  EAT-OUT: 0.00e
   TRAVEL: 0.00e
     GIFT: 0.00e
   SAVING: 0.00e

 ok
BYE

#Norma43

Norma 43 is a spanish standard for bank history. The n43.awk script takes a N43 file and converts it into the format that money.fth expects.