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

Allow importers to specify formatting of postings #15

Open
blais opened this issue Feb 25, 2020 · 2 comments
Open

Allow importers to specify formatting of postings #15

blais opened this issue Feb 25, 2020 · 2 comments

Comments

@blais
Copy link
Member

blais commented Feb 25, 2020

Original report by Martin Michlmayr (Bitbucket: tbm13, GitHub: tbm).


By default, bean-extract generates transactions like this:

2019-12-07 * "Anonymous" "Donation"
  Assets:Receivable   100.00 USD
  Income:Donations   -100.00 USD

I know I can just pipe it into bean-format but I’m wondering if it would be possible to allow importers to format the postings, including spacing and amounts? (I know I can do amounts by just rounding to the precision I want).

In any ideal world, this would be per-posting? I like to align different postings with different spacing depending on their nature.

Good idea? Bad idea? Maybe I should just pipe the output to a script that formats it (that’s actually what I do now)

@blais
Copy link
Member Author

blais commented Feb 26, 2020

Original comment by Daniele Nicolodi (Bitbucket: daniele, GitHub: dnicolodi).


How would the interface for specifying the formatting of each posting look like? I think post-processing the output of the ingest framework is a much easier and flexible solution.

@blais
Copy link
Member Author

blais commented Feb 29, 2020

Original comment by Martin Michlmayr (Bitbucket: tbm13, GitHub: tbm).


How would the interface for specifying the formatting of each posting look like?

I’m not sure. I was thinking that postings should get values that describe how to format it, e.g. a format string, or a format for width and amount.

I think post-processing the output of the ingest framework is a much easier and flexible solution.

Yeah, maybe you’re right. I currently use an external script. Is that what you would recommend or would you somehow do it in beancount, e.g. wrapping some function? I’m curious what you think the most elegant solution would be.

@blais blais transferred this issue from beancount/beancount Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant