import from GnuCash and bank?

280 views
Skip to first unread message

email...@gmail.com

unread,
Jan 19, 2013, 5:33:52 AM1/19/13
to hle...@googlegroups.com
Is there any way to import my GnuCash transaction data into hledger?  How about transaction data from my bank's website?

- Grant

Joachim Breitner

unread,
Jan 19, 2013, 12:33:43 PM1/19/13
to hle...@googlegroups.com
HI,

Am Samstag, den 19.01.2013, 02:33 -0800 schrieb email...@gmail.com:
> Is there any way to import my GnuCash transaction data into hledger?

not with hledger directly, but ledger can read the GnuCash file format:
$ zcat ~/gnucash/privat.xac | ledger -f - print

I had to manually edit the resulting file, because the templates for
recurring transactions appear there, but otherwise it works well. I use
gnucash for editing and online banking, but now I can use hledger to run
reports against my data:
http://www.joachim-breitner.de/blog/archives/573-Calculating-the-internal-rate-of-return-with-hledger.html

> How about transaction data from my bank's website?

If it is in CSV format, supposedly there is a way. I use the detour via
GnuCash and HBCI online banking.

Greetings,
Joachim
--
Joachim "nomeata" Breitner
ma...@joachim-breitner.de | nom...@debian.org | GPG: 0x4743206C
xmpp: nom...@joachim-breitner.de | http://www.joachim-breitner.de/

signature.asc

Simon Michael

unread,
Jan 19, 2013, 1:27:58 PM1/19/13
to hle...@googlegroups.com
On Sat, Jan 19, 2013, at 09:33 AM, Joachim Breitner wrote:
> not with hledger directly, but ledger can read the GnuCash file format:
> $ zcat ~/gnucash/privat.xac | ledger -f - print

Thanks for the concrete example. I've always wanted to (re)learn how to
do this.

My old gnucash files have .gnucash suffix and look like:

$ head accounts2007.gnucash
<?xml version="1.0" encoding="utf-8" ?>
<gnc-v2
xmlns:gnc="http://www.gnucash.org/XML/gnc"

My ledger version is 3.0.0-20110325, and it gives no output or error
when I try to print the .gnucash file. Are you using 2.6 ?

Grant: the other way to get bank data into hledger is to convert their
CSV, which is how I do it. See
http://hledger.org/MANUAL.html#other-file-formats .

email...@gmail.com

unread,
Jan 19, 2013, 2:13:19 PM1/19/13
to hle...@googlegroups.com

> not with hledger directly, but ledger can read the GnuCash file format:
> $ zcat ~/gnucash/privat.xac | ledger -f - print

Thanks for the concrete example. I've always wanted to (re)learn how to
do this.

Here is some more info:


Grant: the other way to get bank data into hledger is to convert their
CSV, which is how I do it. See
http://hledger.org/MANUAL.html#other-file-formats .

Thanks that looks easy.  Can the importation be done via the web interface or only via the command line?  I'm trying to figure out if I can have people use hledger who aren't computer savvy.

What else do you think I might miss if I switch from gnucash to hledger?

- Grant

Simon Michael

unread,
Jan 19, 2013, 2:30:02 PM1/19/13
to hle...@googlegroups.com
On Sat, Jan 19, 2013, at 11:13 AM, email...@gmail.com wrote:
Thanks that looks easy.  Can the importation be done via the web interface or only via the command line?  I'm trying to figure out if I can have people use hledger who aren't computer savvy.
 
What else do you think I might miss if I switch from gnucash to hledger?
 
Currently CSV conversion must be done on the command-line, and it requires a bit of care (checking the conversion, updating the conversion rules, merging only the new entries into your journal file). It wouldn't be fun for someone not computer savvy.
 
Other things - reviewing account history, entering simple transactions one at a time, even editing the journal and adding more complex transactions via text edit - are I think reasonably easy via the web interface. There is also the command line add command http://hledger.org/MANUAL.html#add which may work in some situations.
 
Other things you might miss from Gnucash ? Perhaps: the more polished UI especially for add/edit; the reconcile wizard;  built-in reports and charts; direct connection to online banks, if you got that working.
 
Ideally you could keep using Gnucash and also read (and even write) it's data with hledger. That's an important goal, it just needs someone to do or fund it.
 

Joachim Breitner

unread,
Jan 19, 2013, 4:11:46 PM1/19/13
to hle...@googlegroups.com
Hi,

Am Samstag, den 19.01.2013, 10:27 -0800 schrieb Simon Michael:
> On Sat, Jan 19, 2013, at 09:33 AM, Joachim Breitner wrote:
> > not with hledger directly, but ledger can read the GnuCash file format:
> > $ zcat ~/gnucash/privat.xac | ledger -f - print
>
> Thanks for the concrete example. I've always wanted to (re)learn how to
> do this.
>
> My old gnucash files have .gnucash suffix and look like:
>
> $ head accounts2007.gnucash
> <?xml version="1.0" encoding="utf-8" ?>
> <gnc-v2
> xmlns:gnc="http://www.gnucash.org/XML/gnc"
>
> My ledger version is 3.0.0-20110325, and it gives no output or error
> when I try to print the .gnucash file. Are you using 2.6 ?

Yes:
$ ledger --version
Ledger 2.6.2, the command-line accounting tool

I somewhere read that ledger version 3 does not support the GnuCash file
format any more, according to http://lwn.net/Articles/501681/
signature.asc
Reply all
Reply to author
Forward
0 new messages