doc: update generated manuals

This commit is contained in:
Simon Michael 2017-03-28 04:09:29 -07:00
parent abfd6394ee
commit 64a97774c4
3 changed files with 485 additions and 179 deletions

View File

@ -1662,8 +1662,43 @@ $\ hledger\ balance\ \-o\ FILE.csv\ \ #\ write\ CSV\ to\ FILE.csv
Show a balance sheet. Show a balance sheet.
Alias: bs. Alias: bs.
.TP .TP
.B \f[C]\-\-change\f[]
show balance change in each period, instead of historical ending
balances
.RS
.RE
.TP
.B \f[C]\-\-cumulative\f[]
show balance change accumulated across periods (in multicolumn reports),
instead of historical ending balances
.RS
.RE
.TP
.B \f[C]\-H\ \-\-historical\f[]
show historical ending balance in each period (includes postings before
report start date) (default)
.RS
.RE
.TP
.B \f[C]\-\-tree\f[]
show accounts as a tree; amounts include subaccounts (default in simple
reports)
.RS
.RE
.TP
.B \f[C]\-\-flat\f[] .B \f[C]\-\-flat\f[]
show full account names, as a list (default) show accounts as a list; amounts exclude subaccounts except when account
is depth\-clipped (default in multicolumn reports)
.RS
.RE
.TP
.B \f[C]\-A\ \-\-average\f[]
show a row average column (in multicolumn mode)
.RS
.RE
.TP
.B \f[C]\-T\ \-\-row\-total\f[]
show a row total column (in multicolumn mode)
.RS .RS
.RE .RE
.TP .TP
@ -1673,7 +1708,7 @@ don\[aq]t show the final total row
.RE .RE
.TP .TP
.B \f[C]\-\-drop=N\f[] .B \f[C]\-\-drop=N\f[]
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
.RS .RS
.RE .RE
.TP .TP
@ -1713,23 +1748,66 @@ Total:
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0
\f[] \f[]
.fi .fi
.PP
If given a period flag, renders a multi\-column balance with the same
format as \f[C]balance\f[], with asset and liability totals as well as
an overall total if desired.
.PP
This command shows normally historical end\-balance reports, but for
flexibility, also accepts \f[C]\-\-cumulative\f[] and
\f[C]\-\-change\f[] to display cumulative ending balances and changes in
reporting periods.
.SS cashflow .SS cashflow
.PP .PP
Show a cashflow statement. Show a cashflow statement.
Alias: cf. Alias: cf.
.TP .TP
.B \f[C]\-\-change\f[]
show balance change in each period (default)
.RS
.RE
.TP
.B \f[C]\-\-cumulative\f[]
show balance change accumulated across periods (in multicolumn reports),
instead of changes during periods
.RS
.RE
.TP
.B \f[C]\-H\ \-\-historical\f[]
show historical ending balance in each period (includes postings before
report start date), instead of changes during each period
.RS
.RE
.TP
.B \f[C]\-\-tree\f[]
show accounts as a tree; amounts include subaccounts (default in simple
reports)
.RS
.RE
.TP
.B \f[C]\-\-flat\f[] .B \f[C]\-\-flat\f[]
show full account names, as a list (default) show accounts as a list; amounts exclude subaccounts except when account
is depth\-clipped (default in multicolumn reports)
.RS
.RE
.TP
.B \f[C]\-A\ \-\-average\f[]
show a row average column (in multicolumn mode)
.RS
.RE
.TP
.B \f[C]\-T\ \-\-row\-total\f[]
show a row total column (in multicolumn mode)
.RS .RS
.RE .RE
.TP .TP
.B \f[C]\-N\ \-\-no\-total\f[] .B \f[C]\-N\ \-\-no\-total\f[]
don\[aq]t show the final total row don\[aq]t show the final total row (in simple reports)
.RS .RS
.RE .RE
.TP .TP
.B \f[C]\-\-drop=N\f[] .B \f[C]\-\-drop=N\f[]
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
.RS .RS
.RE .RE
.TP .TP
@ -1766,6 +1844,14 @@ Total:
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\-1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $\-1
\f[] \f[]
.fi .fi
.PP
If given a period flag, renders a multi\-column balance with the same
format as \f[C]balance\f[].
.PP
This command normally shows period change reports, but for flexibility,
also accepts \f[C]\-\-cumulative\f[] and \f[C]\-\-historical\f[] to
display cumulative ending balances and historical ending balances, as
well.
.SS help .SS help
.PP .PP
Show any of the hledger manuals. Show any of the hledger manuals.
@ -1809,8 +1895,42 @@ SYNOPSIS
Show an income statement. Show an income statement.
Alias: is. Alias: is.
.TP .TP
.B \f[C]\-\-change\f[]
show balance change in each period (default)
.RS
.RE
.TP
.B \f[C]\-\-cumulative\f[]
show balance change accumulated across periods (in multicolumn reports),
instead of changes during periods
.RS
.RE
.TP
.B \f[C]\-H\ \-\-historical\f[]
show historical ending balance in each period (includes postings before
report start date), instead of changes during each period
.RS
.RE
.TP
.B \f[C]\-\-tree\f[]
show accounts as a tree; amounts include subaccounts (default in simple
reports)
.RS
.RE
.TP
.B \f[C]\-\-flat\f[] .B \f[C]\-\-flat\f[]
show full account names, as a list (default) show accounts as a list; amounts exclude subaccounts except when account
is depth\-clipped (default in multicolumn reports)
.RS
.RE
.TP
.B \f[C]\-A\ \-\-average\f[]
show a row average column (in multicolumn mode)
.RS
.RE
.TP
.B \f[C]\-T\ \-\-row\-total\f[]
show a row total column (in multicolumn mode)
.RS .RS
.RE .RE
.TP .TP
@ -1820,7 +1940,7 @@ don\[aq]t show the final total row
.RE .RE
.TP .TP
.B \f[C]\-\-drop=N\f[] .B \f[C]\-\-drop=N\f[]
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
.RS .RS
.RE .RE
.TP .TP
@ -1863,6 +1983,14 @@ Total:
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0
\f[] \f[]
.fi .fi
.PP
If given a period flag, renders a multi\-column balance with the same
format as \f[C]balance\f[].
.PP
This command normally shows period change reports, but for flexibility,
also accepts \f[C]\-\-cumulative\f[] and \f[C]\-\-historical\f[] to
display cumulative ending balances and historical ending balances, as
well.
.SS info .SS info
.PP .PP
Show any of the hledger manuals using info. Show any of the hledger manuals using info.
@ -2310,9 +2438,10 @@ hledger\-check.hs checks more powerful account balance assertions.
.PP .PP
hledger\-check\-dates.hs checks that journal entries are ordered by hledger\-check\-dates.hs checks that journal entries are ordered by
date. date.
.SS dupes .SS check\-dupes
.PP .PP
hledger\-dupes.hs checks for account names sharing the same leaf name. hledger\-check\-dupes.hs checks for account names sharing the same leaf
name.
.SS equity .SS equity
.PP .PP
hledger\-equity.hs prints balance\-resetting transactions, useful for hledger\-equity.hs prints balance\-resetting transactions, useful for

