Live data from Hacker News

Plain Text Accounting (PTA)

plaintextaccounting.org

81–90 of 123 posts

Re: Plain Text Accounting (PTA)

#81

I've been using ledger (ledger-cli) from the moment I first became self employed (almost twenty years ago). While far from perfect, I'm very happy about it. It's nice that everything is in plain text, which means that I can script things, read everything in VIM, and easily extract data. For one of my two current companies, the ledger file is 2MB of plain text and contains the transactions from 2016 onwards. While I p…

In thinking a bit more, I think the biggest pain point for me is one with plain text in general: it supports no attachments. I have my own system to refer to specific files and built a Mac app that lets me drop a file on a transaction, then it copies that file into a specific folder and adds a tag to the transaction. This could be done so much easier if the data would be sqlite, but then you obviously lose the abilit…

[deleted]

Re: Plain Text Accounting (PTA)

#82

I've been using ledger (ledger-cli) from the moment I first became self employed (almost twenty years ago). While far from perfect, I'm very happy about it. It's nice that everything is in plain text, which means that I can script things, read everything in VIM, and easily extract data. For one of my two current companies, the ledger file is 2MB of plain text and contains the transactions from 2016 onwards. While I p…

In thinking a bit more, I think the biggest pain point for me is one with plain text in general: it supports no attachments. I have my own system to refer to specific files and built a Mac app that lets me drop a file on a transaction, then it copies that file into a specific folder and adds a tag to the transaction. This could be done so much easier if the data would be sqlite, but then you obviously lose the abilit…

You can paste the file as a base64 string. Disable word wrap and it should only appear as one line.

A good text editor of the future should recognize these base64 strings and make them appear like clickable files, but still let you right-click and go back to the plain text representation.

Re: Plain Text Accounting (PTA)

#83
I’m a huge ledger fan (hledger specifically) and have used it to run my entire accounting life for the past 8 years or so.

A few tips:

* Resist the urge to break up your various accounts into too many separate files. I tried that and went back to one file per account per year (aka “venmo-2024.hledger”). Also helps with below…

* GitHub CoPilot is remarkably and shockingly good at working with ledger files. It will do the balance addition/subtraction on following lines almost perfectly. Also, if you need to manually enter a new line, you can often just enter a shortcut one-line comment and it’ll fill the entire entry, aka:

; 10/1/24 -$250 for new business cards

Re: Plain Text Accounting (PTA)

#84
post #72

Plain text accounting is cool but I think one of the biggest barriers for people is downloading bank data into a standard format. The banks are never going to embrace much more than CSV or excel files... the various data aggregation platforms (yodlee, plaid, etc...) are not open source or hobbyist friendly. Back in ancient times there was a company called Wesabe ( https://en.wikipedia.org/wiki/Wesabe ) that wrote sof…

hledger has tooling to transform fairly arbitrary CSV into transactions it understands[0]. I haven't tried it yet, but after spending 4 hours over multiple days helping my SaaS bookkeeping company troubleshoot their bank connection problems[1], you can better believe I'm willing to put a little time in trying this out. Every damn time I reconcile transactions I end up fighting their system that I can't see the workin…

This is the big advantage of hledger. It has two ways of translating csv into journal form - one simple and one more complicated, but very flexible.

I find it best to have a separate journal for each downloaded account. I just include them into a master journal (along with a manual entry journal) and generate reports from that.

I also use git so I can roll back the latest import, if something goes wrong - but that hasn’t happened yet.

Re: Plain Text Accounting (PTA)

#85

Is there an text editor that is able to autocomplete the categories in hledger format ? It would be great to type Assets:: and then get a list of the possible categories, but I haven't found any editor or extension that does it.

People have written extensions for every editor. I've used in Emacs, vi, atom, and vscode.

vscode has some code coloring extension but no code completion that I'm aware of. If you found one, please consider sharing it :). I would happily switch to another editor if one has a extension that autocomplete categories.

Re: Plain Text Accounting (PTA)

#86

I've been using ledger (ledger-cli) from the moment I first became self employed (almost twenty years ago). While far from perfect, I'm very happy about it. It's nice that everything is in plain text, which means that I can script things, read everything in VIM, and easily extract data. For one of my two current companies, the ledger file is 2MB of plain text and contains the transactions from 2016 onwards. While I p…

In thinking a bit more, I think the biggest pain point for me is one with plain text in general: it supports no attachments. I have my own system to refer to specific files and built a Mac app that lets me drop a file on a transaction, then it copies that file into a specific folder and adds a tag to the transaction. This could be done so much easier if the data would be sqlite, but then you obviously lose the abilit…

Fava and beancount have some affordances here. You can make a data directory with a directory structure that matches your chart of accounts. Place datestamped files in here and they'll show up inline in your fava ledger view.

Additionally you can annotate a transaction with a "document" tag and that document will show up directly associated in the ui.

The ui has pretty good previewing for these. I add pdf versions of all of my statements, and attach receipts to specific transactions (business expenses, proof of paying taxes, etc.)

It works quite well

Re: Plain Text Accounting (PTA)

#87
post #69

Has anyone tried training their own personal machine learning model to take export from their Bank+receipts and auto categorize everything? It seems like it'd be a fairly simple classification model that wouldn't require too much training...

There are tools to do just that, see for example banks2ledger: https://git.hq.sig7.se/banks2ledger.git

Re: Plain Text Accounting (PTA)

#88
post #64

Plain Text Accounting has become significantly easier to do for me on a regular basis, thanks to LLMs. Specifically: importing bank statements into hledger and avoiding manual entry. I use a JSON file to map bank entries to my hledger accounts. For new transactions without mappings, I run a Python script that generates a prompt for Claude. It lists my hledger accounts and asks for mappings for the new entries. Claude…

You don't consider an LLM fragile? Also bold to send your banking information to Anthropic.

Re: Plain Text Accounting (PTA)

#89

Is there an text editor that is able to autocomplete the categories in hledger format ? It would be great to type Assets:: and then get a list of the possible categories, but I haven't found any editor or extension that does it.

hledger-ui

Re: Plain Text Accounting (PTA)

#90
post #64

Plain Text Accounting has become significantly easier to do for me on a regular basis, thanks to LLMs. Specifically: importing bank statements into hledger and avoiding manual entry. I use a JSON file to map bank entries to my hledger accounts. For new transactions without mappings, I run a Python script that generates a prompt for Claude. It lists my hledger accounts and asks for mappings for the new entries. Claude…

You don't consider an LLM fragile? Also bold to send your banking information to Anthropic.

Good question. LLMs are surprisingly less fragile than hand-coded parsers for unstructured data like the ones in a bank statement.

And to be clear - I'm not sending the entire statement to Claude; instead, only the account name/narration of those transactions for which I already don't have a mapping. Claude then returns a well-formatted JSON that maps "amzn0026765260@apl" to "expenses:amazon", and "Veena Fuels" to "expenses:vehicle" and so on.

I can also pass in general instructions saying that "Restaurants and food-related accounts are categorized under 'expenses:food'", and it does a good job of mapping most of my dining out expenses to the correct account head.

The actual generation of journal entries are done by a simple Python script. The mapping used to be the hardest part, and what used to need custom classification models is just a simple prompt with LLM.

Post reply on HN