From 76f8ed1514a7441f626366c18b346f855d7ad966 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 5 Dec 2021 11:23:00 -1000 Subject: [PATCH] ;doc: cli, bal: clarify output formats, layouts more --- hledger/Hledger/Cli/Commands/Balance.md | 9 +++++++++ hledger/hledger.m4.md | 27 +++++++++++++------------ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Balance.md b/hledger/Hledger/Cli/Commands/Balance.md index 82fc33c76..78ba96d54 100644 --- a/hledger/Hledger/Cli/Commands/Balance.md +++ b/hledger/Hledger/Cli/Commands/Balance.md @@ -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. diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index f61aa7358..341387bb4 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -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 *1* | Y *1* | Y *1,2* | Y | | +| balancesheet | Y *1* | Y *1* | Y *1* | Y | | +| balancesheetequity | Y *1* | Y *1* | Y *1* | Y | | +| cashflow | Y *1* | Y *1* | Y *1* | Y | | +| incomestatement | Y *1* | Y *1* | Y *1* | Y | | +| print | Y | Y | | Y | Y | +| register | Y | Y | | Y | | + +- *1 Also affected by the balance commands' [`--layout` option](#commodity-layout).* +- *2 `balance` does not support html output without a report interval or with `--budget`.* + -- *[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