View File

@ -1272,15 +1272,38 @@ File: hledger.1.info, Node: balancesheet, Next: cashflow, Prev: balance, Up:
Show a balance sheet. Alias: bs. Show a balance sheet. Alias: bs.
'--change'
show balance change in each period, instead of historical ending
balances
'--cumulative'
show balance change accumulated across periods (in multicolumn
reports), instead of historical ending balances
'-H --historical'
show historical ending balance in each period (includes postings
before report start date) (default)
'--tree'
show accounts as a tree; amounts include subaccounts (default in
simple reports)
'--flat' '--flat'
show full account names, as a list (default) show accounts as a list; amounts exclude subaccounts except when
account is depth-clipped (default in multicolumn reports)
'-A --average'
show a row average column (in multicolumn mode)
'-T --row-total'
show a row total column (in multicolumn mode)
'-N --no-total' '-N --no-total'
don't show the final total row don't show the final total row
'--drop=N' '--drop=N'
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
'--no-elide' '--no-elide'
don't squash boring parent accounts (in tree mode) don't squash boring parent accounts (in tree mode)
@ -1311,6 +1334,14 @@ Total:
-------------------- --------------------
0 0
If given a period flag, renders a multi-column balance with the same
format as 'balance', with asset and liability totals as well as an
overall total if desired.
This command shows normally historical end-balance reports, but for
flexibility, also accepts '--cumulative' and '--change' to display
cumulative ending balances and changes in reporting periods.
 
File: hledger.1.info, Node: cashflow, Next: help, Prev: balancesheet, Up: COMMANDS File: hledger.1.info, Node: cashflow, Next: help, Prev: balancesheet, Up: COMMANDS
@ -1319,15 +1350,37 @@ File: hledger.1.info, Node: cashflow, Next: help, Prev: balancesheet, Up: CO
Show a cashflow statement. Alias: cf. Show a cashflow statement. Alias: cf.
'--change'
show balance change in each period (default)
'--cumulative'
show balance change accumulated across periods (in multicolumn
reports), instead of changes during periods
'-H --historical'
show historical ending balance in each period (includes postings
before report start date), instead of changes during each period
'--tree'
show accounts as a tree; amounts include subaccounts (default in
simple reports)
'--flat' '--flat'
show full account names, as a list (default) show accounts as a list; amounts exclude subaccounts except when
account is depth-clipped (default in multicolumn reports)
'-A --average'
show a row average column (in multicolumn mode)
'-T --row-total'
show a row total column (in multicolumn mode)
'-N --no-total' '-N --no-total'
don't show the final total row don't show the final total row (in simple reports)
'--drop=N' '--drop=N'
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
'--no-elide' '--no-elide'
don't squash boring parent accounts (in tree mode) don't squash boring parent accounts (in tree mode)
@ -1354,6 +1407,13 @@ Total:
-------------------- --------------------
$-1 $-1
If given a period flag, renders a multi-column balance with the same
format as 'balance'.
This command normally shows period change reports, but for
flexibility, also accepts '--cumulative' and '--historical' to display
cumulative ending balances and historical ending balances, as well.
 
