-
-
Notifications
You must be signed in to change notification settings - Fork 387
CSV report output does not represent account tree structure #1566
Copy link
Copy link
Closed
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.csvThe csv file format, csv output format, or generally CSV-related.The csv file format, csv output format, or generally CSV-related.regressionA backwards step, indicating a weakness in our QA. We don't like these.A backwards step, indicating a weakness in our QA. We don't like these.
Metadata
Metadata
Assignees
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.csvThe csv file format, csv output format, or generally CSV-related.The csv file format, csv output format, or generally CSV-related.regressionA backwards step, indicating a weakness in our QA. We don't like these.A backwards step, indicating a weakness in our QA. We don't like these.
I'm passing hledger's CSV reports through pandoc/LaTeX to generate attractive PDF reports.
I like how the tree view works in the text reports:
However, the CSV output does not encode the tree structure:
In the example above, one can't determine that
assets:cashandassets:bank:savingbelong toassetswithout prior knowledge of the account names and more complex parsing rules. It might be possible to work around the issue with aliases, but I haven't tested that yet.I can think of two ways to encode the tree directly:
Indent each account name with a number of spaces, as we do in the text output. For example:
Add another column representing the depth.
Technically, either would be a breaking change. However, given that there is no difference between the tree output and the normal output, there is no real reason to generate a CSV report with
--treeright now. I can't imagine either change would impact many users.