~gagbo/PyKonta

A Woob -> Beancount data pipeline
0cc141d6 — Gerry Agbobada 3 months ago
Add staticmethod decorator
c181e20e — Gerry Agbobada 3 months ago
Allow finding payees by prefix or suffix

clone

read-only
https://git.sr.ht/~gagbo/PyKonta
read/write
git@git.sr.ht:~gagbo/PyKonta

You can also use your local clone with git send-email.

#Setting up

You can use a simple direnv setup

layout python3

And then use the provided Requirements file to setup an environment.

After this, you need to make a configuration file that can be read into a configuration. An example file will be given once the format stabilizes a bit. The file will be in TOML format (for readability), and read by default to the XDG location.

#Running the app

Until a proper flit packaging is done, running the draft apps is done simply with

python -m konta

and dealing with the help messages

It will look for a configuration file in the common XDG path for a konta program, which must be a TOML file

# In ~/.config/konta/config.toml
[Default]
# Setting the category for unmatched payees.
category = "Expenses:Uncategorized"

[Accounts]
# Woob ID (from woob bank ls) to Beancount account, with a currency to be used as
# commodity for the transaction
"deadbeef0731233" = { name = "Assets:Bank:Checking", default-currency = "EUR" }

[Payees]
# An example of merging multiple payees to be the same name and the same category.
# Both 'name' and 'category' are optional here if you don't want to overwrite them.
"75 MONOP" = { name = "MONOPRIX", category = "Expenses:Food:Supermarché" }
"75 MONOPRIX" = { name = "MONOPRIX", category = "Expenses:Food:Supermarché" }

# Unused for now, but extra verifications can be done if we
# give the main input file, with valid/existing accounts.
# It takes a list of path to beancount input files
[Beans]
input = []

#Roadmap [3/9]

#DONE Add argparse support

#DONE Pull woob configuration with account listing

#TODO Pull woob data from given woob bank backends

Should be done by ignoring the accounts that are not in config

#TODO Create the converter protocol/abstract class to change from woob to beancount

The main goal here is to allow providing custom matchers from the config, probably as python modules that would be provided by the end user. Just like the first Guile version of this tool.

#DONE Read beancount data with category listing

#TODO Allow users to interactively choose categories

That entails building a module that can meaningfully interact with a Config instancea

#TODO Change the tracking id method to allow merging transactions

#TODO Privacy option to hide amounts and optionally banks

Necessary option to be able to start streaming development, either that or the first item

#TODO Find fake woob data to be able to stream