Layout barewide for text output of budget reports

6 views
Skip to first unread message

Henning Thielemann

unread,
Sep 13, 2026, 7:42:13 AMSep 13
to hle...@googlegroups.com

Recently we managed to include the new layout "barewide" for balance and
budget reports that I proposed for easier postprocessing of tabular data
preferably in FODS format in LibreOffice&Co. The idea was to have a layout
where every cell contains exactly one number, as this is the way
LibreOffice&Co. can best compute with, and where you can find the right
account and according amount using LibreOffice' VLOOKUP function.

It was a natural fit to add this layout option to CSV and HTML, as well,
since both are generated from the same Spreadsheet formatting framework,
and both formats can be imported as table in LibreOffice Calc.

I also added barewide layout to text output for single-period and
multi-period balance reports for consistency, although text output is
intended for human inspection and there is no way to import text tables
into LibreOffice Calc (unless maybe via Pandoc to HTML and from there to
LibreOffice).

For consistency reasons I have also thought about adding layout barewide
to text output of budget reports, but eventually I have no idea how I
would do this and whether I should add it, at all. Looking at bare text
layout of budget reports I see cell contents like:

"-10 [ 40% of -25]"

Those are clearly not bare numbers. But since this is text output for
humans and not for machine postprocessing, this might be ok. I hesitate to
emit something similar as "barewide" because it counters the initial
intention of providing data in a VLOOKUP-friendly format. But then again,
this is text output for humans.

Currently I tend to leave text output for budget reports in barewide
layout unimplemented until someone has a real need for it. But then
remains the question: Shall I emit an error for this layout? It seems like
LayoutTidy is also unimplemented, which makes sense, but there is also no
error.

Simon Michael

unread,
Sep 13, 2026, 12:34:58 PMSep 13
to hle...@googlegroups.com
My 2c: it sounds not worth implementing it for budget reports; no-one is asking for it.

As long as docs say which output formats are supported by a command (or special report, like bal --budget), I think it's ok that unsupported ones have no effect. We have lots of precedent for that.

Simon Michael

unread,
Sep 13, 2026, 1:25:19 PMSep 13
to hle...@googlegroups.com
But for output format specifically, I guess we typically raise an error when you try to output a format that the report doesn't support. So maybe an error is best.

Henning Thielemann

unread,
Sep 14, 2026, 11:33:54 AMSep 14
to hle...@googlegroups.com
See my proposed code here:
https://github.com/thielema/hledger/tree/budget-layout-error

Pull request limit reached, unfortunately.

Simon Michael

unread,
Sep 14, 2026, 11:39:33 AMSep 14
to hle...@googlegroups.com
I have whitelisted you now. I'll be revisiting this soon.
> --
> You received this message because you are subscribed to the Google
> Groups "hledger" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hledger+u...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/hledger/26119c33-fd49-aaf8-8a43-9599b3a4cc2e%40henning-thielemann.de.
Reply all
Reply to author
Forward
0 new messages