hledger icon indicating copy to clipboard operation
hledger copied to clipboard

new layout bare-wide

Open thielema opened this issue 1 year ago • 9 comments

This is a draft for a new type of layout. This is the original reason why I started to work on hledger export functions ...

I called it bare-wide, because it is like bare but the amounts are put in one column per commodity. Sometimes it requires two header rows and horizontally merged headers for dates. I implemented it for HTML and FODS output of plain balance, multi-period balance and compound balances. Not implemented for budget reports, but those reports support only bare and non-bare layouts, anyway.

I thought about alternative names like sub (one sub-column per commodity), columns, separate. Maybe you have better ideas.

I have also some draft code for a table type with labels for header groups. This could enable layout bare-wide for the text outputs. This draft code is not contained in this pull request.

I found a command in multiBalanceReportHtmlRows that reads:

-- TODO: should the commodity_column be displayed as a subaccount in this case as well?

I do not know whether it is still relevant. I have moved it to compoundBalanceReportAsHtml but it might be even more confusing there.

thielema avatar Oct 05 '24 09:10 thielema

Interesting! I will try to use it, when it can also display the date headings again. (Perhaps this PR should be marked draft.)

simonmichael avatar Oct 09 '24 18:10 simonmichael

I don't remember what that TODO comment was about, we can drop it.

simonmichael avatar Oct 09 '24 18:10 simonmichael

On Wed, 9 Oct 2024, Simon Michael wrote:

Interesting! I will try to use it, when it can also display the date headings again. (Perhaps this PR should be marked draft.)

yes, currently it is a draft

thielema avatar Oct 09 '24 19:10 thielema

(I was seeing the green Open badge on github. I have changed the status to Draft so I don't accidentally merge too soon..)

simonmichael avatar Oct 09 '24 19:10 simonmichael

On Wed, 9 Oct 2024, Simon Michael wrote:

Interesting! I will try to use it, when it can also display the date headings again.

hledger -f hledger-journal balance --yearly --layout=bare-wide --output-file=multibalance.html

This shows date headings. Or what do you mean?

thielema avatar Oct 09 '24 20:10 thielema

Ah, I was testing terminal output. No date headings there.

simonmichael avatar Oct 09 '24 20:10 simonmichael

On Wed, 9 Oct 2024, Simon Michael wrote:

Ah, I was testing terminal output. No date headings there.

Text output does not support the new layout for now, because this would require a Table type that allows to give labels to Header groups. (I have a draft for such an alternative Table type, though.)

thielema avatar Oct 09 '24 20:10 thielema

It is affected by --layout=bare-wide though, just FYI.

simonmichael avatar Oct 09 '24 20:10 simonmichael

Any new thoughts on this hledger PR: new layout bare-wide ? Is the feature still valuable ?

simonmichael avatar May 17 '25 19:05 simonmichael