Kitaab

Muneem

dev fin clojure

published 2022-11-14 17:26

updated 2023-06-16 20:48

Forest gave me the great idea to run Muneem in Docker with X so that I can have a full GUI Browser to download the new CSV files. These could be copied off container(?) and then ingested through the regular script.


Since I quit my job I've needed to get my finances in order. I haven't been particularly good with money ever (Thanks ADHD?), I figured now is a good time to get on top of it. Being a fan of plain text files, it made sense to do plain text accounting too. I picked beancount since it's written in python and has a pretty web front end.

But that still left me with manually writing each of the transactions at some scheduled interval, and honestly fuck that. I didn't become a programmer to manually do tasks that can be automated by a computer. So I wrote a little script that will do that for me. Unfortunately my bank (like most banks) doesn't have any sort of API, so I'd have to learn some sort of web automation framework to do that. Before I got ahead of myself though, I wrote the importer / categorizer. Handy for me that my bank categorizes most my transactions and helpfully provides a CSV containing the list of all the transactions I had made. I turned this CSV file into a format that beancount can understand through a (poorly written, curses old me!) babashka script, and thus was born Muneem.

Next I had to handle automated downloading of the CSVs, for which I used etaoin which will happily drive chromium/firefox. After a small skirmish with my bank's automated bot login detection, and some shadow-DOM boxing, I was able to automate the download of the CSVs I wanted.

And so Muneem was born. There's still quite some work to do before I trust it (Reconciliation is a bitch), and set it up to be automatic, but at least it's a start. 😁


Backlinks