Ledger output should support comma separated values
Currently only ledger output in dot separated decimal values is supported. Ideally should also support comma separated decimals in output.
Any news on this issue?
Hi @AlessandroW this is a pretty old issue that hasn't gotten a lot of attention.
I have some ideas for implementing that I don't think would be too tough, but want to make sure that any proposed solution would meet your needs. Can you give me a little background on what you're trying to do or some examples of what the output would look like?
Thanks
Hi! Sorry, for answering so late. Reckon actually solves this problem already by converting from comma separated cents to point separated cents. I only had to change the format once in my journal (from comma to point) and now everything works fine.
Here an example of my workflow:
Assume the input is a csv file like the following (input.csv):
"Day";"Text";"Amount (EUR)";
"17.03.2021";"Sample Income";"12,50";
"18.03.2021";"Sample Expense";"-12,50";
Using Reckon this will lead to the following output (2021.journal)
2021-03-17 Sample Income ;
assets 12.50 EUR
revenues
2021-03-18 Sample Expense ;
expenses
assets -12.50 EUR
❯ reckon -f input.csv --currency "EUR" --suffixed \
… ❯ --comma-separates-cents \
… ❯ --csv-separator ";" \
… ❯ --contains-header 1 \
… ❯ -a assets -o 2021.journal
Using column 3 as the money column. Use --money-colum to specify a different one.
Date | Amount | Description | Note |
2021-03-17 | 12.50 EUR | Sample Income | |
Which account provided this income? ([account]/[q]uit/[s]kip/[n]ote/[d]escription)
revenues
Date | Amount | Description | Note |
2021-03-18 | -12.50 EUR | Sample Expense | |
To which account did this money go? ([account]/[q]uit/[s]kip/[n]ote/[d]escription) |revenues|
expenses
If you have another csv that uses a point as separator you simply omit the flag.
While you could add the feature "--comma-as-output" so that you can convert between "." and "," as you wish I am not sure if it is necessary.
| Input | Output | Flags |
|---|---|---|
| . | . | None |
| . | , | –comma-as-output |
| , | . | –comma-separates-cents |
| , | , | –comma-as-output –comma-separates-cents |
@AlessandroW Thanks for getting back to me and I'm glad you've got it working. I think your explanation would be helpful to other people, I'll add it to the docs.
Thanks for writing this up.