Closed bratekarate closed 3 years ago
No, it's not supported. I wasn't even aware of that feature.
But I think there are arguments for supporting it. I'd have to check how hard that would be.
I did not find any explicit mention of the payee sub directive for accounts in the docs of ledger2beancount, only that the alias sub directive is supported.
Actually, the alias
sub-directive (under account
) isn't supported either. Only the top-level alias
directive is.
I've implemented support for the alias
and payee
sub-directives of account
declarations now.
Please let me know if it's working as expected.
Wow, that was fast. Thanks for your work! You're implementing faster than I can reply :)
Edit: Works as expected.
Edit: Works as expected.
Great!
Please open issues if you run into any other issues.
Ledger supports the subdirective
payee
for theaccount
directive. Using this sub directive for an account, ledger will automatically change any posting's account that ends with:Unknown
to the respective Account if thepayee
regex matches a transaction's payee.See the example in https://www.ledger-cli.org/3.0/doc/ledger3.html#Command-Directives for a food expenses account.
I did not find any explicit mention of the
payee
sub directive for accounts in the docs of ledger2beancount, only that thealias
sub directive is supported. Does that mean thepayee
sub directive is not supported? If not, it may be a good idea to explicitly state in the docs that no other sub directives for theaccount
directive other thanalias
are supported.It kind of makes sense that it would not be supported, as it does not make sense to replicate the functionality that is already in ledger. So the right approach would probably be to use
ledger print
to generate the correct transactions and then feed it to ledger2beancount. Still, I think it would still prove helpful to be informed about this by the docs explicitly, as it is quite difficult to keep an overview of incompatible features from the top of your head before converting.