;doc: update manuals

This commit is contained in:
Simon Michael 2021-12-05 16:33:14 -10:00
parent ca0d9e2a0e
commit 642102e291
3 changed files with 1734 additions and 1585 deletions

View File

@ -3234,18 +3234,86 @@ will be included, since those are usually the more useful in reports.
The idea of this is to be able to see a useful \[dq]complete\[dq] The idea of this is to be able to see a useful \[dq]complete\[dq]
balance report, even when you don\[aq]t have transactions in all of your balance report, even when you don\[aq]t have transactions in all of your
declared accounts yet. declared accounts yet.
.SS Commodity layout .SS Data layout
.PP .PP
With \f[C]--layout\f[R], you can control how amounts with more than one With \f[C]--layout\f[R], you can influence how amounts with more than
commodity are displayed: one commodity are displayed (and a bit more), which in turn affects the
layout of the report data:
.IP \[bu] 2 .IP \[bu] 2
\f[C]--layout=wide[,WIDTH]\f[R]: on a single line, possibly elided to \f[C]--layout=wide[,WIDTH]\f[R]: commodities are shown on a single line,
the specified width possibly elided to the specified width
.IP \[bu] 2 .IP \[bu] 2
\f[C]--layout=tall\f[R]: each commodity is displayed on a separate line \f[C]--layout=tall\f[R]: each commodity is shown on a separate line
.IP \[bu] 2 .IP \[bu] 2
\f[C]--layout=bare\f[R]: amounts are displayed as bare numbers, with \f[C]--layout=bare\f[R]: amounts are shown as bare numbers, with
commodity symbols in a separate column commodity symbols in a separate column
.IP \[bu] 2
\f[C]--layout=tidy\f[R]: data is normalised to tidy form, with one row
per data value (supported with CSV output only)
.PP
These \f[C]--layout\f[R] values affect some but not all of the output
formats, as shown:
.PP
.TS
tab(@);
l l l l l l.
T{
-
T}@T{
txt
T}@T{
csv
T}@T{
html
T}@T{
json
T}@T{
sql
T}
_
T{
wide
T}@T{
Y
T}@T{
Y
T}@T{
Y
T}@T{
T}@T{
T}
T{
tall
T}@T{
Y
T}@T{
Y
T}@T{
Y
T}@T{
T}@T{
T}
T{
bare
T}@T{
Y
T}@T{
Y
T}@T{
Y
T}@T{
T}@T{
T}
T{
tidy
T}@T{
T}@T{
Y
T}@T{
T}@T{
T}@T{
T}
.TE
.PP .PP
Examples: Examples:
.IP \[bu] 2 .IP \[bu] 2
@ -3360,61 +3428,51 @@ $ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv --layout=
\f[R] \f[R]
.fi .fi
.RE .RE
.PP .IP \[bu] 2
Here is how \f[C]--layout\f[R] currently affects the various output Tidy layout produces normalised \[dq]tidy data\[dq], where every
formats: variable is a column and each row represents a single data point (see
.PP https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-data.html).
.TS This is the form of data most easily processed by other software.
tab(@); Currently we support it with the CSV output format only:
l l l l l l. .RS 2
T{ .IP
- .nf
T}@T{ \f[C]
txt $ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv --layout=tidy -Y
T}@T{ \[dq]account\[dq],\[dq]date\[dq],\[dq]commodity\[dq],\[dq]value\[dq]
csv \[dq]Assets:US:ETrade\[dq],\[dq]2012\[dq],\[dq]GLD\[dq],\[dq]0\[dq]
T}@T{ \[dq]Assets:US:ETrade\[dq],\[dq]2012\[dq],\[dq]ITOT\[dq],\[dq]10.00\[dq]
html \[dq]Assets:US:ETrade\[dq],\[dq]2012\[dq],\[dq]USD\[dq],\[dq]337.18\[dq]
T}@T{ \[dq]Assets:US:ETrade\[dq],\[dq]2012\[dq],\[dq]VEA\[dq],\[dq]12.00\[dq]
json \[dq]Assets:US:ETrade\[dq],\[dq]2012\[dq],\[dq]VHT\[dq],\[dq]106.00\[dq]
T}@T{ \[dq]Assets:US:ETrade\[dq],\[dq]2013\[dq],\[dq]GLD\[dq],\[dq]70.00\[dq]
sql \[dq]Assets:US:ETrade\[dq],\[dq]2013\[dq],\[dq]ITOT\[dq],\[dq]18.00\[dq]
T} \[dq]Assets:US:ETrade\[dq],\[dq]2013\[dq],\[dq]USD\[dq],\[dq]-98.12\[dq]
_ \[dq]Assets:US:ETrade\[dq],\[dq]2013\[dq],\[dq]VEA\[dq],\[dq]10.00\[dq]
T{ \[dq]Assets:US:ETrade\[dq],\[dq]2013\[dq],\[dq]VHT\[dq],\[dq]18.00\[dq]
wide \[dq]Assets:US:ETrade\[dq],\[dq]2014\[dq],\[dq]GLD\[dq],\[dq]0\[dq]
T}@T{ \[dq]Assets:US:ETrade\[dq],\[dq]2014\[dq],\[dq]ITOT\[dq],\[dq]-11.00\[dq]
Y \[dq]Assets:US:ETrade\[dq],\[dq]2014\[dq],\[dq]USD\[dq],\[dq]4881.44\[dq]
T}@T{ \[dq]Assets:US:ETrade\[dq],\[dq]2014\[dq],\[dq]VEA\[dq],\[dq]14.00\[dq]
Y \[dq]Assets:US:ETrade\[dq],\[dq]2014\[dq],\[dq]VHT\[dq],\[dq]170.00\[dq]
T}@T{ \[dq]total\[dq],\[dq]2012\[dq],\[dq]GLD\[dq],\[dq]0\[dq]
Y \[dq]total\[dq],\[dq]2012\[dq],\[dq]ITOT\[dq],\[dq]10.00\[dq]
T}@T{ \[dq]total\[dq],\[dq]2012\[dq],\[dq]USD\[dq],\[dq]337.18\[dq]
T}@T{ \[dq]total\[dq],\[dq]2012\[dq],\[dq]VEA\[dq],\[dq]12.00\[dq]
T} \[dq]total\[dq],\[dq]2012\[dq],\[dq]VHT\[dq],\[dq]106.00\[dq]
T{ \[dq]total\[dq],\[dq]2013\[dq],\[dq]GLD\[dq],\[dq]70.00\[dq]
tall \[dq]total\[dq],\[dq]2013\[dq],\[dq]ITOT\[dq],\[dq]18.00\[dq]
T}@T{ \[dq]total\[dq],\[dq]2013\[dq],\[dq]USD\[dq],\[dq]-98.12\[dq]
Y \[dq]total\[dq],\[dq]2013\[dq],\[dq]VEA\[dq],\[dq]10.00\[dq]
T}@T{ \[dq]total\[dq],\[dq]2013\[dq],\[dq]VHT\[dq],\[dq]18.00\[dq]
Y \[dq]total\[dq],\[dq]2014\[dq],\[dq]GLD\[dq],\[dq]0\[dq]
T}@T{ \[dq]total\[dq],\[dq]2014\[dq],\[dq]ITOT\[dq],\[dq]-11.00\[dq]
Y \[dq]total\[dq],\[dq]2014\[dq],\[dq]USD\[dq],\[dq]4881.44\[dq]
T}@T{ \[dq]total\[dq],\[dq]2014\[dq],\[dq]VEA\[dq],\[dq]14.00\[dq]
T}@T{ \[dq]total\[dq],\[dq]2014\[dq],\[dq]VHT\[dq],\[dq]170.00\[dq]
T} \f[R]
T{ .fi
bare .RE
T}@T{
Y
T}@T{
Y
T}@T{
Y
T}@T{
T}@T{
T}
.TE
.SS Sorting by amount .SS Sorting by amount
.PP .PP
With \f[C]-S/--sort-amount\f[R], accounts with the largest (most With \f[C]-S/--sort-amount\f[R], accounts with the largest (most

View File

@ -2327,7 +2327,7 @@ more control, then use 'balance'.
* Dropping top-level accounts:: * Dropping top-level accounts::
* Multi-period balance report:: * Multi-period balance report::
* Showing declared accounts:: * Showing declared accounts::
* Commodity layout:: * Data layout::
* Sorting by amount:: * Sorting by amount::
* Percentages:: * Percentages::
* Balance change end balance:: * Balance change end balance::
@ -2596,7 +2596,7 @@ viewing in the terminal. Here are some ways to handle that:
&& open a.html' && open a.html'
 
File: hledger.info, Node: Showing declared accounts, Next: Commodity layout, Prev: Multi-period balance report, Up: balance File: hledger.info, Node: Showing declared accounts, Next: Data layout, Prev: Multi-period balance report, Up: balance
11.5.8 Showing declared accounts 11.5.8 Showing declared accounts
-------------------------------- --------------------------------
@ -2614,19 +2614,32 @@ report, even when you don't have transactions in all of your declared
accounts yet. accounts yet.
 
File: hledger.info, Node: Commodity layout, Next: Sorting by amount, Prev: Showing declared accounts, Up: balance File: hledger.info, Node: Data layout, Next: Sorting by amount, Prev: Showing declared accounts, Up: balance
11.5.9 Commodity layout 11.5.9 Data layout
----------------------- ------------------
With '--layout', you can control how amounts with more than one With '--layout', you can influence how amounts with more than one
commodity are displayed: commodity are displayed (and a bit more), which in turn affects the
layout of the report data:
* '--layout=wide[,WIDTH]': on a single line, possibly elided to the * '--layout=wide[,WIDTH]': commodities are shown on a single line,
specified width possibly elided to the specified width
* '--layout=tall': each commodity is displayed on a separate line * '--layout=tall': each commodity is shown on a separate line
* '--layout=bare': amounts are displayed as bare numbers, with * '--layout=bare': amounts are shown as bare numbers, with commodity
commodity symbols in a separate column symbols in a separate column
* '--layout=tidy': data is normalised to tidy form, with one row per
data value (supported with CSV output only)
These '--layout' values affect some but not all of the output
formats, as shown:
- txt csv html json sql
---------------------------------------
wide Y Y Y
tall Y Y Y
bare Y Y Y
tidy Y
Examples: Examples:
@ -2709,16 +2722,47 @@ commodity are displayed:
"total","VEA","36.00" "total","VEA","36.00"
"total","VHT","294.00" "total","VHT","294.00"
Here is how '--layout' currently affects the various output formats: * Tidy layout produces normalised "tidy data", where every variable
is a column and each row represents a single data point (see
https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-data.html).
This is the form of data most easily processed by other software.
Currently we support it with the CSV output format only:
- txt csv html json sql $ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv --layout=tidy -Y
--------------------------------------- "account","date","commodity","value"
wide Y Y Y "Assets:US:ETrade","2012","GLD","0"
tall Y Y Y "Assets:US:ETrade","2012","ITOT","10.00"
bare Y Y Y "Assets:US:ETrade","2012","USD","337.18"
"Assets:US:ETrade","2012","VEA","12.00"
"Assets:US:ETrade","2012","VHT","106.00"
"Assets:US:ETrade","2013","GLD","70.00"
"Assets:US:ETrade","2013","ITOT","18.00"
"Assets:US:ETrade","2013","USD","-98.12"
"Assets:US:ETrade","2013","VEA","10.00"
"Assets:US:ETrade","2013","VHT","18.00"
"Assets:US:ETrade","2014","GLD","0"
"Assets:US:ETrade","2014","ITOT","-11.00"
"Assets:US:ETrade","2014","USD","4881.44"
"Assets:US:ETrade","2014","VEA","14.00"
"Assets:US:ETrade","2014","VHT","170.00"
"total","2012","GLD","0"
"total","2012","ITOT","10.00"
"total","2012","USD","337.18"
"total","2012","VEA","12.00"
"total","2012","VHT","106.00"
"total","2013","GLD","70.00"
"total","2013","ITOT","18.00"
"total","2013","USD","-98.12"
"total","2013","VEA","10.00"
"total","2013","VHT","18.00"
"total","2014","GLD","0"
"total","2014","ITOT","-11.00"
"total","2014","USD","4881.44"
"total","2014","VEA","14.00"
"total","2014","VHT","170.00"
 
File: hledger.info, Node: Sorting by amount, Next: Percentages, Prev: Commodity layout, Up: balance File: hledger.info, Node: Sorting by amount, Next: Percentages, Prev: Data layout, Up: balance
11.5.10 Sorting by amount 11.5.10 Sorting by amount
------------------------- -------------------------
@ -9180,396 +9224,396 @@ Node: aregister and custom posting dates79315
Ref: #aregister-and-custom-posting-dates79481 Ref: #aregister-and-custom-posting-dates79481
Node: balance80033 Node: balance80033
Ref: #balance80152 Ref: #balance80152
Node: balance features81150 Node: balance features81145
Ref: #balance-features81290 Ref: #balance-features81285
Node: Simple balance report83214 Node: Simple balance report83209
Ref: #simple-balance-report83396 Ref: #simple-balance-report83391
Node: Filtered balance report84876 Node: Filtered balance report84871
Ref: #filtered-balance-report85063 Ref: #filtered-balance-report85058
Node: List or tree mode85390 Node: List or tree mode85385
Ref: #list-or-tree-mode85558 Ref: #list-or-tree-mode85553
Node: Depth limiting86903 Node: Depth limiting86898
Ref: #depth-limiting87069 Ref: #depth-limiting87064
Node: Dropping top-level accounts87670 Node: Dropping top-level accounts87665
Ref: #dropping-top-level-accounts87872 Ref: #dropping-top-level-accounts87867
Node: Multi-period balance report88182 Node: Multi-period balance report88177
Ref: #multi-period-balance-report88395 Ref: #multi-period-balance-report88390
Node: Showing declared accounts90670 Node: Showing declared accounts90665
Ref: #showing-declared-accounts90868 Ref: #showing-declared-accounts90858
Node: Commodity layout91399 Node: Data layout91389
Ref: #commodity-layout91569 Ref: #data-layout91544
Node: Sorting by amount97608 Node: Sorting by amount99491
Ref: #sorting-by-amount97768 Ref: #sorting-by-amount99646
Node: Percentages98438 Node: Percentages100316
Ref: #percentages98596 Ref: #percentages100474
Node: Balance change end balance99557 Node: Balance change end balance101435
Ref: #balance-change-end-balance99750 Ref: #balance-change-end-balance101628
Node: Balance report types101178 Node: Balance report types103056
Ref: #balance-report-types101368 Ref: #balance-report-types103246
Node: Useful balance reports105647 Node: Useful balance reports107525
Ref: #useful-balance-reports105828 Ref: #useful-balance-reports107706
Node: Budget report106913 Node: Budget report108791
Ref: #budget-report107097 Ref: #budget-report108975
Node: Budget report start date112372 Node: Budget report start date114250
Ref: #budget-report-start-date112550 Ref: #budget-report-start-date114428
Node: Budgets and subaccounts113882 Node: Budgets and subaccounts115760
Ref: #budgets-and-subaccounts114089 Ref: #budgets-and-subaccounts115967
Node: Selecting budget goals117529 Node: Selecting budget goals119407
Ref: #selecting-budget-goals117701 Ref: #selecting-budget-goals119579
Node: Customising single-period balance reports118735 Node: Customising single-period balance reports120613
Ref: #customising-single-period-balance-reports118944 Ref: #customising-single-period-balance-reports120822
Node: balancesheet121119 Node: balancesheet122997
Ref: #balancesheet121257 Ref: #balancesheet123135
Node: balancesheetequity122556 Node: balancesheetequity124434
Ref: #balancesheetequity122707 Ref: #balancesheetequity124585
Node: cashflow124087 Node: cashflow125965
Ref: #cashflow124211 Ref: #cashflow126089
Node: check125357 Node: check127235
Ref: #check125462 Ref: #check127340
Node: Basic checks126096 Node: Basic checks127974
Ref: #basic-checks126214 Ref: #basic-checks128092
Node: Strict checks126765 Node: Strict checks128643
Ref: #strict-checks126906 Ref: #strict-checks128784
Node: Other checks127342 Node: Other checks129220
Ref: #other-checks127482 Ref: #other-checks129360
Node: Custom checks127839 Node: Custom checks129717
Ref: #custom-checks127959 Ref: #custom-checks129837
Node: close128376 Node: close130254
Ref: #close128480 Ref: #close130358
Node: close and prices130571 Node: close and prices132449
Ref: #close-and-prices130700 Ref: #close-and-prices132578
Node: close date131095 Node: close date132973
Ref: #close-date131279 Ref: #close-date133157
Node: Example close asset/liability accounts for file transition132036 Node: Example close asset/liability accounts for file transition133914
Ref: #example-close-assetliability-accounts-for-file-transition132337 Ref: #example-close-assetliability-accounts-for-file-transition134215
Node: Hiding opening/closing transactions133196 Node: Hiding opening/closing transactions135074
Ref: #hiding-openingclosing-transactions133467 Ref: #hiding-openingclosing-transactions135345
Node: close and balance assertions134844 Node: close and balance assertions136722
Ref: #close-and-balance-assertions135102 Ref: #close-and-balance-assertions136980
Node: Example close revenue/expense accounts to retained earnings136456 Node: Example close revenue/expense accounts to retained earnings138334
Ref: #example-close-revenueexpense-accounts-to-retained-earnings136734 Ref: #example-close-revenueexpense-accounts-to-retained-earnings138612
Node: codes137624 Node: codes139502
Ref: #codes137734 Ref: #codes139612
Node: commodities138446 Node: commodities140324
Ref: #commodities138575 Ref: #commodities140453
Node: descriptions138657 Node: descriptions140535
Ref: #descriptions138787 Ref: #descriptions140665
Node: diff139091 Node: diff140969
Ref: #diff139199 Ref: #diff141077
Node: files140246 Node: files142124
Ref: #files140348 Ref: #files142226
Node: help140495 Node: help142373
Ref: #help140597 Ref: #help142475
Node: import141415 Node: import143293
Ref: #import141531 Ref: #import143409
Node: Deduplication142396 Node: Deduplication144274
Ref: #deduplication142521 Ref: #deduplication144399
Node: Import testing144415 Node: Import testing146293
Ref: #import-testing144580 Ref: #import-testing146458
Node: Importing balance assignments145068 Node: Importing balance assignments146946
Ref: #importing-balance-assignments145274 Ref: #importing-balance-assignments147152
Node: Commodity display styles145923 Node: Commodity display styles147801
Ref: #commodity-display-styles146096 Ref: #commodity-display-styles147974
Node: incomestatement146225 Node: incomestatement148103
Ref: #incomestatement146360 Ref: #incomestatement148238
Node: notes147665 Node: notes149543
Ref: #notes147780 Ref: #notes149658
Node: payees148148 Node: payees150026
Ref: #payees148256 Ref: #payees150134
Node: prices148782 Node: prices150660
Ref: #prices148890 Ref: #prices150768
Node: print149259 Node: print151137
Ref: #print149371 Ref: #print151249
Node: print-unique154686 Node: print-unique156564
Ref: #print-unique154814 Ref: #print-unique156692
Node: register155099 Node: register156977
Ref: #register155228 Ref: #register157106
Node: Custom register output159674 Node: Custom register output161552
Ref: #custom-register-output159805 Ref: #custom-register-output161683
Node: register-match161142 Node: register-match163020
Ref: #register-match161278 Ref: #register-match163156
Node: rewrite161629 Node: rewrite163507
Ref: #rewrite161746 Ref: #rewrite163624
Node: Re-write rules in a file163652 Node: Re-write rules in a file165530
Ref: #re-write-rules-in-a-file163815 Ref: #re-write-rules-in-a-file165693
Node: Diff output format164964 Node: Diff output format166842
Ref: #diff-output-format165147 Ref: #diff-output-format167025
Node: rewrite vs print --auto166239 Node: rewrite vs print --auto168117
Ref: #rewrite-vs.-print---auto166399 Ref: #rewrite-vs.-print---auto168277
Node: roi166955 Node: roi168833
Ref: #roi167055 Ref: #roi168933
Node: Spaces and special characters in --inv and --pnl168741 Node: Spaces and special characters in --inv and --pnl170619
Ref: #spaces-and-special-characters-in---inv-and---pnl168981 Ref: #spaces-and-special-characters-in---inv-and---pnl170859
Node: Semantics of --inv and --pnl169469 Node: Semantics of --inv and --pnl171347
Ref: #semantics-of---inv-and---pnl169708 Ref: #semantics-of---inv-and---pnl171586
Node: IRR and TWR explained171558 Node: IRR and TWR explained173436
Ref: #irr-and-twr-explained171718 Ref: #irr-and-twr-explained173596
Node: stats174786 Node: stats176664
Ref: #stats174887 Ref: #stats176765
Node: tags176267 Node: tags178145
Ref: #tags176367 Ref: #tags178245
Node: test176886 Node: test178764
Ref: #test177002 Ref: #test178880
Node: About add-on commands177749 Node: About add-on commands179627
Ref: #about-add-on-commands177886 Ref: #about-add-on-commands179764
Node: JOURNAL FORMAT179017 Node: JOURNAL FORMAT180895
Ref: #journal-format179145 Ref: #journal-format181023
Node: Transactions181372 Node: Transactions183250
Ref: #transactions181487 Ref: #transactions183365
Node: Dates182501 Node: Dates184379
Ref: #dates182617 Ref: #dates184495
Node: Simple dates182682 Node: Simple dates184560
Ref: #simple-dates182802 Ref: #simple-dates184680
Node: Secondary dates183311 Node: Secondary dates185189
Ref: #secondary-dates183459 Ref: #secondary-dates185337
Node: Posting dates184795 Node: Posting dates186673
Ref: #posting-dates184918 Ref: #posting-dates186796
Node: Status186290 Node: Status188168
Ref: #status186400 Ref: #status188278
Node: Code188108 Node: Code189986
Ref: #code188220 Ref: #code190098
Node: Description188452 Node: Description190330
Ref: #description188580 Ref: #description190458
Node: Payee and note188900 Node: Payee and note190778
Ref: #payee-and-note189008 Ref: #payee-and-note190886
Node: Comments189343 Node: Comments191221
Ref: #comments189465 Ref: #comments191343
Node: Tags190659 Node: Tags192537
Ref: #tags-1190770 Ref: #tags-1192648
Node: Postings192163 Node: Postings194041
Ref: #postings192287 Ref: #postings194165
Node: Virtual postings193313 Node: Virtual postings195191
Ref: #virtual-postings193424 Ref: #virtual-postings195302
Node: Account names194729 Node: Account names196607
Ref: #account-names194866 Ref: #account-names196744
Node: Amounts195354 Node: Amounts197232
Ref: #amounts195491 Ref: #amounts197369
Node: Decimal marks digit group marks196476 Node: Decimal marks digit group marks198354
Ref: #decimal-marks-digit-group-marks196653 Ref: #decimal-marks-digit-group-marks198531
Node: Commodity197674 Node: Commodity199552
Ref: #commodity197863 Ref: #commodity199741
Node: Directives influencing number parsing and display198815 Node: Directives influencing number parsing and display200693
Ref: #directives-influencing-number-parsing-and-display199076 Ref: #directives-influencing-number-parsing-and-display200954
Node: Commodity display style199569 Node: Commodity display style201447
Ref: #commodity-display-style199777 Ref: #commodity-display-style201655
Node: Rounding201972 Node: Rounding203850
Ref: #rounding202092 Ref: #rounding203970
Node: Transaction prices202504 Node: Transaction prices204382
Ref: #transaction-prices202670 Ref: #transaction-prices204548
Node: Lot prices lot dates205101 Node: Lot prices lot dates206979
Ref: #lot-prices-lot-dates205284 Ref: #lot-prices-lot-dates207162
Node: Balance assertions205772 Node: Balance assertions207650
Ref: #balance-assertions205950 Ref: #balance-assertions207828
Node: Assertions and ordering206983 Node: Assertions and ordering208861
Ref: #assertions-and-ordering207165 Ref: #assertions-and-ordering209043
Node: Assertions and included files207865 Node: Assertions and included files209743
Ref: #assertions-and-included-files208102 Ref: #assertions-and-included-files209980
Node: Assertions and multiple -f options208435 Node: Assertions and multiple -f options210313
Ref: #assertions-and-multiple--f-options208685 Ref: #assertions-and-multiple--f-options210563
Node: Assertions and commodities208817 Node: Assertions and commodities210695
Ref: #assertions-and-commodities209043 Ref: #assertions-and-commodities210921
Node: Assertions and prices210200 Node: Assertions and prices212078
Ref: #assertions-and-prices210408 Ref: #assertions-and-prices212286
Node: Assertions and subaccounts210848 Node: Assertions and subaccounts212726
Ref: #assertions-and-subaccounts211071 Ref: #assertions-and-subaccounts212949
Node: Assertions and virtual postings211395 Node: Assertions and virtual postings213273
Ref: #assertions-and-virtual-postings211631 Ref: #assertions-and-virtual-postings213509
Node: Assertions and precision211773 Node: Assertions and precision213651
Ref: #assertions-and-precision211960 Ref: #assertions-and-precision213838
Node: Balance assignments212227 Node: Balance assignments214105
Ref: #balance-assignments212397 Ref: #balance-assignments214275
Node: Balance assignments and prices213561 Node: Balance assignments and prices215439
Ref: #balance-assignments-and-prices213727 Ref: #balance-assignments-and-prices215605
Node: Directives213951 Node: Directives215829
Ref: #directives214114 Ref: #directives215992
Node: Directives and multiple files218606 Node: Directives and multiple files220484
Ref: #directives-and-multiple-files218802 Ref: #directives-and-multiple-files220680
Node: Comment blocks219494 Node: Comment blocks221372
Ref: #comment-blocks219671 Ref: #comment-blocks221549
Node: Including other files219847 Node: Including other files221725
Ref: #including-other-files220021 Ref: #including-other-files221899
Node: Default year220945 Node: Default year222823
Ref: #default-year221103 Ref: #default-year222981
Node: Declaring payees221510 Node: Declaring payees223388
Ref: #declaring-payees221681 Ref: #declaring-payees223559
Node: Declaring the decimal mark221927 Node: Declaring the decimal mark223805
Ref: #declaring-the-decimal-mark222127 Ref: #declaring-the-decimal-mark224005
Node: Declaring commodities222524 Node: Declaring commodities224402
Ref: #declaring-commodities222715 Ref: #declaring-commodities224593
Node: Commodity error checking225233 Node: Commodity error checking227111
Ref: #commodity-error-checking225383 Ref: #commodity-error-checking227261
Node: Default commodity225640 Node: Default commodity227518
Ref: #default-commodity225820 Ref: #default-commodity227698
Node: Declaring market prices226936 Node: Declaring market prices228814
Ref: #declaring-market-prices227125 Ref: #declaring-market-prices229003
Node: Declaring accounts227938 Node: Declaring accounts229816
Ref: #declaring-accounts228118 Ref: #declaring-accounts229996
Node: Account error checking229320 Node: Account error checking231198
Ref: #account-error-checking229486 Ref: #account-error-checking231364
Node: Account comments230665 Node: Account comments232543
Ref: #account-comments230849 Ref: #account-comments232727
Node: Account subdirectives231273 Node: Account subdirectives233151
Ref: #account-subdirectives231458 Ref: #account-subdirectives233336
Node: Account types231771 Node: Account types233649
Ref: #account-types231945 Ref: #account-types233823
Node: Auto-detected account types233268 Node: Auto-detected account types235146
Ref: #auto-detected-account-types233423 Ref: #auto-detected-account-types235301
Node: Account display order234658 Node: Account display order236536
Ref: #account-display-order234818 Ref: #account-display-order236696
Node: Rewriting accounts235969 Node: Rewriting accounts237847
Ref: #rewriting-accounts236148 Ref: #rewriting-accounts238026
Node: Basic aliases236905 Node: Basic aliases238783
Ref: #basic-aliases237041 Ref: #basic-aliases238919
Node: Regex aliases237785 Node: Regex aliases239663
Ref: #regex-aliases237947 Ref: #regex-aliases239825
Node: Combining aliases238666 Node: Combining aliases240544
Ref: #combining-aliases238849 Ref: #combining-aliases240727
Node: Aliases and multiple files240125 Node: Aliases and multiple files242003
Ref: #aliases-and-multiple-files240324 Ref: #aliases-and-multiple-files242202
Node: end aliases240903 Node: end aliases242781
Ref: #end-aliases241050 Ref: #end-aliases242928
Node: Default parent account241199 Node: Default parent account243077
Ref: #default-parent-account241389 Ref: #default-parent-account243267
Node: Periodic transactions242273 Node: Periodic transactions244151
Ref: #periodic-transactions242456 Ref: #periodic-transactions244334
Node: Periodic rule syntax244373 Node: Periodic rule syntax246251
Ref: #periodic-rule-syntax244573 Ref: #periodic-rule-syntax246451
Node: Two spaces between period expression and description!245277 Node: Two spaces between period expression and description!247155
Ref: #two-spaces-between-period-expression-and-description245590 Ref: #two-spaces-between-period-expression-and-description247468
Node: Forecasting with periodic transactions246274 Node: Forecasting with periodic transactions248152
Ref: #forecasting-with-periodic-transactions246573 Ref: #forecasting-with-periodic-transactions248451
Node: Budgeting with periodic transactions249344 Node: Budgeting with periodic transactions251222
Ref: #budgeting-with-periodic-transactions249577 Ref: #budgeting-with-periodic-transactions251455
Node: Auto postings249986 Node: Auto postings251864
Ref: #auto-postings250122 Ref: #auto-postings252000
Node: Auto postings and multiple files252301 Node: Auto postings and multiple files254179
Ref: #auto-postings-and-multiple-files252499 Ref: #auto-postings-and-multiple-files254377
Node: Auto postings and dates252708 Node: Auto postings and dates254586
Ref: #auto-postings-and-dates252976 Ref: #auto-postings-and-dates254854
Node: Auto postings and transaction balancing / inferred amounts / balance assertions253151 Node: Auto postings and transaction balancing / inferred amounts / balance assertions255029
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions253496 Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions255374
Node: Auto posting tags253999 Node: Auto posting tags255877
Ref: #auto-posting-tags254208 Ref: #auto-posting-tags256086
Node: CSV FORMAT254844 Node: CSV FORMAT256722
Ref: #csv-format254972 Ref: #csv-format256850
Node: Examples257601 Node: Examples259479
Ref: #examples257704 Ref: #examples259582
Node: Basic257912 Node: Basic259790
Ref: #basic258014 Ref: #basic259892
Node: Bank of Ireland258556 Node: Bank of Ireland260434
Ref: #bank-of-ireland258693 Ref: #bank-of-ireland260571
Node: Amazon260155 Node: Amazon262033
Ref: #amazon260275 Ref: #amazon262153
Node: Paypal261994 Node: Paypal263872
Ref: #paypal262090 Ref: #paypal263968
Node: CSV rules269734 Node: CSV rules271612
Ref: #csv-rules269852 Ref: #csv-rules271730
Node: skip270185 Node: skip272063
Ref: #skip270285 Ref: #skip272163
Node: fields list270660 Node: fields list272538
Ref: #fields-list270799 Ref: #fields-list272677
Node: field assignment272302 Node: field assignment274180
Ref: #field-assignment272454 Ref: #field-assignment274332
Node: Field names273489 Node: Field names275367
Ref: #field-names273629 Ref: #field-names275507
Node: date field274009 Node: date field275887
Ref: #date-field274129 Ref: #date-field276007
Node: date2 field274177 Node: date2 field276055
Ref: #date2-field274320 Ref: #date2-field276198
Node: status field274376 Node: status field276254
Ref: #status-field274521 Ref: #status-field276399
Node: code field274570 Node: code field276448
Ref: #code-field274717 Ref: #code-field276595
Node: description field274762 Node: description field276640
Ref: #description-field274924 Ref: #description-field276802
Node: comment field274983 Node: comment field276861
Ref: #comment-field275140 Ref: #comment-field277018
Node: account field275440 Node: account field277318
Ref: #account-field275592 Ref: #account-field277470
Node: amount field276167 Node: amount field278045
Ref: #amount-field276318 Ref: #amount-field278196
Node: currency field277563 Node: currency field279441
Ref: #currency-field277718 Ref: #currency-field279596
Node: balance field277975 Node: balance field279853
Ref: #balance-field278109 Ref: #balance-field279987
Node: separator278481 Node: separator280359
Ref: #separator278613 Ref: #separator280491
Node: if block279153 Node: if block281031
Ref: #if-block279280 Ref: #if-block281158
Node: Matching the whole record279681 Node: Matching the whole record281559
Ref: #matching-the-whole-record279858 Ref: #matching-the-whole-record281736
Node: Matching individual fields280661 Node: Matching individual fields282539
Ref: #matching-individual-fields280867 Ref: #matching-individual-fields282745
Node: Combining matchers281091 Node: Combining matchers282969
Ref: #combining-matchers281289 Ref: #combining-matchers283167
Node: Rules applied on successful match281602 Node: Rules applied on successful match283480
Ref: #rules-applied-on-successful-match281795 Ref: #rules-applied-on-successful-match283673
Node: if table282449 Node: if table284327
Ref: #if-table282570 Ref: #if-table284448
Node: end284308 Node: end286186
Ref: #end284422 Ref: #end286300
Node: date-format284646 Node: date-format286524
Ref: #date-format284780 Ref: #date-format286658
Node: decimal-mark285776 Node: decimal-mark287654
Ref: #decimal-mark285923 Ref: #decimal-mark287801
Node: newest-first286262 Node: newest-first288140
Ref: #newest-first286405 Ref: #newest-first288283
Node: include287088 Node: include288966
Ref: #include287221 Ref: #include289099
Node: balance-type287665 Node: balance-type289543
Ref: #balance-type287787 Ref: #balance-type289665
Node: Tips288487 Node: Tips290365
Ref: #tips288578 Ref: #tips290456
Node: Rapid feedback288877 Node: Rapid feedback290755
Ref: #rapid-feedback288996 Ref: #rapid-feedback290874
Node: Valid CSV289448 Node: Valid CSV291326
Ref: #valid-csv289580 Ref: #valid-csv291458
Node: File Extension289772 Node: File Extension291650
Ref: #file-extension289926 Ref: #file-extension291804
Node: Reading multiple CSV files290355 Node: Reading multiple CSV files292233
Ref: #reading-multiple-csv-files290542 Ref: #reading-multiple-csv-files292420
Node: Valid transactions290783 Node: Valid transactions292661
Ref: #valid-transactions290963 Ref: #valid-transactions292841
Node: Deduplicating importing291591 Node: Deduplicating importing293469
Ref: #deduplicating-importing291772 Ref: #deduplicating-importing293650
Node: Setting amounts292805 Node: Setting amounts294683
Ref: #setting-amounts292962 Ref: #setting-amounts294840
Node: Amount signs295403 Node: Amount signs297281
Ref: #amount-signs295557 Ref: #amount-signs297435
Node: Setting currency/commodity296244 Node: Setting currency/commodity298122
Ref: #setting-currencycommodity296432 Ref: #setting-currencycommodity298310
Node: Amount decimal places297606 Node: Amount decimal places299484
Ref: #amount-decimal-places297798 Ref: #amount-decimal-places299676
Node: Referencing other fields298110 Node: Referencing other fields299988
Ref: #referencing-other-fields298309 Ref: #referencing-other-fields300187
Node: How CSV rules are evaluated299206 Node: How CSV rules are evaluated301084
Ref: #how-csv-rules-are-evaluated299381 Ref: #how-csv-rules-are-evaluated301259
Node: TIMECLOCK FORMAT300832 Node: TIMECLOCK FORMAT302710
Ref: #timeclock-format300972 Ref: #timeclock-format302850
Node: TIMEDOT FORMAT303033 Node: TIMEDOT FORMAT304911
Ref: #timedot-format303171 Ref: #timedot-format305049
Node: COMMON TASKS307733 Node: COMMON TASKS309611
Ref: #common-tasks307862 Ref: #common-tasks309740
Node: Getting help308269 Node: Getting help310147
Ref: #getting-help308403 Ref: #getting-help310281
Node: Constructing command lines308956 Node: Constructing command lines310834
Ref: #constructing-command-lines309150 Ref: #constructing-command-lines311028
Node: Starting a journal file309847 Node: Starting a journal file311725
Ref: #starting-a-journal-file310047 Ref: #starting-a-journal-file311925
Node: Setting opening balances311235 Node: Setting opening balances313113
Ref: #setting-opening-balances311433 Ref: #setting-opening-balances313311
Node: Recording transactions314574 Node: Recording transactions316452
Ref: #recording-transactions314756 Ref: #recording-transactions316634
Node: Reconciling315312 Node: Reconciling317190
Ref: #reconciling315457 Ref: #reconciling317335
Node: Reporting317714 Node: Reporting319592
Ref: #reporting317856 Ref: #reporting319734
Node: Migrating to a new file321855 Node: Migrating to a new file323733
Ref: #migrating-to-a-new-file322005 Ref: #migrating-to-a-new-file323883
Node: LIMITATIONS322304 Node: LIMITATIONS324182
Ref: #limitations322432 Ref: #limitations324310
Node: TROUBLESHOOTING323175 Node: TROUBLESHOOTING325053
Ref: #troubleshooting323290 Ref: #troubleshooting325168
 
End Tag Table End Tag Table

View File

@ -2198,17 +2198,33 @@ COMMANDS
report, even when you don't have transactions in all of your declared report, even when you don't have transactions in all of your declared
accounts yet. accounts yet.
Commodity layout Data layout
With --layout, you can control how amounts with more than one commodity With --layout, you can influence how amounts with more than one commod-
are displayed: ity are displayed (and a bit more), which in turn affects the layout of
the report data:
o --layout=wide[,WIDTH]: on a single line, possibly elided to the spec- o --layout=wide[,WIDTH]: commodities are shown on a single line, possi-
ified width bly elided to the specified width
o --layout=tall: each commodity is displayed on a separate line o --layout=tall: each commodity is shown on a separate line
o --layout=bare: amounts are displayed as bare numbers, with commodity o --layout=bare: amounts are shown as bare numbers, with commodity sym-
symbols in a separate column bols in a separate column
o --layout=tidy: data is normalised to tidy form, with one row per data
value (supported with CSV output only)
These --layout values affect some but not all of the output formats, as
shown:
- txt csv html json sql
-------------------------------------
wide Y Y Y
tall Y Y Y
bare Y Y Y
tidy Y
Examples: Examples:
@ -2291,15 +2307,44 @@ COMMANDS
"total","VEA","36.00" "total","VEA","36.00"
"total","VHT","294.00" "total","VHT","294.00"
Here is how --layout currently affects the various output formats: o Tidy layout produces normalised "tidy data", where every variable is
a column and each row represents a single data point (see
https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-
data.html). This is the form of data most easily processed by other
software. Currently we support it with the CSV output format only:
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -O csv --layout=tidy -Y
- txt csv html json sql "account","date","commodity","value"
------------------------------------- "Assets:US:ETrade","2012","GLD","0"
"Assets:US:ETrade","2012","ITOT","10.00"
wide Y Y Y "Assets:US:ETrade","2012","USD","337.18"
tall Y Y Y "Assets:US:ETrade","2012","VEA","12.00"
bare Y Y Y "Assets:US:ETrade","2012","VHT","106.00"
"Assets:US:ETrade","2013","GLD","70.00"
"Assets:US:ETrade","2013","ITOT","18.00"
"Assets:US:ETrade","2013","USD","-98.12"
"Assets:US:ETrade","2013","VEA","10.00"
"Assets:US:ETrade","2013","VHT","18.00"
"Assets:US:ETrade","2014","GLD","0"
"Assets:US:ETrade","2014","ITOT","-11.00"
"Assets:US:ETrade","2014","USD","4881.44"
"Assets:US:ETrade","2014","VEA","14.00"
"Assets:US:ETrade","2014","VHT","170.00"
"total","2012","GLD","0"
"total","2012","ITOT","10.00"
"total","2012","USD","337.18"
"total","2012","VEA","12.00"
"total","2012","VHT","106.00"
"total","2013","GLD","70.00"
"total","2013","ITOT","18.00"
"total","2013","USD","-98.12"
"total","2013","VEA","10.00"
"total","2013","VHT","18.00"
"total","2014","GLD","0"
"total","2014","ITOT","-11.00"
"total","2014","USD","4881.44"
"total","2014","VEA","14.00"
"total","2014","VHT","170.00"
Sorting by amount Sorting by amount
With -S/--sort-amount, accounts with the largest (most positive) bal- With -S/--sort-amount, accounts with the largest (most positive) bal-
@ -3087,6 +3132,7 @@ COMMANDS
-e 2021-01-01 end dates are exclusive -e 2021-01-01 end dates are exclusive
-e 2021 equivalent, per smart -e 2021 equivalent, per smart
dates dates
-p 2020 equivalent, the period's -p 2020 equivalent, the period's
begin date is ignored begin date is ignored
date:2020 equivalent query date:2020 equivalent query
@ -4942,6 +4988,7 @@ JOURNAL FORMAT
Generate extra postings = Generate extra postings =
CHECKING FOR ERRORS: CHECKING FOR ERRORS:
Define valid entities to allow account, commodity, Define valid entities to allow account, commodity,
stricter error checking payee stricter error checking payee
DISPLAYING REPORTS: DISPLAYING REPORTS: