Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

convert GnuCash DB to moneyguru format

#337

How about support for migrating from GnuCash to moneyguru?

I have a year and a half of data in GnuCash SQL DB (mysql) and I wanted to see
what it looks like in moneyguru, so I wrote a little ~150 line python
program:

https://bitbucket.org/DanC/quacken/src/7f6743d7bfd0/gctomg.py

It works reasonably well. Share and enjoy.

I found a few cases where moneyguru's format doesn't seem to be as expressive:

log.warn('moneyguru account groups do not nest.')
    log.critical('multi-currency accounts! %s', multi_currency_accounts)
    log.critical('%s accounts named: %s', a[0], a[1])  # i.e. multiple accounts with same name
        log.warn('account: %s type %s converted to moneyguru %s',  # e.g. EQUITY
        log.warn('account type mismatch: %s[%s] in %s[%s]',  # e.g. liability under asset

Reported by Dan Connolly · July 8th, 2012 @ 09:23 AM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Virgil Dupras
    Virgil Dupras
    • Tag set to feature

    That's an interesting script, thanks. I don't know about integrating it into moneyGuru. Could this script support most of GnuCash files? Can GnuCash file be stored in another format than MySQL?

    As for the problems you mention, I have a couple of answers/questions:

    1. See #161 Nested groups
    2. What is a multi-currency account in GnuCash? What does it mean? In moneyGuru, any account can contain any currency. The currency property is there to define how its balance is calculated.
    3. I wonder how GnuCash manages multiple accounts with the same name. It's problematic when the user types in the name of an account to link to a transaction and that this name is ambiguous.
    4. Yeah, lack of an equity type is a shortcoming. See #23 Add an Equity account type. I would convert Equity to Liability rather than Asset. It's a bit more fitting conceptually.
    5. I don't understand how that's a problem with moneyGuru. So in GnuCash we can have a liability account under the Asset group?

    July 8th, 2012 @ 02:10 PM

  2. Dan Connolly
    Dan Connolly
    1. Yes, I eventually found #161 Nested groups. Good to see it's on the list.

    2. In GnuCash, currency is a property of a transaction, not an account. I'm sure that the case where all transactions in an account use the same currency is common; it's certainly the case for me (I only use USD). So my script just warns in case any account has transactions from more than one currency.

    3. In GnuCash, account names are just labels; the real name/identifier is a guid. The two-accounts-with-the-same-name issues happened to me because I have something like Misc. under Housing Expenses and another under, say, Entertainment.

    4. Ah. good to see it's on the list again. And right... after I ran the script, I discovered that Liability would have been the better choice.

    5. Yes, in GnuCash, you can have a liability account under an asset account. e.g. I have an account called Real Estate, and I put both the value of the house and the mortgage; it lets me see my home equity at a glance. It's probably sloppy accounting, and something I could do without.

    Modulo those issue, yes, I think this script handles all GnuCash transactions/accounts/splits,
    provided they're stored in GnuCash's SQL store.

    GnuCash's default storage mode is XML, much like moneyGuru. It would be reasonably straightforward
    to convert using XPath in place of SQL, but I'm not really motivated to do that. (I included
    "DB" in the description of this issue to suggest that converting GnuCash's XML format would be a separate issue.)

    I haven't tried converting budgets. I don't completely understand how moneyGuru's budgeting works yet,
    but my vague sense says that it lacks much of the expressivity of GnuCash budgets. GnuCash lets
    you look at retrospective budget-vs-actual, for example.

    GnuCash also does invoices and various other things that I wouldn't expect to be able to convert to moneyGuru.

    As to integration... I'm not sure what to suggest. Maybe I'll write a blog item and you can
    link to it from an appendix in your documentation. Or maybe just this item in the issues
    list is helpful to some users.

    July 11th, 2012 @ 04:56 AM

  3. Virgil Dupras
    Virgil Dupras

    Regarding 2., moneyGuru works the same way. That's why I'm wondering about the "multi-currency accounts!" warning.

    July 11th, 2012 @ 03:23 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.