;doc: cli, bal: clarify output formats, layouts more

This commit is contained in:
Simon Michael 2021-12-05 11:23:00 -10:00
parent 2a58331024
commit 76f8ed1514
2 changed files with 23 additions and 13 deletions

View File

@ -371,6 +371,15 @@ Examples:
"total","VHT","294.00"
```
Here is how `--layout` currently affects the various [output formats](#output-format):
| | txt | csv | html | json | sql |
|--------|-----|-----|------|------|-----|
| `wide` | Y | Y | Y | | |
| `tall` | Y | Y | Y | | |
| `bare` | Y | Y | Y | | |
### Sorting by amount
With `-S/--sort-amount`, accounts with the largest (most positive) balances are shown first.

View File

@ -1420,16 +1420,20 @@ This is controlled by the `--pretty` option:
Some commands offer additional output formats, other than the usual plain text terminal output.
Here are those commands and the formats currently supported:
| | txt | csv | json | html | sql |
|--------------------------|-----|-----|------|---------|-----|
| aregister | Y | Y | Y | | |
| balance *[1]* | Y | Y | Y | Y *[2]* | |
| balancesheet *[1]* | Y | Y | Y | Y | |
| balancesheetequity *[1]* | Y | Y | Y | Y | |
| cashflow *[1]* | Y | Y | Y | Y | |
| incomestatement *[1]* | Y | Y | Y | Y | |
| print | Y | Y | Y | | Y |
| register | Y | Y | Y | | |
| | txt | csv | html | json | sql |
|--------------------|-------|-------|---------|------|-----|
| aregister | Y | Y | | Y | |
| balance | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y *<sup>1,2</sup>* | Y | |
| balancesheet | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y | |
| balancesheetequity | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y | |
| cashflow | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y | |
| incomestatement | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y *<sup>1</sup>* | Y | |
| print | Y | Y | | Y | Y |
| register | Y | Y | | Y | |
- *<sup>1</sup> Also affected by the balance commands' [`--layout` option](#commodity-layout).*
- *<sup>2</sup> `balance` does not support html output without a report interval or with `--budget`.*
<!--
| accounts | | | | | |
| activity | | | | | |
@ -1459,9 +1463,6 @@ Here are those commands and the formats currently supported:
| test | | | | | |
-->
- *[1] Balance commands also have a multi-commodity [`--layout` option](#commodity-layout) which affects some output formats.*
- *[2] Except with no report interval, or with the `--budget` flag.*
The output format is selected by the `-O/--output-format=FMT` option:
```shell
$ hledger print -O csv # print CSV on stdout