Bangkok Bank (BKK) plugin for ofxstatement.
This tool converts Bangkok Bank CSV export files into OFX format, suitable for importing into GnuCash, Microsoft Money, or other personal finance software.
If you simply want to use the plugin, install it directly from the source:
pip3 install --user .
To set up a development environment to modify the code or run tests:
# Install in editable mode
pip3 install --user -e .
# Install build/test dependencies
pip3 install build pytest mypy
(Note: If you prefer pipenv, you can still use pipenv sync --dev and pipenv shell as configured in the Pipfile.)
After installation, configure ofxstatement to use this plugin. Add the following section to your configuration file (usually located at ~/.config/ofxstatement/config.ini):
[bkk]
plugin = bkk
# The BKK CSV usually comes in UTF-8, but if you have issues,
# you can specify the encoding here.
# encoding = utf-8
Download your transaction history from Bangkok Bank Online Banking as a CSV file.
Run the ofxstatement tool:
ofxstatement convert -t bkk BKK_Export.csv statement.ofx
Import the resulting statement.ofx file into GnuCash or your preferred finance software.
This project uses pyproject.toml for dependency management.
This project uses pytest and a Makefile for convenience. The test suite includes an iterative runner that checks all CSV files found in the tests/ directory.
make test
To build a distributable wheel:
python3 -m build
If you encounter a transaction type that causes a crash or is not parsed correctly:
- Obfuscate your data: Do not upload raw financial statements to GitHub.