How To Do My Own Transaction Matching

Michael Iles michael.iles at gmail.com
Mon Dec 9 15:04:36 EST 2013


I would like to be able to do my own transaction matching and I'm
looking for advice on the easiest way to do it.

(I find that with the built-in Bayesian matching I still have to
inspect every match, many matches aren't automatically made, sometimes
the matching history gets lost and I have to start over, etc.)

My goal is to automate all of the regular transactions that happen in
my account, using heuristics like: (1) if a transaction labeled
'insurance' is in one range then it's my car insurance, if it's in a
different range then it's home insurance; (2) utility bills usually
have extra numbers so I would look for substrings to match them; etc.

(Aside: in my opinion, the perfect system for GnuCash would be the
ability to provide a list of regular expressions, along with the
destination account to use if the regex matches.)

I'm using GnuCash 2.4.13 on OS X, with the XML data store. My
transactions are coming into GnuCash via QFX files.

My first thought was to use script bindings. I prefer Ruby so I found
the 'gnucash' gem [1] but quickly realized that it was read-only.

I then looked at the Python bindings [2] but it's not clear to me how
to set them up. (Do I need to build GnuCash from source? Do they work
on the 2.4 stream?)

I then thought that I could parse the QFX and generate QIF files that
have both source and destination accounts... I haven't tried this yet,
but at first glance I'm not sure that QIF files support both source
and destination accounts.

(Another aside: it would be wonderful if GnuCash implemented a custom
"GnuCash Import" file format that allowed all aspects of a transaction
to be specified, including source and destination account.)

So now I'm not sure what the best approach is:

1. Would the QIF approach work?
2. Are the Python bindings easy to get working?
3. Should I move to 2.5?
4. Should I move to a SQL data store? I understand that I couldn't
write directly to the DB, but is there a DB client library that would
allow me to script against the DB?
5. Other bindings I should look at? (Scheme? Guile?)

Any advice appreciated.

Thanks,
Mike



[1] http://rubydoc.info/github/holtrop/ruby-gnucash/Gnucash
[2] http://wiki.gnucash.org/wiki/Python_Bindings


More information about the gnucash-user mailing list