;bal: doc: --commodity-column: fix csv example (#1626)

and make examples reproducible, why not.
This commit is contained in:
Simon Michael 2021-08-08 10:02:23 -10:00
parent d06d4ca080
commit ca474a8687

View File

@ -263,16 +263,16 @@ In this mode, each report row will show amounts for a single commodity, using ex
It can be useful for a cleaner display of reports with many commodities:
```shell
$ hledger bal -T -Y
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y
Balance changes in 2012-01-01..2014-12-31:
|| 2012 2013 2014 Total
==================++=============================================================================================================================
==================++===========================================================================================================================
Assets:US:ETrade || 10.00 ITOT, 337.18 USD, 2 more.. 70.00 GLD, 18.00 ITOT, 3 more.. -11.00 ITOT, 3 more.. 70.00 GLD, 17.00 ITOT, 3 more..
------------------++-----------------------------------------------------------------------------------------------------------------------------
total || 10.00 ITOT, 337.18 USD, 2 more.. 70.00 GLD, 18.00 ITOT, 3 more.. -11.00 ITOT, 3 more.. 70.00 GLD, 17.00 ITOT, 3 more..
------------------++---------------------------------------------------------------------------------------------------------------------------
|| 10.00 ITOT, 337.18 USD, 2 more.. 70.00 GLD, 18.00 ITOT, 3 more.. -11.00 ITOT, 3 more.. 70.00 GLD, 17.00 ITOT, 3 more..
$ hledger bal -T -Y --commodity-column
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --commodity-column
Balance changes in 2012-01-01..2014-12-31:
|| Commodity 2012 2013 2014 Total
@ -294,12 +294,12 @@ This flag also affects [CSV output](#output-formats),
which is useful for producing data that is easier to consume, eg when making charts:
```shell
$ hledger bal -T -O csv
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv
"account","balance"
"Assets:US:ETrade","70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT"
"total","70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT"
$ hledger bal -T -O csv --commodity-column
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv --commodity-column
"account","commodity","balance"
"Assets:US:ETrade","GLD","70.00"
"Assets:US:ETrade","ITOT","17.00"