Skip to content
Snippets Groups Projects

Gnucash to Beancount for Fava

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Jon Richter

    This contains instructions on how to convert a GnuCash ledger to Beancount.

    Later on we would like to also convert to HLedger for supporting hledger-sankey.

    Edited
    .python-version 6 B
    .tool-versions 11 B
    README.md 1006 B
    # treasure Bookkeeping and tax accounting Single source of truth is a GnuCash database in the VPN. ## Graphical reports with fava When we save this database as an SQLite file, we can convert it to `beancount` and get nice graphical renderings with `fava`. ### Dependencies - Python <= 3.9 A `.python-version` file for `pyenv` is provided Optional - `asdf` to install `just` ### Installation With pyenv ```sh pyenv local 3.9.18 pip install -r requirements.txt ``` ### Usage With `asdf` ``` asdf plugin add just asdf install just do just run ``` By hand (likely to be outdated over time) ``` gnucash-to-beancount ledger.2024.sqlite3.gnucash > ledger.2024.beancount echo 'option "operating_currency" "EUR"' >> ledger.2024.beancount echo '2016-04-01 custom "fava-option" "show_accounts_with_zero_balance" "False"' >> ledger.2024.beancount echo '2016-04-01 custom "fava-option" "show_accounts_with_zero_transactions" "False"' >> ledger.2024.beancount fava --read-only ledger.2024.beancount ```
    justfile 414 B
    requirements.txt 87 B
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment