`categorize_data` is the new entry for data categorization and receives a DBManager. Contains the categorizing logic. Categorizer configuration now done solely from categories.yaml file. Ancilliary database methods added to DBManager required for categorizing transactions. Adds categorize to command line options. Removes obsolete restart options and method from runnable.py. Fixes parse and categorize method, now take cmd line arguments and `DBManager`. Removes obsolete tools.py, all functions already rewritten in relevant modules. Updated categories.yaml with new keys.
66 lines
721 B
YAML
66 lines
721 B
YAML
Income1:
|
|
regex:
|
|
- company A
|
|
|
|
Income2:
|
|
regex:
|
|
- transfer
|
|
banks:
|
|
- BankA
|
|
|
|
Income3:
|
|
regex:
|
|
- company B
|
|
|
|
Commute:
|
|
regex:
|
|
- uber
|
|
regular:
|
|
- [train, 50]
|
|
|
|
Utilities:
|
|
regex:
|
|
- electricity
|
|
regular:
|
|
- [water]
|
|
- [internet, 30.5]
|
|
|
|
Groceries:
|
|
regex:
|
|
- lidl
|
|
- e.leclerc
|
|
- aldi
|
|
|
|
Eating Out:
|
|
regex:
|
|
- restaurant 1
|
|
- restaurant 2
|
|
|
|
Entertainment:
|
|
regex:
|
|
- cinema
|
|
- steam
|
|
|
|
Pets:
|
|
|
|
Medical:
|
|
regex:
|
|
- hospital
|
|
- pharmacy
|
|
|
|
Miscellaneous:
|
|
|
|
Travel:
|
|
regex:
|
|
- ryanair
|
|
- easyjet
|
|
- airbnb
|
|
negative_regex:
|
|
- Commute
|
|
- Utilities
|
|
|
|
date_fmt: "%Y-%m-%d"
|
|
dates:
|
|
- ["2019-12-23", "2020-01-02"]
|
|
- ["2020-07-01", "2020-07-30"]
|