;doc: update CLI usage texts

This commit is contained in:
Simon Michael 2021-12-05 10:56:38 -10:00
parent 371539e085
commit fdc373f45c

View File

@ -264,81 +264,89 @@ are displayed:
- --layout=wide[,WIDTH]: on a single line, possibly elided to the - --layout=wide[,WIDTH]: on a single line, possibly elided to the
specified width specified width
- --layout=tall: each commodity is displayed on a separate line - --layout=tall: each commodity is displayed on a separate line
- --layout=bare: commodity symbols are displayed in a separate column, - --layout=bare: amounts are displayed as bare numbers, with commodity
and amounts are displayed as bare numbers symbols in a separate column
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=wide Examples:
Balance changes in 2012-01-01..2014-12-31:
- Wide layout. With many commodities, reports can be very wide:
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=wide
Balance changes in 2012-01-01..2014-12-31:
|| 2012 2013 2014 Total || 2012 2013 2014 Total
==================++==================================================================================================================================================================================================================== ==================++====================================================================================================================================================================================================================
Assets:US:ETrade || 10.00 ITOT, 337.18 USD, 12.00 VEA, 106.00 VHT 70.00 GLD, 18.00 ITOT, -98.12 USD, 10.00 VEA, 18.00 VHT -11.00 ITOT, 4881.44 USD, 14.00 VEA, 170.00 VHT 70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT Assets:US:ETrade || 10.00 ITOT, 337.18 USD, 12.00 VEA, 106.00 VHT 70.00 GLD, 18.00 ITOT, -98.12 USD, 10.00 VEA, 18.00 VHT -11.00 ITOT, 4881.44 USD, 14.00 VEA, 170.00 VHT 70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT
------------------++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|| 10.00 ITOT, 337.18 USD, 12.00 VEA, 106.00 VHT 70.00 GLD, 18.00 ITOT, -98.12 USD, 10.00 VEA, 18.00 VHT -11.00 ITOT, 4881.44 USD, 14.00 VEA, 170.00 VHT 70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT || 10.00 ITOT, 337.18 USD, 12.00 VEA, 106.00 VHT 70.00 GLD, 18.00 ITOT, -98.12 USD, 10.00 VEA, 18.00 VHT -11.00 ITOT, 4881.44 USD, 14.00 VEA, 170.00 VHT 70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=wide,32 - Limited wide layout. A width limit reduces the width, but some
Balance changes in 2012-01-01..2014-12-31: commodities will be hidden:
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=wide,32
Balance changes in 2012-01-01..2014-12-31:
|| 2012 2013 2014 Total || 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.. 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..
------------------++--------------------------------------------------------------------------------------------------------------------------- ------------------++---------------------------------------------------------------------------------------------------------------------------
|| 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 -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=tall - Tall layout. Each commodity gets a new line (may be different in
Balance changes in 2012-01-01..2014-12-31: each column), and account names are repeated:
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=tall
Balance changes in 2012-01-01..2014-12-31:
|| 2012 2013 2014 Total || 2012 2013 2014 Total
==================++================================================== ==================++==================================================
Assets:US:ETrade || 10.00 ITOT 70.00 GLD -11.00 ITOT 70.00 GLD Assets:US:ETrade || 10.00 ITOT 70.00 GLD -11.00 ITOT 70.00 GLD
Assets:US:ETrade || 337.18 USD 18.00 ITOT 4881.44 USD 17.00 ITOT Assets:US:ETrade || 337.18 USD 18.00 ITOT 4881.44 USD 17.00 ITOT
Assets:US:ETrade || 12.00 VEA -98.12 USD 14.00 VEA 5120.50 USD Assets:US:ETrade || 12.00 VEA -98.12 USD 14.00 VEA 5120.50 USD
Assets:US:ETrade || 106.00 VHT 10.00 VEA 170.00 VHT 36.00 VEA Assets:US:ETrade || 106.00 VHT 10.00 VEA 170.00 VHT 36.00 VEA
Assets:US:ETrade || 18.00 VHT 294.00 VHT Assets:US:ETrade || 18.00 VHT 294.00 VHT
------------------++-------------------------------------------------- ------------------++--------------------------------------------------
|| 10.00 ITOT 70.00 GLD -11.00 ITOT 70.00 GLD || 10.00 ITOT 70.00 GLD -11.00 ITOT 70.00 GLD
|| 337.18 USD 18.00 ITOT 4881.44 USD 17.00 ITOT || 337.18 USD 18.00 ITOT 4881.44 USD 17.00 ITOT
|| 12.00 VEA -98.12 USD 14.00 VEA 5120.50 USD || 12.00 VEA -98.12 USD 14.00 VEA 5120.50 USD
|| 106.00 VHT 10.00 VEA 170.00 VHT 36.00 VEA || 106.00 VHT 10.00 VEA 170.00 VHT 36.00 VEA
|| 18.00 VHT 294.00 VHT || 18.00 VHT 294.00 VHT
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=bare - Bare layout. Commodity symbols are kept in one column, each
Balance changes in 2012-01-01..2014-12-31: commodity gets its own report row, account names are repeated:
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -T -Y --layout=bare
Balance changes in 2012-01-01..2014-12-31:
|| Commodity 2012 2013 2014 Total || Commodity 2012 2013 2014 Total
==================++============================================= ==================++=============================================
Assets:US:ETrade || GLD 0 70.00 0 70.00 Assets:US:ETrade || GLD 0 70.00 0 70.00
Assets:US:ETrade || ITOT 10.00 18.00 -11.00 17.00 Assets:US:ETrade || ITOT 10.00 18.00 -11.00 17.00
Assets:US:ETrade || USD 337.18 -98.12 4881.44 5120.50 Assets:US:ETrade || USD 337.18 -98.12 4881.44 5120.50
Assets:US:ETrade || VEA 12.00 10.00 14.00 36.00 Assets:US:ETrade || VEA 12.00 10.00 14.00 36.00
Assets:US:ETrade || VHT 106.00 18.00 170.00 294.00 Assets:US:ETrade || VHT 106.00 18.00 170.00 294.00
------------------++--------------------------------------------- ------------------++---------------------------------------------
|| GLD 0 70.00 0 70.00 || GLD 0 70.00 0 70.00
|| ITOT 10.00 18.00 -11.00 17.00 || ITOT 10.00 18.00 -11.00 17.00
|| USD 337.18 -98.12 4881.44 5120.50 || USD 337.18 -98.12 4881.44 5120.50
|| VEA 12.00 10.00 14.00 36.00 || VEA 12.00 10.00 14.00 36.00
|| VHT 106.00 18.00 170.00 294.00 || VHT 106.00 18.00 170.00 294.00
The option --layout=bare also affects CSV output, which is useful for - Bare layout also affects CSV output, which is useful for producing
producing data that is easier to consume, eg when making charts: data that is easier to consume, eg when making charts:
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv $ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv --layout=bare
"account","balance" "account","commodity","balance"
"Assets:US:ETrade","70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT" "Assets:US:ETrade","GLD","70.00"
"total","70.00 GLD, 17.00 ITOT, 5120.50 USD, 36.00 VEA, 294.00 VHT" "Assets:US:ETrade","ITOT","17.00"
"Assets:US:ETrade","USD","5120.50"
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv --layout=bare "Assets:US:ETrade","VEA","36.00"
"account","commodity","balance" "Assets:US:ETrade","VHT","294.00"
"Assets:US:ETrade","GLD","70.00" "total","GLD","70.00"
"Assets:US:ETrade","ITOT","17.00" "total","ITOT","17.00"
"Assets:US:ETrade","USD","5120.50" "total","USD","5120.50"
"Assets:US:ETrade","VEA","36.00" "total","VEA","36.00"
"Assets:US:ETrade","VHT","294.00" "total","VHT","294.00"
"total","GLD","70.00"
"total","ITOT","17.00"
"total","USD","5120.50"
"total","VEA","36.00"
"total","VHT","294.00"
Sorting by amount Sorting by amount