Note: This project is not very active but as of late 2025 it is still working correctly and the result is compatible with the most recent Beancount version at that time.
Convert your Gnucash Sqlite3 file to a Beancount text ledger.
Requires Python 3.3+
pip install gnucash-to-beancountNote: if your GnuCash ledger is in XML format you need to convert it to SQLite first, which you can do with File → Save As in GnuCash. Choose sqlite3 as "Data Format". If the option does not exist you may need to install some dependencies, check the GnuCash documentation e.g. under Ubuntu 24.04 the packages libdbi1 and libdbd-sqlite3 are required.
gnucash-to-beancount my-ledger.gnucash > my-ledger.beancountgit clone https://github.com/henriquebastos/gnucash-to-beancount.git
cd gnucash-to-beancount
python -m venv -p python3.6 .venv
source .venv/bin/activate
python setup.py develop
./test.shThe tests are still primitives using diff with golden files. If test.sh shows nothing, all is good. :)
If test.sh shows errors where dates are off by one, try using test-west.sh instead.
This version supports:
- Accounts
- Transactions and it's Splits
- Commodities
- Prices
Unsupported features:
- Lots
- Budget
- Scheduled Transactions
- All Business entities
- Key Value metadata
You may help improve this project by providing a sample Gnucash Sqlite3 file that uses one or more unsupported features.
Copyright (C) 2017 Henrique Bastos.
This code is distributed under the terms of the "GNU GPLv2 only". See LICENSE file for details.