Transferring data between two Gnucash files

Jesse C crimson.corelio at gmail.com
Sun Jan 8 16:18:05 EST 2012


My wife and I both use Gnucash to keep track of our finances, in separate
Gnucash files.  There are some expenses that one of us incurs which are
shared expenses, that the other person is liable for a portion of (usually
half).  Currently all transfer of these expenses is done manually, by
exporting a report that contains the expenses, which the other person then
has to enter by hand.  That's a lot of work and it sucks.  So I'm looking
for a better way to accomplish this.

It is easy to export the list of transactions to be transferred as a html
file and it is simple to parse the html and obtain a programmatic
representation of the data (my languages of choice are Java and Scala, but
python, php, lua, etc. are also options, though I don't have any scheme
experience).  But once I have that programmatic representation of the data,
I don't know what to do with it.  What sort of file can I write that will
allow me to import transactions, complete with account information, into
gnucash/  I've never used the QIF or OFX functionality in Gnucash, so I'm
not sure if one of those would be answer.

part of me wants to just switch to the SQL backend and stuff the data in
there, but from reading on the wiki this sounds like a terrible idea.

To present a quick example:

I have a Rent transaction, for a month where I paid the entire amount.

(Asset Account) Wife A/L:Shared Expenses:Owed To Me:Housing:Rent  +50
(Asset Account) Assets:Current Assets:Checking Account   -100
(Expense Account) Expenses:Rent   +50

I then export the entire Wife A/L:Shared Expenses account to a report
file.  I'd then like to write some new file that she can import which will
contain the following transaction

(Liability Account) Husband A/L:Shared Expenses:Owed to Him:Merged  +50
(Expense Account) Expenses:Housing:Rent  +50

I'm not opposed to doing some development work to solve this problem, but
some direction would be great.  Thanks for any help.

cheers,

jesse


More information about the gnucash-user mailing list