File: hledger.1.info, Node: help, Next: incomestatement, Prev: cashflow, Up: COMMANDS File: hledger.1.info, Node: help, Next: incomestatement, Prev: cashflow, Up: COMMANDS
@ -1395,15 +1455,37 @@ File: hledger.1.info, Node: incomestatement, Next: info, Prev: help, Up: COM
Show an income statement. Alias: is. Show an income statement. Alias: is.
'--change'
show balance change in each period (default)
'--cumulative'
show balance change accumulated across periods (in multicolumn
reports), instead of changes during periods
'-H --historical'
show historical ending balance in each period (includes postings
before report start date), instead of changes during each period
'--tree'
show accounts as a tree; amounts include subaccounts (default in
simple reports)
'--flat' '--flat'
show full account names, as a list (default) show accounts as a list; amounts exclude subaccounts except when
account is depth-clipped (default in multicolumn reports)
'-A --average'
show a row average column (in multicolumn mode)
'-T --row-total'
show a row total column (in multicolumn mode)
'-N --no-total' '-N --no-total'
don't show the final total row don't show the final total row
'--drop=N' '--drop=N'
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
'--no-elide' '--no-elide'
don't squash boring parent accounts (in tree mode) don't squash boring parent accounts (in tree mode)
@ -1436,6 +1518,13 @@ Total:
-------------------- --------------------
0 0
If given a period flag, renders a multi-column balance with the same
format as 'balance'.
This command normally shows period change reports, but for
flexibility, also accepts '--cumulative' and '--historical' to display
cumulative ending balances and historical ending balances, as well.
 
File: hledger.1.info, Node: info, Next: man, Prev: incomestatement, Up: COMMANDS File: hledger.1.info, Node: info, Next: man, Prev: incomestatement, Up: COMMANDS
@ -1891,7 +1980,7 @@ start making your own!
* chart:: * chart::
* check:: * check::
* check-dates:: * check-dates::
* dupes:: * check-dupes::
* equity:: * equity::
* prices:: * prices::
* print-unique:: * print-unique::
@ -1934,7 +2023,7 @@ File: hledger.1.info, Node: check, Next: check-dates, Prev: chart, Up: Exper
hledger-check.hs checks more powerful account balance assertions. hledger-check.hs checks more powerful account balance assertions.
 
File: hledger.1.info, Node: check-dates, Next: dupes, Prev: check, Up: Experimental add-ons File: hledger.1.info, Node: check-dates, Next: check-dupes, Prev: check, Up: Experimental add-ons
5.3.5 check-dates 5.3.5 check-dates
----------------- -----------------
@ -1942,15 +2031,16 @@ File: hledger.1.info, Node: check-dates, Next: dupes, Prev: check, Up: Exper
hledger-check-dates.hs checks that journal entries are ordered by date. hledger-check-dates.hs checks that journal entries are ordered by date.
 
File: hledger.1.info, Node: dupes, Next: equity, Prev: check-dates, Up: Experimental add-ons File: hledger.1.info, Node: check-dupes, Next: equity, Prev: check-dates, Up: Experimental add-ons
5.3.6 dupes 5.3.6 check-dupes
----------- -----------------
hledger-dupes.hs checks for account names sharing the same leaf name. hledger-check-dupes.hs checks for account names sharing the same leaf
name.
 
