Gnucash to Beancount for Fava
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
.
# 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
```
Please register or sign in to comment