>For people that mention software like Ledger, Excel and Google Sheets to do their accounting, what do you do to make sure you don't accidentally delete/duplicate/edit a transaction and how do you import the latest transactions in an automated way?
My general workflow is:
1. Pull tx data from bank websites, mostly via some hacky web browser automation scripts which log in and download the appropriate QFX/CSV.
2. Run `bean-extract [args] && bean-file [args]`, which processes the tx logs into a beancount file of newly seen transactions, and then move+renames the original files into an archive.
3. Copy entries from the generated beancount file to my permanent ledger via my favorite text editor. The processing rules I have (which get run during bean-extract) are comprehensive enough that this is mostly just copy-pasting large swaths of text to the appropriate section (e.g. "Balance Transfers", "Employment Salary & Benefits", "Everyday Expenses"), but I'll usually have a couple odd expenses which don't get automatically categorized.
4. Add a `balance` assertion for any accounts which have new transactions--this throws an error if my current calculated balance for that account doesn't match the assertion.
5. Run fava to check for errors and view any reports I'm interested in.
6. `git commit` the whole mess.
In general, (3) is only adding new text so it's hard to make deletions/edits by accident, and (4)+(5) give a strong guard against duplicated/missed/incorrect entries. (6) lets me glance over the diff before committing, mainly to confirm it's an append-only operation (unless I changed the name of an account or something like that, which is both rare and can be done in a separate commit to keep things tidy).
At the end of the day, the amount of supporting code I have for all the automation is around 1k lines, and it's been built up pretty slowly over the years--the initial automation got set up incrementally in order of how tedious I found various bank websites vs. the volume of transactions for the associated accounts, but at this point I can mostly just copy-and-paste my previous work on the rare occasion I need to set up a new account.
My general workflow is:
1. Pull tx data from bank websites, mostly via some hacky web browser automation scripts which log in and download the appropriate QFX/CSV.
2. Run `bean-extract [args] && bean-file [args]`, which processes the tx logs into a beancount file of newly seen transactions, and then move+renames the original files into an archive.
3. Copy entries from the generated beancount file to my permanent ledger via my favorite text editor. The processing rules I have (which get run during bean-extract) are comprehensive enough that this is mostly just copy-pasting large swaths of text to the appropriate section (e.g. "Balance Transfers", "Employment Salary & Benefits", "Everyday Expenses"), but I'll usually have a couple odd expenses which don't get automatically categorized.
4. Add a `balance` assertion for any accounts which have new transactions--this throws an error if my current calculated balance for that account doesn't match the assertion.
5. Run fava to check for errors and view any reports I'm interested in.
6. `git commit` the whole mess.
In general, (3) is only adding new text so it's hard to make deletions/edits by accident, and (4)+(5) give a strong guard against duplicated/missed/incorrect entries. (6) lets me glance over the diff before committing, mainly to confirm it's an append-only operation (unless I changed the name of an account or something like that, which is both rare and can be done in a separate commit to keep things tidy).
At the end of the day, the amount of supporting code I have for all the automation is around 1k lines, and it's been built up pretty slowly over the years--the initial automation got set up incrementally in order of how tedious I found various bank websites vs. the volume of transactions for the associated accounts, but at this point I can mostly just copy-and-paste my previous work on the rare occasion I need to set up a new account.