Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map accounts and currencies? #24

Closed
tbm opened this issue Nov 13, 2020 · 1 comment
Closed

Map accounts and currencies? #24

tbm opened this issue Nov 13, 2020 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@tbm
Copy link
Collaborator

tbm commented Nov 13, 2020

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.

@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.

@tbm tbm added the enhancement New feature or request label Nov 13, 2020
@tbm
Copy link
Collaborator Author

tbm commented Nov 13, 2020

I thought about it and think:

  1. Doing it with regex substitutions shouldn't be that complex

  2. 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.

@tbm tbm added this to the 1.3 milestone Nov 13, 2020
tbm added a commit to tbm/beancount2ledger that referenced this issue Nov 13, 2020
While this isn't useful for people going from beancount to ledger,
it's useful if you go ledger -> beancount -> ledger.

Fixes beancount#24
@tbm tbm closed this as completed in 87c8545 Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant