Could HLedger capture sub-accounts, grep style, for use in an auto posting?
My use case is emotional bank accounts. Say someone gives me a gift
2022-02-02 * Random Gift
assets:checking 50 cur
income:gift:person
Usually, this recording is enough. But as with loans, which I track religiously pending payback, I thought to create and track emotional bank accounts for gifts like these, pending pay forward.
With what I know in HLedger's auto postings, there's the %account directive in an auto posting which is a direct replacement of the matched bank account.
= income:gift
(%account:emotional) *1.5
This expands the above transaction into something like
2022-02-02 * Random Gift
assets:checking 50 cur
income:gift:person
income:gift:person:emotional 75 cur
What I'd like is something like
2022-02-02 * Random Gift
assets:checking 50 cur
income:gift:person
liabilities:emotional:person 75 cur
My hope was that an auto posting like this should work
= income:gift
(liabilities:emotional:%(tag:giver)) *1.5
2022-02-02 * Random Gift
; giver: person
assets:checking 50 cur
income:gift:person
ā¦but this doesn't work.
If HLedger does not support capturing subaccounts, is there any way I can use metadata from the transaction in my auto posting?