This script imports statements from Privatbank (Приватбанк) client-bank into Gnucash book. Privatbank Autoclient API is described here.
Response fields mapped to gnucash fields:
BPL_REF + '.' + BPL_REFN- Transaction numberDATE_TIME_DAT_OD_TIM_P- Transaction dateBPL_OSND- Transaction descriptionBPL_SUM- Transaction valueAUT_MY_ACCandAUT_CNTR_ACC- Account codes (if account with the given code doen't exist it will be created under the root account withAUT_MY_NAMorAUT_CNTR_NAMas its name respectively)
You need to enable Autoclient in your account as described here.
$ gnc_privat24 --login <login in Privat24> --account <account number> --start <dd.mm.yyyy> [--end <dd.mm.yyyy>] <book.gnucash>On the first run this will ask for autoclients id and token and store them in the keyring.
- Python >= 3.6
- Gnucash with Python bindings (tested with 4.2)
- python-dateutil
- requests
- keyring
- schwifty
On Gentoo Linux you can install all of this by running:
$ sudo emerge -av app-office/gnucash dev-python/python-dateutil dev-python/requests dev-python/keyring
$ pip install --user schwifty