You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if beancount2ledger should have the functionality to map account names and currencies.
I see two big disadvantages:
It makes the code more complex
All beancount account names and currencies are valid in ledger (*), so this isn't "needed".
(*) I thought one character was allowed in beancount currencies but not in ledger, but I can't find any evidence for this right now and maybe I was wrong.
OTOH, this would be useful for those going the ledger -> beancount -> ledger route and who might have different account names in ledger and beancount.
Arguably, it could be solved with a "contrib" Perl script, and maybe this is the way to go (although a simple s/.../.../ might not be enough, and if we start adding complexity why not do it in beancount2ledger itself?). Then again, maybe I'm overcomplicating things and a fairly simple s/.../.../ is good enough.
Doing it with regex substitutions shouldn't be that complex
Why not do it in beancount2ledger, but as a function that does regex subst on the formatted ledger output. This way, the internals don't become too ugly.
I'm wondering if beancount2ledger should have the functionality to map account names and currencies.
I see two big disadvantages:
(*) I thought one character was allowed in beancount currencies but not in ledger, but I can't find any evidence for this right now and maybe I was wrong.
OTOH, this would be useful for those going the ledger -> beancount -> ledger route and who might have different account names in ledger and beancount.
Arguably, it could be solved with a "contrib" Perl script, and maybe this is the way to go (although a simple s/.../.../ might not be enough, and if we start adding complexity why not do it in beancount2ledger itself?). Then again, maybe I'm overcomplicating things and a fairly simple s/.../.../ is good enough.
@zacchiro any opinion on this?
Initially I was going to add it to beancount2ledger itself, but it's not as easy as I thought, and now I'm thinking a contrib script might be better.
The text was updated successfully, but these errors were encountered: