OSadovy / uabean

A set of Beancount importers and scripts for popular Ukrainian banks and more
MIT License
30 stars 4 forks source link
beancount binance interactive-brokers monobank plaintext-accounting privatbank wise

Project generated with PyScaffold

uabean

A set of Beancount importers and scripts for popular Ukrainian banks and more

This repository contains various goodies for Beancount, a text-based double-entry bookkeeping tool for personal finances. To learn more about Beancount, you can start by reading this official getting started guide.

Installation

$ pip install git+https://github.com/osadovy/uabean

Extra scripts are not installed by default. If you want to use them, look into each script docstring to see its dependencies.

Importers

These importers allow you to produce Beancount transactions from exported account statements of various financial institutions:

The importers are created using Beangulp framework. To use them, you need to install this library and reference them from within your importer config file. Each importer requires some configuration to work - usually, the mapping of bank account numbers to Beancount account names. Here isthe sample importer config file that shows configuration options for each importer. To see what kind of files you need as input and where to get them, look into each importer's module docstring.

Downloaders

These automate receiving of account statements to be further processed by importers.

Wise

Requires WISE_API_TOKEN environment variable (details here), as well as presence of wise-private.pem file containing private key registered with Wise for signing SCA requests . See here for instructions how to generate your key and register its public part with Wise.

usage: uabean.downloaders.wise [-h] [--start-date START_DATE] [--end-date END_DATE] [-t {business,personal}]
                               [-f {csv,json}] [-c CURRENCY] [-o OUT_DIR]

options:
  -h, --help            show this help message and exit
  --start-date START_DATE
  --end-date END_DATE
  -t {business,personal}, --account-type {business,personal}
  -f {csv,json}, --format {csv,json}
  -c CURRENCY, --currency CURRENCY
  -o OUT_DIR, --out-dir OUT_DIR```

Example:

$ uabean-wise-downloader --start-date 2023-09-01 -t personal -f json -o downloads/

Monobank

Requires presence of MONOBANK_TOKEN environment variable. Get your token here.

usage: uabean-monobank-downloader [-h] -s START_DATE [-e END_DATE] [-c CURRENCY] [-t ACCOUNT_TYPE] [-o OUTPUT_DIR]

options:
  -h, --help            show this help message and exit
  -s START_DATE, --start-date START_DATE
  -e END_DATE, --end-date END_DATE
  -c CURRENCY, --currency CURRENCY
  -t ACCOUNT_TYPE, --account-type ACCOUNT_TYPE
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR

Example:

$ uabean-monobank-downloader -s 2023-09-01 -o downloads/

Scripts

This directory includes a few useful scripts that I use to speedup my importing process. They are not installed as executables for now, but you can download them and tweak to your liking: