howeyc / ledger

Command line double-entry accounting program
https://howeyc.github.io/ledger/
ISC License
455 stars 43 forks source link

support ledger-cli account keyword #28

Closed quite closed 3 years ago

quite commented 3 years ago

It would be nice with support for the account keyword. In the least parsing and skipping it, but possibly also enforcing it.

https://www.ledger-cli.org/3.0/doc/ledger3.html#Keeping-it-Consistent

howeyc commented 3 years ago

It's an interesting idea, but the sub-directives I saw there are not something that interest me. This tool is meant to be extremely simple in the input it accepts.

Regex for payee; aliases; default directive; forcing commodity...

Computation does not belong in the ledger file in my opinion. It's just a list of transactions as easily editable text.

I could entertain the idea of skipping over account directives though. Or perhaps just no sub-directives.

quite commented 3 years ago

I understand. Perhaps it could be LedgerReaders responsibility to skip known keywords, just like it does handle the known include. Perhaps optionally?

howeyc commented 3 years ago

I've gone as far as I'm willing with this request. I parse (and skip) account directives. So basically, you can use my program if your ledger file has those lines, but they will not be useful.

I did spend some time considering the strict mode you mentioned, but decided not to bother because I don't have the motivation or desire to do the required changes. I'm not convinced of the benefit, for my usage anyway. You are more than welcome to give it a shot and submit changes though.

quite commented 3 years ago

Thanks! It's potentially much more usable for me now :)