File: hledger.1.info, Node: equity, Next: prices, Prev: dupes, Up: Experimental add-ons File: hledger.1.info, Node: equity, Next: prices, Prev: check-dupes, Up: Experimental add-ons
5.3.7 equity 5.3.7 equity
------------ ------------
@ -2150,75 +2240,75 @@ Node: CSV output42494
Ref: #csv-output42613 Ref: #csv-output42613
Node: balancesheet43010 Node: balancesheet43010
Ref: #balancesheet43138 Ref: #balancesheet43138
Node: cashflow44005 Node: cashflow45057
Ref: #cashflow44122 Ref: #cashflow45174
Node: help45027 Node: help47072
Ref: #help45139 Ref: #help47184
Node: incomestatement45977 Node: incomestatement48022
Ref: #incomestatement46107 Ref: #incomestatement48152
Node: info47049 Node: info50067
Ref: #info47156 Ref: #info50174
Node: man47520 Node: man50538
Ref: #man47617 Ref: #man50635
Node: print48022 Node: print51040
Ref: #print48127 Ref: #print51145
Node: register51883 Node: register54901
Ref: #register51996 Ref: #register55014
Node: Custom register output56492 Node: Custom register output59510
Ref: #custom-register-output56623 Ref: #custom-register-output59641
Node: stats57920 Node: stats60938
Ref: #stats58026 Ref: #stats61044
Node: test58907 Node: test61925
Ref: #test58994 Ref: #test62012
Node: ADD-ON COMMANDS59362 Node: ADD-ON COMMANDS62380
Ref: #add-on-commands59498 Ref: #add-on-commands62516
Node: Official add-ons60785 Node: Official add-ons63803
Ref: #official-add-ons60927 Ref: #official-add-ons63945
Node: api61014 Node: api64032
Ref: #api61105 Ref: #api64123
Node: ui61157 Node: ui64175
Ref: #ui61258 Ref: #ui64276
Node: web61316 Node: web64334
Ref: #web61407 Ref: #web64425
Node: Third party add-ons61453 Node: Third party add-ons64471
Ref: #third-party-add-ons61630 Ref: #third-party-add-ons64648
Node: diff61765 Node: diff64783
Ref: #diff61864 Ref: #diff64882
Node: iadd61963 Node: iadd64981
Ref: #iadd62079 Ref: #iadd65097
Node: interest62162 Node: interest65180
Ref: #interest62285 Ref: #interest65303
Node: irr62380 Node: irr65398
Ref: #irr62480 Ref: #irr65498
Node: Experimental add-ons62558 Node: Experimental add-ons65576
Ref: #experimental-add-ons62712 Ref: #experimental-add-ons65730
Node: autosync63099 Node: autosync66123
Ref: #autosync63213 Ref: #autosync66237
Node: budget63452 Node: budget66476
Ref: #budget63576 Ref: #budget66600
Node: chart63642 Node: chart66666
Ref: #chart63761 Ref: #chart66785
Node: check63832 Node: check66856
Ref: #check63956 Ref: #check66980
Node: check-dates64023 Node: check-dates67047
Ref: #check-dates64159 Ref: #check-dates67189
Node: dupes64232 Node: check-dupes67262
Ref: #dupes64357 Ref: #check-dupes67405
Node: equity64428 Node: equity67482
Ref: #equity64550 Ref: #equity67610
Node: prices64669 Node: prices67729
Ref: #prices64798 Ref: #prices67858
Node: print-unique64853 Node: print-unique67913
Ref: #print-unique65002 Ref: #print-unique68062
Node: register-match65095 Node: register-match68155
Ref: #register-match65251 Ref: #register-match68311
Node: rewrite65349 Node: rewrite68409
Ref: #rewrite65470 Ref: #rewrite68530
Node: TROUBLESHOOTING65548 Node: TROUBLESHOOTING68608
Ref: #troubleshooting65667 Ref: #troubleshooting68727
Node: Run-time problems65721 Node: Run-time problems68781
Ref: #run-time-problems65864 Ref: #run-time-problems68924
Node: Known limitations67811 Node: Known limitations70871
Ref: #known-limitations67954 Ref: #known-limitations71014
 
End Tag Table End Tag Table

View File

