Closed quite closed 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.
I understand. Perhaps it could be LedgerReader
s responsibility to skip known keywords, just like it does handle the known include
. Perhaps optionally?
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.
Thanks! It's potentially much more usable for me now :)
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