@ -1152,13 +1152,35 @@ COMMANDS
balancesheet balancesheet
Show a balance sheet. Alias: bs. Show a balance sheet. Alias: bs.
--flat show full account names, as a list (default) --change
show balance change in each period, instead of historical ending
balances
--cumulative
show balance change accumulated across periods (in multicolumn
reports), instead of historical ending balances
-H --historical
show historical ending balance in each period (includes postings
before report start date) (default)
--tree show accounts as a tree; amounts include subaccounts (default in
simple reports)
--flat show accounts as a list; amounts exclude subaccounts except when
account is depth-clipped (default in multicolumn reports)
-A --average
show a row average column (in multicolumn mode)
-T --row-total
show a row total column (in multicolumn mode)
-N --no-total -N --no-total
don't show the final total row don't show the final total row
--drop=N --drop=N
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
--no-elide --no-elide
don't squash boring parent accounts (in tree mode) don't squash boring parent accounts (in tree mode)
@ -1166,8 +1188,8 @@ COMMANDS
--format=LINEFORMAT --format=LINEFORMAT
in single-column balance reports: use this custom line format in single-column balance reports: use this custom line format
This command displays a simple balance sheet. It currently assumes This command displays a simple balance sheet. It currently assumes
that you have top-level accounts named asset and liability (plural that you have top-level accounts named asset and liability (plural
forms also allowed.) forms also allowed.)
$ hledger balancesheet $ hledger balancesheet
@ -1189,16 +1211,45 @@ COMMANDS
-------------------- --------------------
0 0
If given a period flag, renders a multi-column balance with the same
format as balance, with asset and liability totals as well as an over-
all total if desired.
This command shows normally historical end-balance reports, but for
flexibility, also accepts --cumulative and --change to display cumula-
tive ending balances and changes in reporting periods.
cashflow cashflow
Show a cashflow statement. Alias: cf. Show a cashflow statement. Alias: cf.
--flat show full account names, as a list (default) --change
show balance change in each period (default)
--cumulative
show balance change accumulated across periods (in multicolumn
reports), instead of changes during periods
-H --historical
show historical ending balance in each period (includes postings
before report start date), instead of changes during each period
--tree show accounts as a tree; amounts include subaccounts (default in
simple reports)
--flat show accounts as a list; amounts exclude subaccounts except when
account is depth-clipped (default in multicolumn reports)
-A --average
show a row average column (in multicolumn mode)
-T --row-total
show a row total column (in multicolumn mode)
-N --no-total -N --no-total
don't show the final total row don't show the final total row (in simple reports)
--drop=N --drop=N
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
--no-elide --no-elide
don't squash boring parent accounts (in tree mode) don't squash boring parent accounts (in tree mode)
@ -1225,14 +1276,21 @@ COMMANDS
-------------------- --------------------
$-1 $-1
If given a period flag, renders a multi-column balance with the same
format as balance.
This command normally shows period change reports, but for flexibility,
also accepts --cumulative and --historical to display cumulative ending
balances and historical ending balances, as well.
help help
Show any of the hledger manuals. Show any of the hledger manuals.
The help command displays any of the main hledger man pages. (Unlike The help command displays any of the main hledger man pages. (Unlike
hledger --help, which displays only the hledger man page.) Run it with hledger --help, which displays only the hledger man page.) Run it with
no arguments to list available topics (their names are shortened for no arguments to list available topics (their names are shortened for
easier typing), and run hledger help TOPIC to select one. The output easier typing), and run hledger help TOPIC to select one. The output
is similar to a man page, but fixed width. It may be long, so you may is similar to a man page, but fixed width. It may be long, so you may
wish to pipe it into a pager. See also info and man. wish to pipe it into a pager. See also info and man.
$ hledger help $ hledger help
@ -1256,13 +1314,34 @@ COMMANDS
incomestatement incomestatement
Show an income statement. Alias: is. Show an income statement. Alias: is.
--flat show full account names, as a list (default) --change
show balance change in each period (default)
--cumulative
show balance change accumulated across periods (in multicolumn
reports), instead of changes during periods
-H --historical
show historical ending balance in each period (includes postings
before report start date), instead of changes during each period
--tree show accounts as a tree; amounts include subaccounts (default in
simple reports)
--flat show accounts as a list; amounts exclude subaccounts except when
account is depth-clipped (default in multicolumn reports)
-A --average
show a row average column (in multicolumn mode)
-T --row-total
show a row total column (in multicolumn mode)
-N --no-total -N --no-total
don't show the final total row don't show the final total row
--drop=N --drop=N
in flat mode: omit N leading account name parts omit N leading account name parts (in flat mode)
--no-elide --no-elide
don't squash boring parent accounts (in tree mode) don't squash boring parent accounts (in tree mode)
@ -1295,26 +1374,33 @@ COMMANDS
-------------------- --------------------
0 0
If given a period flag, renders a multi-column balance with the same
format as balance.
This command normally shows period change reports, but for flexibility,
also accepts --cumulative and --historical to display cumulative ending
balances and historical ending balances, as well.
info info
Show any of the hledger manuals using info. Show any of the hledger manuals using info.
The info command displays any of the hledger reference manuals using The info command displays any of the hledger reference manuals using
the info hypertextual documentation viewer. This can be a very effi- the info hypertextual documentation viewer. This can be a very effi-
cient way to browse large manuals. It requires the "info" program to cient way to browse large manuals. It requires the "info" program to
be available in your PATH. be available in your PATH.
As with help, run it with no arguments to list available topics (manu- As with help, run it with no arguments to list available topics (manu-
als). als).
man man
Show any of the hledger manuals using man. Show any of the hledger manuals using man.
The man command displays any of the hledger reference manuals using The man command displays any of the hledger reference manuals using
man, the standard documentation viewer on unix systems. This will fit man, the standard documentation viewer on unix systems. This will fit
the text to your terminal width, and probably invoke a pager automati- the text to your terminal width, and probably invoke a pager automati-
cally. It requires the "man" program to be available in your PATH. cally. It requires the "man" program to be available in your PATH.
As with help, run it with no arguments to list available topics (manu- As with help, run it with no arguments to list available topics (manu-
als). als).
print print
@ -1324,14 +1410,14 @@ COMMANDS
show all amounts explicitly show all amounts explicitly
-m STR --match=STR -m STR --match=STR
show the transaction whose description is most similar to STR, show the transaction whose description is most similar to STR,
and is most recent and is most recent
-O FMT --output-format=FMT -O FMT --output-format=FMT
select the output format. Supported formats: txt, csv. select the output format. Supported formats: txt, csv.
-o FILE --output-file=FILE -o FILE --output-file=FILE
write output to FILE. A file extension matching one of the write output to FILE. A file extension matching one of the
above formats selects that format. above formats selects that format.
$ hledger print $ hledger print
@ -1359,23 +1445,23 @@ COMMANDS
The print command displays full journal entries (transactions) from the The print command displays full journal entries (transactions) from the
journal file, tidily formatted. journal file, tidily formatted.
As of hledger 1.2, print's output is always a valid hledger journal. As of hledger 1.2, print's output is always a valid hledger journal.
However it may not preserve all original content, eg it does not print However it may not preserve all original content, eg it does not print
directives or inter-transaction comments. directives or inter-transaction comments.
Normally, transactions' implicit/explicit amount style is preserved: Normally, transactions' implicit/explicit amount style is preserved:
when an amount is omitted in the journal, it will be omitted in the when an amount is omitted in the journal, it will be omitted in the
output. You can use the -x/--explicit flag to make all amounts output. You can use the -x/--explicit flag to make all amounts
explicit, which can be useful for troubleshooting or for making your explicit, which can be useful for troubleshooting or for making your
journal more readable and robust against data entry errors. Note, in journal more readable and robust against data entry errors. Note, in
this mode postings with a multi-commodity amount (possible with an this mode postings with a multi-commodity amount (possible with an
implicit amount in a multi-commodity transaction) will be split into implicit amount in a multi-commodity transaction) will be split into
multiple single-commodity postings, for valid journal output. multiple single-commodity postings, for valid journal output.
With -B/--cost, amounts with transaction prices are converted to cost With -B/--cost, amounts with transaction prices are converted to cost
(using the transaction price). (using the transaction price).
The print command also supports output destination and CSV output. The print command also supports output destination and CSV output.
Here's an example of print's CSV output: Here's an example of print's CSV output:
$ hledger print -Ocsv $ hledger print -Ocsv
@ -1392,20 +1478,20 @@ COMMANDS
"5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","","" "5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","",""
"5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","","" "5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","",""
o There is one CSV record per posting, with the parent transaction's o There is one CSV record per posting, with the parent transaction's
fields repeated. fields repeated.
o The "txnidx" (transaction index) field shows which postings belong to o The "txnidx" (transaction index) field shows which postings belong to
the same transaction. (This number might change if transactions are the same transaction. (This number might change if transactions are
reordered within the file, files are parsed/included in a different reordered within the file, files are parsed/included in a different
order, etc.) order, etc.)
o The amount is separated into "commodity" (the symbol) and "amount" o The amount is separated into "commodity" (the symbol) and "amount"
(numeric quantity) fields. (numeric quantity) fields.
o The numeric amount is repeated in either the "credit" or "debit" col- o The numeric amount is repeated in either the "credit" or "debit" col-
umn, for convenience. (Those names are not accurate in the account- umn, for convenience. (Those names are not accurate in the account-
ing sense; it just puts negative amounts under credit and zero or ing sense; it just puts negative amounts under credit and zero or
greater amounts under debit.) greater amounts under debit.)
register register
@ -1415,7 +1501,7 @@ COMMANDS
show running total from report start date (default) show running total from report start date (default)
-H --historical -H --historical
show historical running total/balance (includes postings before show historical running total/balance (includes postings before
report start date) report start date)
-A --average -A --average
@ -1426,18 +1512,18 @@ COMMANDS
show postings' siblings instead show postings' siblings instead
-w N --width=N -w N --width=N
set output width (default: terminal width or COLUMNS. -wN,M set output width (default: terminal width or COLUMNS. -wN,M
sets description width as well) sets description width as well)
-O FMT --output-format=FMT -O FMT --output-format=FMT
select the output format. Supported formats: txt, csv. select the output format. Supported formats: txt, csv.
-o FILE --output-file=FILE -o FILE --output-file=FILE
write output to FILE. A file extension matching one of the write output to FILE. A file extension matching one of the
above formats selects that format. above formats selects that format.
The register command displays postings, one per line, and their running The register command displays postings, one per line, and their running
total. This is typically used with a query selecting a particular total. This is typically used with a query selecting a particular
account, to see that account's activity: account, to see that account's activity:
$ hledger register checking $ hledger register checking
@ -1446,8 +1532,8 @@ COMMANDS
2008/06/02 save assets:bank:checking $-1 $1 2008/06/02 save assets:bank:checking $-1 $1
2008/12/31 pay off assets:bank:checking $-1 0 2008/12/31 pay off assets:bank:checking $-1 0
The --historical/-H flag adds the balance from any undisplayed prior The --historical/-H flag adds the balance from any undisplayed prior
postings to the running total. This is useful when you want to see postings to the running total. This is useful when you want to see
only recent activity, with a historically accurate running balance: only recent activity, with a historically accurate running balance:
$ hledger register checking -b 2008/6 --historical $ hledger register checking -b 2008/6 --historical
@ -1457,23 +1543,23 @@ COMMANDS
The --depth option limits the amount of sub-account detail displayed. The --depth option limits the amount of sub-account detail displayed.
The --average/-A flag shows the running average posting amount instead The --average/-A flag shows the running average posting amount instead
of the running total (so, the final number displayed is the average for of the running total (so, the final number displayed is the average for
the whole report period). This flag implies --empty (see below). It the whole report period). This flag implies --empty (see below). It
is affected by --historical. It works best when showing just one is affected by --historical. It works best when showing just one
account and one commodity. account and one commodity.
The --related/-r flag shows the other postings in the transactions of The --related/-r flag shows the other postings in the transactions of
the postings which would normally be shown. the postings which would normally be shown.
With a reporting interval, register shows summary postings, one per With a reporting interval, register shows summary postings, one per
interval, aggregating the postings to each account: interval, aggregating the postings to each account:
$ hledger register --monthly income $ hledger register --monthly income
2008/01 income:salary $-1 $-1 2008/01 income:salary $-1 $-1
2008/06 income:gifts $-1 $-2 2008/06 income:gifts $-1 $-2
Periods with no activity, and summary postings with a zero amount, are Periods with no activity, and summary postings with a zero amount, are
not shown by default; use the --empty/-E flag to see them: not shown by default; use the --empty/-E flag to see them:
$ hledger register --monthly income -E $ hledger register --monthly income -E
@ -1490,7 +1576,7 @@ COMMANDS
2008/11 0 $-2 2008/11 0 $-2
2008/12 0 $-2 2008/12 0 $-2
Often, you'll want to see just one line per interval. The --depth Often, you'll want to see just one line per interval. The --depth
option helps with this, causing subaccounts to be aggregated: option helps with this, causing subaccounts to be aggregated:
$ hledger register --monthly assets --depth 1h $ hledger register --monthly assets --depth 1h
@ -1498,19 +1584,19 @@ COMMANDS
2008/06 assets $-1 0 2008/06 assets $-1 0
2008/12 assets $-1 $-1 2008/12 assets $-1 $-1
Note when using report intervals, if you specify start/end dates these Note when using report intervals, if you specify start/end dates these
will be adjusted outward if necessary to contain a whole number of will be adjusted outward if necessary to contain a whole number of
intervals. This ensures that the first and last intervals are full intervals. This ensures that the first and last intervals are full
length and comparable to the others in the report. length and comparable to the others in the report.
Custom register output Custom register output
register uses the full terminal width by default, except on windows. register uses the full terminal width by default, except on windows.
You can override this by setting the COLUMNS environment variable (not You can override this by setting the COLUMNS environment variable (not
a bash shell variable) or by using the --width/-w option. a bash shell variable) or by using the --width/-w option.
The description and account columns normally share the space equally The description and account columns normally share the space equally
(about half of (width - 40) each). You can adjust this by adding a (about half of (width - 40) each). You can adjust this by adding a
description width as part of --width's argument, comma-separated: description width as part of --width's argument, comma-separated:
--width W,D . Here's a diagram: --width W,D . Here's a diagram:
<--------------------------------- width (W) ----------------------------------> <--------------------------------- width (W) ---------------------------------->
@ -1526,14 +1612,14 @@ COMMANDS
$ hledger reg -w 100,40 # set overall width 100, description width 40 $ hledger reg -w 100,40 # set overall width 100, description width 40
$ hledger reg -w $COLUMNS,40 # use terminal width, and set description width $ hledger reg -w $COLUMNS,40 # use terminal width, and set description width
The register command also supports the -o/--output-file and -O/--out- The register command also supports the -o/--output-file and -O/--out-
put-format options for controlling output destination and CSV output. put-format options for controlling output destination and CSV output.
stats stats
Show some journal statistics. Show some journal statistics.
-o FILE --output-file=FILE -o FILE --output-file=FILE
write output to FILE. A file extension matching one of the write output to FILE. A file extension matching one of the
above formats selects that format. above formats selects that format.
$ hledger stats $ hledger stats
@ -1548,8 +1634,8 @@ COMMANDS
Accounts : 8 (depth 3) Accounts : 8 (depth 3)
Commodities : 1 ($) Commodities : 1 ($)
The stats command displays summary information for the whole journal, The stats command displays summary information for the whole journal,
or a matched part of it. With a reporting interval, it shows a report or a matched part of it. With a reporting interval, it shows a report
for each report period. for each report period.
The stats command also supports -o/--output-file for controlling output The stats command also supports -o/--output-file for controlling output
@ -1561,34 +1647,34 @@ COMMANDS
$ hledger test $ hledger test
Cases: 74 Tried: 74 Errors: 0 Failures: 0 Cases: 74 Tried: 74 Errors: 0 Failures: 0
This command runs hledger's built-in unit tests and displays a quick This command runs hledger's built-in unit tests and displays a quick
report. With a regular expression argument, it selects only tests with report. With a regular expression argument, it selects only tests with
matching names. It's mainly used in development, but it's also nice to matching names. It's mainly used in development, but it's also nice to
be able to check your hledger executable for smoke at any time. be able to check your hledger executable for smoke at any time.
ADD-ON COMMANDS ADD-ON COMMANDS
hledger also searches for external add-on commands, and will include hledger also searches for external add-on commands, and will include
these in the commands list. These are programs or scripts in your PATH these in the commands list. These are programs or scripts in your PATH
whose name starts with hledger- and ends with a recognised file exten- whose name starts with hledger- and ends with a recognised file exten-
sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh). sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh).
Add-ons can be invoked like any hledger command, but there are a few Add-ons can be invoked like any hledger command, but there are a few
things to be aware of. Eg if the hledger-web add-on is installed, things to be aware of. Eg if the hledger-web add-on is installed,
o hledger -h web shows hledger's help, while hledger web -h shows o hledger -h web shows hledger's help, while hledger web -h shows
hledger-web's help. hledger-web's help.
o Flags specific to the add-on must have a preceding -- to hide them o Flags specific to the add-on must have a preceding -- to hide them
from hledger. So hledger web --serve --port 9000 will be rejected; from hledger. So hledger web --serve --port 9000 will be rejected;
you must use hledger web -- --serve --port 9000. you must use hledger web -- --serve --port 9000.
o You can always run add-ons directly if preferred: o You can always run add-ons directly if preferred:
hledger-web --serve --port 9000. hledger-web --serve --port 9000.
Add-ons are a relatively easy way to add local features or experiment Add-ons are a relatively easy way to add local features or experiment
with new ideas. They can be written in any language, but haskell with new ideas. They can be written in any language, but haskell
scripts have a big advantage: they can use the same hledger (and scripts have a big advantage: they can use the same hledger (and
haskell) library functions that built-in commands do, for command-line haskell) library functions that built-in commands do, for command-line
options, journal parsing, reporting, etc. options, journal parsing, reporting, etc.
Here are some hledger add-ons available: Here are some hledger add-ons available:
@ -1606,7 +1692,7 @@ ADD-ON COMMANDS
hledger-web provides a simple web interface. hledger-web provides a simple web interface.
Third party add-ons Third party add-ons
These are maintained separately, and usually updated shortly after a These are maintained separately, and usually updated shortly after a
hledger release. hledger release.
diff diff
@ -1614,7 +1700,7 @@ ADD-ON COMMANDS
journal file and another. journal file and another.
iadd iadd
hledger-iadd is a curses-style, more interactive replacement for the hledger-iadd is a curses-style, more interactive replacement for the
add command. add command.
interest interest
@ -1622,19 +1708,19 @@ ADD-ON COMMANDS
ing to various schemes. ing to various schemes.
irr irr
hledger-irr calculates the internal rate of return of an investment hledger-irr calculates the internal rate of return of an investment
account. account.
Experimental add-ons Experimental add-ons
These are available in source form in the hledger repo's bin/ direc- These are available in source form in the hledger repo's bin/ direc-
tory; installing them is pretty easy. They may be less mature and doc- tory; installing them is pretty easy. They may be less mature and doc-
umented than built-in commands. Reading and tweaking these is a good umented than built-in commands. Reading and tweaking these is a good
way to start making your own! way to start making your own!
autosync autosync
hledger-autosync is a symbolic link for easily running ledger-autosync, hledger-autosync is a symbolic link for easily running ledger-autosync,
if installed. ledger-autosync does deduplicating conversion of OFX if installed. ledger-autosync does deduplicating conversion of OFX
data and some CSV formats, and can also download the data if your bank data and some CSV formats, and can also download the data if your bank
offers OFX Direct Connect. offers OFX Direct Connect.
budget budget
@ -1649,8 +1735,9 @@ ADD-ON COMMANDS
check-dates check-dates
hledger-check-dates.hs checks that journal entries are ordered by date. hledger-check-dates.hs checks that journal entries are ordered by date.
dupes check-dupes
hledger-dupes.hs checks for account names sharing the same leaf name. hledger-check-dupes.hs checks for account names sharing the same leaf
name.
equity equity
hledger-equity.hs prints balance-resetting transactions, useful for hledger-equity.hs prints balance-resetting transactions, useful for