cli: docs: update manuals

This commit is contained in:
Simon Michael 2017-09-14 06:23:11 -07:00
parent 076424dedd
commit a218ce12ad
3 changed files with 317 additions and 315 deletions

View File

@ -1086,9 +1086,9 @@ will also be listed as subcommands.
.PP .PP
Run a subcommand by writing its name as first argument (eg Run a subcommand by writing its name as first argument (eg
\f[C]hledger\ incomestatement\f[]). \f[C]hledger\ incomestatement\f[]).
You can also write any unambiguous prefix of a command name You can also write one of the standard short aliases displayed in
(\f[C]hledger\ inc\f[]), or one of the standard short aliases displayed parentheses in the command list (\f[C]hledger\ b\f[]), or any any
in the command list (\f[C]hledger\ is\f[]). unambiguous prefix of a command name (\f[C]hledger\ inc\f[]).
.PP .PP
Here are all the builtin commands in alphabetical order. Here are all the builtin commands in alphabetical order.
See also \f[C]hledger\f[] for a more organised command list, and See also \f[C]hledger\f[] for a more organised command list, and
@ -1096,6 +1096,7 @@ See also \f[C]hledger\f[] for a more organised command list, and
.SS accounts .SS accounts
.PP .PP
Show account names. Show account names.
Alias: a.
.TP .TP
.B \f[C]\-\-tree\f[] .B \f[C]\-\-tree\f[]
show short account names, as a tree show short account names, as a tree
@ -1272,7 +1273,7 @@ Date\ [2015/05/22]:\ <CTRL\-D>\ $
.SS balance .SS balance
.PP .PP
Show accounts and their balances. Show accounts and their balances.
Alias: bal. Aliases: b, bal.
.TP .TP
.B \f[C]\-\-change\f[] .B \f[C]\-\-change\f[]
show balance change in each period (default) show balance change in each period (default)
@ -1899,6 +1900,15 @@ multicolumn balance reports you can alter the report mode with
.PP .PP
Check that transactions are sorted by increasing date. Check that transactions are sorted by increasing date.
With a query, only matched transactions\[aq] dates are checked. With a query, only matched transactions\[aq] dates are checked.
.SS check\-dupes
.PP
Report account names having the same leaf but different prefixes.
An example: http://stefanorodighiero.net/software/hledger\-dupes.html
.SS equity
.PP
Print closing/opening transactions that bring some or all account
balances to zero and back.
Can be useful for bringing account balances across file boundaries.
.SS help .SS help
.PP .PP
Show any of the hledger manuals. Show any of the hledger manuals.
@ -2040,9 +2050,13 @@ report period.
Normally incomestatement shows revenues/expenses per period, though as Normally incomestatement shows revenues/expenses per period, though as
with multicolumn balance reports you can alter the report mode with with multicolumn balance reports you can alter the report mode with
\f[C]\-\-change\f[]/\f[C]\-\-cumulative\f[]/\f[C]\-\-historical\f[]. \f[C]\-\-change\f[]/\f[C]\-\-cumulative\f[]/\f[C]\-\-historical\f[].
.SS prices
.PP
Print all market prices from the journal.
.SS print .SS print
.PP .PP
Show transactions from the journal. Show transactions from the journal.
Aliases: p, txns.
.TP .TP
.B \f[C]\-x\ \ \ \ \ \-\-explicit\f[] .B \f[C]\-x\ \ \ \ \ \-\-explicit\f[]
show all amounts explicitly show all amounts explicitly
@ -2149,10 +2163,13 @@ The numeric amount is repeated in either the "credit" or "debit" column,
for convenience. for convenience.
(Those names are not accurate in the accounting sense; it just puts (Those names are not accurate in the accounting sense; it just puts
negative amounts under credit and zero or greater amounts under debit.) negative amounts under credit and zero or greater amounts under debit.)
.SS print\-unique
.PP
Print transactions which do not reuse an already\-seen description.
.SS register .SS register
.PP .PP
Show postings and their running total. Show postings and their running total.
Alias: reg. Aliases: r, reg.
.TP .TP
.B \f[C]\-\-cumulative\f[] .B \f[C]\-\-cumulative\f[]
show running total from report start date (default) show running total from report start date (default)
@ -2325,6 +2342,14 @@ $\ hledger\ reg\ \-w\ $COLUMNS,40\ \ \ \ \ \ #\ use\ terminal\ width,\ and\ set\
The register command also supports the \f[C]\-o/\-\-output\-file\f[] and The register command also supports the \f[C]\-o/\-\-output\-file\f[] and
\f[C]\-O/\-\-output\-format\f[] options for controlling output \f[C]\-O/\-\-output\-format\f[] options for controlling output
destination and CSV output. destination and CSV output.
.SS register\-match
.PP
Print the one posting whose transaction description is closest to DESC,
in the style of the register command.
Helps ledger\-autosync detect already\-seen transactions when importing.
.SS rewrite
.PP
Print all transactions, adding custom postings to the matched ones.
.SS stats .SS stats
.PP .PP
Show some journal statistics. Show some journal statistics.
@ -2357,6 +2382,9 @@ With a reporting interval, it shows a report for each report period.
.PP .PP
The stats command also supports \f[C]\-o/\-\-output\-file\f[] for The stats command also supports \f[C]\-o/\-\-output\-file\f[] for
controlling output destination. controlling output destination.
.SS tags
.PP
List all the tag names in use.
.SS test .SS test
.PP .PP
Run built\-in unit tests. Run built\-in unit tests.
@ -2460,32 +2488,6 @@ hledger\-chart.hs is an old pie chart generator, in need of some love.
.SS check .SS check
.PP .PP
hledger\-check.hs checks more powerful account balance assertions. hledger\-check.hs checks more powerful account balance assertions.
.SS check\-dupes
.PP
hledger\-check\-dupes.hs checks for account names sharing the same leaf
name.
.SS equity
.PP
hledger\-equity.hs prints balance\-resetting transactions, useful for
bringing account balances across file boundaries.
.SS prices
.PP
hledger\-prices.hs prints all prices from the journal.
.SS print\-unique
.PP
hledger\-print\-unique.hs prints transactions which do not reuse an
already\-seen description.
.SS register\-match
.PP
hledger\-register\-match.hs helps ledger\-autosync detect already\-seen
transactions when importing.
.SS rewrite
.PP
hledger\-rewrite.hs Adds one or more custom postings to matched
transactions.
.SS tags
.PP
hledger\-tags.hs Lists tag names in use.
.SH ENVIRONMENT .SH ENVIRONMENT
.PP .PP
\f[B]COLUMNS\f[] The screen width used by the register command. \f[B]COLUMNS\f[] The screen width used by the register command.

View File

@ -780,9 +780,9 @@ programs or scripts named 'hledger-NAME' in your PATH, these will also
be listed as subcommands. be listed as subcommands.
Run a subcommand by writing its name as first argument (eg 'hledger Run a subcommand by writing its name as first argument (eg 'hledger
incomestatement'). You can also write any unambiguous prefix of a incomestatement'). You can also write one of the standard short aliases
command name ('hledger inc'), or one of the standard short aliases displayed in parentheses in the command list ('hledger b'), or any any
displayed in the command list ('hledger is'). unambiguous prefix of a command name ('hledger inc').
Here are all the builtin commands in alphabetical order. See also Here are all the builtin commands in alphabetical order. See also
'hledger' for a more organised command list, and 'hledger CMD -h' for 'hledger' for a more organised command list, and 'hledger CMD -h' for
@ -797,11 +797,18 @@ detailed command help.
* balancesheetequity:: * balancesheetequity::
* cashflow:: * cashflow::
* check-dates:: * check-dates::
* check-dupes::
* equity::
* help:: * help::
* incomestatement:: * incomestatement::
* prices::
* print:: * print::
* print-unique::
* register:: * register::
* register-match::
* rewrite::
* stats:: * stats::
* tags::
* test:: * test::
 
@ -810,7 +817,7 @@ File: hledger.1.info, Node: accounts, Next: activity, Up: COMMANDS
4.1 accounts 4.1 accounts
============ ============
Show account names. Show account names. Alias: a.
'--tree' '--tree'
@ -963,7 +970,7 @@ File: hledger.1.info, Node: balance, Next: balancesheet, Prev: add, Up: COMM
4.4 balance 4.4 balance
=========== ===========
Show accounts and their balances. Alias: bal. Show accounts and their balances. Aliases: b, bal.
'--change' '--change'
@ -1485,7 +1492,7 @@ period, though as with multicolumn balance reports you can alter the
report mode with '--change'/'--cumulative'/'--historical'. report mode with '--change'/'--cumulative'/'--historical'.
 
File: hledger.1.info, Node: check-dates, Next: help, Prev: cashflow, Up: COMMANDS File: hledger.1.info, Node: check-dates, Next: check-dupes, Prev: cashflow, Up: COMMANDS
4.8 check-dates 4.8 check-dates
=============== ===============
@ -1494,10 +1501,29 @@ Check that transactions are sorted by increasing date. With a query,
only matched transactions' dates are checked. only matched transactions' dates are checked.
 
File: hledger.1.info, Node: help, Next: incomestatement, Prev: check-dates, Up: COMMANDS File: hledger.1.info, Node: check-dupes, Next: equity, Prev: check-dates, Up: COMMANDS
4.9 help 4.9 check-dupes
======== ===============
Report account names having the same leaf but different prefixes. An
example: http://stefanorodighiero.net/software/hledger-dupes.html

File: hledger.1.info, Node: equity, Next: help, Prev: check-dupes, Up: COMMANDS
4.10 equity
===========
Print closing/opening transactions that bring some or all account
balances to zero and back. Can be useful for bringing account balances
across file boundaries.

File: hledger.1.info, Node: help, Next: incomestatement, Prev: equity, Up: COMMANDS
4.11 help
=========
Show any of the hledger manuals. Show any of the hledger manuals.
@ -1531,9 +1557,9 @@ DESCRIPTION
... ...
 
File: hledger.1.info, Node: incomestatement, Next: print, Prev: help, Up: COMMANDS File: hledger.1.info, Node: incomestatement, Next: prices, Prev: help, Up: COMMANDS
4.10 incomestatement 4.12 incomestatement
==================== ====================
Show an income statement. Alias: is. Show an income statement. Alias: is.
@ -1607,12 +1633,20 @@ per period, though as with multicolumn balance reports you can alter the
report mode with '--change'/'--cumulative'/'--historical'. report mode with '--change'/'--cumulative'/'--historical'.
 
File: hledger.1.info, Node: print, Next: register, Prev: incomestatement, Up: COMMANDS File: hledger.1.info, Node: prices, Next: print, Prev: incomestatement, Up: COMMANDS
4.11 print 4.13 prices
===========
Print all market prices from the journal.

File: hledger.1.info, Node: print, Next: print-unique, Prev: prices, Up: COMMANDS
4.14 print
========== ==========
Show transactions from the journal. Show transactions from the journal. Aliases: p, txns.
'-x --explicit' '-x --explicit'
@ -1701,12 +1735,20 @@ $ hledger print -Ocsv
zero or greater amounts under debit.) zero or greater amounts under debit.)
 
File: hledger.1.info, Node: register, Next: stats, Prev: print, Up: COMMANDS File: hledger.1.info, Node: print-unique, Next: register, Prev: print, Up: COMMANDS
4.12 register 4.15 print-unique
=================
Print transactions which do not reuse an already-seen description.

File: hledger.1.info, Node: register, Next: register-match, Prev: print-unique, Up: COMMANDS
4.16 register
============= =============
Show postings and their running total. Alias: reg. Show postings and their running total. Aliases: r, reg.
'--cumulative' '--cumulative'
@ -1808,7 +1850,7 @@ length and comparable to the others in the report.
 
File: hledger.1.info, Node: Custom register output, Up: register File: hledger.1.info, Node: Custom register output, Up: register
4.12.1 Custom register output 4.16.1 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.
@ -1838,9 +1880,27 @@ $ hledger reg -w $COLUMNS,40 # use terminal width, and set description widt
output. output.
 
File: hledger.1.info, Node: stats, Next: test, Prev: register, Up: COMMANDS File: hledger.1.info, Node: register-match, Next: rewrite, Prev: register, Up: COMMANDS
4.13 stats 4.17 register-match
===================
Print the one posting whose transaction description is closest to DESC,
in the style of the register command. Helps ledger-autosync detect
already-seen transactions when importing.

File: hledger.1.info, Node: rewrite, Next: stats, Prev: register-match, Up: COMMANDS
4.18 rewrite
============
Print all transactions, adding custom postings to the matched ones.

File: hledger.1.info, Node: stats, Next: tags, Prev: rewrite, Up: COMMANDS
4.19 stats
========== ==========
Show some journal statistics. Show some journal statistics.
@ -1870,9 +1930,17 @@ for each report period.
output destination. output destination.
 
File: hledger.1.info, Node: test, Prev: stats, Up: COMMANDS File: hledger.1.info, Node: tags, Next: test, Prev: stats, Up: COMMANDS
4.14 test 4.20 tags
=========
List all the tag names in use.

File: hledger.1.info, Node: test, Prev: tags, Up: COMMANDS
4.21 test
========= =========
Run built-in unit tests. Run built-in unit tests.
@ -2027,13 +2095,6 @@ start making your own!
* budget:: * budget::
* chart:: * chart::
* check:: * check::
* check-dupes::
* equity::
* prices::
* print-unique::
* register-match::
* rewrite::
* tags::
 
File: hledger.1.info, Node: autosync, Next: budget, Up: Experimental add-ons File: hledger.1.info, Node: autosync, Next: budget, Up: Experimental add-ons
@ -2063,74 +2124,13 @@ File: hledger.1.info, Node: chart, Next: check, Prev: budget, Up: Experiment
hledger-chart.hs is an old pie chart generator, in need of some love. hledger-chart.hs is an old pie chart generator, in need of some love.
 
File: hledger.1.info, Node: check, Next: check-dupes, Prev: chart, Up: Experimental add-ons File: hledger.1.info, Node: check, Prev: chart, Up: Experimental add-ons
5.3.4 check 5.3.4 check
----------- -----------
hledger-check.hs checks more powerful account balance assertions. hledger-check.hs checks more powerful account balance assertions.

File: hledger.1.info, Node: check-dupes, Next: equity, Prev: check, Up: Experimental add-ons
5.3.5 check-dupes
-----------------
hledger-check-dupes.hs checks for account names sharing the same leaf
name.

File: hledger.1.info, Node: equity, Next: prices, Prev: check-dupes, Up: Experimental add-ons
5.3.6 equity
------------
hledger-equity.hs prints balance-resetting transactions, useful for
bringing account balances across file boundaries.

File: hledger.1.info, Node: prices, Next: print-unique, Prev: equity, Up: Experimental add-ons
5.3.7 prices
------------
hledger-prices.hs prints all prices from the journal.

File: hledger.1.info, Node: print-unique, Next: register-match, Prev: prices, Up: Experimental add-ons
5.3.8 print-unique
------------------
hledger-print-unique.hs prints transactions which do not reuse an
already-seen description.

File: hledger.1.info, Node: register-match, Next: rewrite, Prev: print-unique, Up: Experimental add-ons
5.3.9 register-match
--------------------
hledger-register-match.hs helps ledger-autosync detect already-seen
transactions when importing.

File: hledger.1.info, Node: rewrite, Next: tags, Prev: register-match, Up: Experimental add-ons
5.3.10 rewrite
--------------
hledger-rewrite.hs Adds one or more custom postings to matched
transactions.

File: hledger.1.info, Node: tags, Prev: rewrite, Up: Experimental add-ons
5.3.11 tags
-----------
hledger-tags.hs Lists tag names in use.
 
Tag Table: Tag Table:
Node: Top70 Node: Top70
@ -2170,93 +2170,93 @@ Node: QUERIES21498
Ref: #queries21602 Ref: #queries21602
Node: COMMANDS25569 Node: COMMANDS25569
Ref: #commands25683 Ref: #commands25683
Node: accounts26542 Node: accounts26655
Ref: #accounts26642 Ref: #accounts26755
Node: activity27624 Node: activity27748
Ref: #activity27736 Ref: #activity27860
Node: add28095 Node: add28219
Ref: #add28196 Ref: #add28320
Node: balance30854 Node: balance30978
Ref: #balance30967 Ref: #balance31091
Node: Flat mode33982 Node: Flat mode34111
Ref: #flat-mode34109 Ref: #flat-mode34238
Node: Depth limited balance reports34529 Node: Depth limited balance reports34658
Ref: #depth-limited-balance-reports34732 Ref: #depth-limited-balance-reports34861
Node: Multicolumn balance reports35152 Node: Multicolumn balance reports35281
Ref: #multicolumn-balance-reports35363 Ref: #multicolumn-balance-reports35492
Node: Custom balance output40011 Node: Custom balance output40140
Ref: #custom-balance-output40195 Ref: #custom-balance-output40324
Node: Colour support42288 Node: Colour support42417
Ref: #colour-support42449 Ref: #colour-support42578
Node: Output destination42622 Node: Output destination42751
Ref: #output-destination42780 Ref: #output-destination42909
Node: CSV output43050 Node: CSV output43179
Ref: #csv-output43169 Ref: #csv-output43298
Node: balancesheet43566 Node: balancesheet43695
Ref: #balancesheet43704 Ref: #balancesheet43833
Node: balancesheetequity45611 Node: balancesheetequity45740
Ref: #balancesheetequity45762 Ref: #balancesheetequity45891
Node: cashflow46551 Node: cashflow46680
Ref: #cashflow46681 Ref: #cashflow46810
Node: check-dates48532 Node: check-dates48661
Ref: #check-dates48654 Ref: #check-dates48790
Node: help48771 Node: check-dupes48907
Ref: #help48886 Ref: #check-dupes49034
Node: incomestatement49960 Node: equity49171
Ref: #incomestatement50093 Ref: #equity49283
Node: print51985 Node: help49446
Ref: #print52102 Ref: #help49558
Node: register55858 Node: incomestatement50632
Ref: #register55971 Ref: #incomestatement50766
Node: Custom register output60467 Node: prices52658
Ref: #custom-register-output60598 Ref: #prices52775
Node: stats61895 Node: print52818
Ref: #stats62001 Ref: #print52930
Node: test62882 Node: print-unique56705
Ref: #test62969 Ref: #print-unique56833
Node: ADD-ON COMMANDS63337 Node: register56901
Ref: #add-on-commands63449 Ref: #register57030
Node: Official add-ons64736 Node: Custom register output61531
Ref: #official-add-ons64878 Ref: #custom-register-output61662
Node: api64965 Node: register-match62959
Ref: #api65056 Ref: #register-match63095
Node: ui65108 Node: rewrite63278
Ref: #ui65209 Ref: #rewrite63397
Node: web65267 Node: stats63466
Ref: #web65358 Ref: #stats63571
Node: Third party add-ons65404 Node: tags64452
Ref: #third-party-add-ons65581 Ref: #tags64552
Node: diff65716 Node: test64584
Ref: #diff65815 Ref: #test64670
Node: iadd65914 Node: ADD-ON COMMANDS65038
Ref: #iadd66030 Ref: #add-on-commands65150
Node: interest66113 Node: Official add-ons66437
Ref: #interest66236 Ref: #official-add-ons66579
Node: irr66331 Node: api66666
Ref: #irr66431 Ref: #api66757
Node: Experimental add-ons66509 Node: ui66809
Ref: #experimental-add-ons66663 Ref: #ui66910
Node: autosync67049 Node: web66968
Ref: #autosync67163 Ref: #web67059
Node: budget67402 Node: Third party add-ons67105
Ref: #budget67526 Ref: #third-party-add-ons67282
Node: chart67592 Node: diff67417
Ref: #chart67711 Ref: #diff67516
Node: check67782 Node: iadd67615
Ref: #check67906 Ref: #iadd67731
Node: check-dupes67973 Node: interest67814
Ref: #check-dupes68110 Ref: #interest67937
Node: equity68187 Node: irr68032
Ref: #equity68315 Ref: #irr68132
Node: prices68434 Node: Experimental add-ons68210
Ref: #prices68563 Ref: #experimental-add-ons68364
Node: print-unique68618 Node: autosync68655
Ref: #print-unique68767 Ref: #autosync68769
Node: register-match68860 Node: budget69008
Ref: #register-match69014 Ref: #budget69132
Node: rewrite69112 Node: chart69198
Ref: #rewrite69246 Ref: #chart69317
Node: tags69324 Node: check69388
Ref: #tags69429 Ref: #check69492
 
End Tag Table End Tag Table

View File

@ -717,16 +717,16 @@ COMMANDS
subcommands. subcommands.
Run a subcommand by writing its name as first argument (eg Run a subcommand by writing its name as first argument (eg
hledger incomestatement). You can also write any unambiguous prefix of hledger incomestatement). You can also write one of the standard short
a command name (hledger inc), or one of the standard short aliases dis- aliases displayed in parentheses in the command list (hledger b), or
played in the command list (hledger is). any any unambiguous prefix of a command name (hledger inc).
Here are all the builtin commands in alphabetical order. See also Here are all the builtin commands in alphabetical order. See also
hledger for a more organised command list, and hledger CMD -h for hledger for a more organised command list, and hledger CMD -h for
detailed command help. detailed command help.
accounts accounts
Show account names. Show account names. Alias: a.
--tree show short account names, as a tree --tree show short account names, as a tree
@ -868,7 +868,7 @@ COMMANDS
Date [2015/05/22]: <CTRL-D> $ Date [2015/05/22]: <CTRL-D> $
balance balance
Show accounts and their balances. Alias: bal. Show accounts and their balances. Aliases: b, bal.
--change --change
show balance change in each period (default) show balance change in each period (default)
@ -1333,16 +1333,25 @@ COMMANDS
Check that transactions are sorted by increasing date. With a query, Check that transactions are sorted by increasing date. With a query,
only matched transactions' dates are checked. only matched transactions' dates are checked.
check-dupes
Report account names having the same leaf but different prefixes. An
example: http://stefanorodighiero.net/software/hledger-dupes.html
equity
Print closing/opening transactions that bring some or all account bal-
ances to zero and back. Can be useful for bringing account balances
across file boundaries.
help help
Show any of the hledger manuals. Show any of the hledger manuals.
The help command displays any of the main hledger manuals, in one of The help command displays any of the main hledger manuals, in one of
several ways. Run it with no argument to list the manuals, or provide several ways. Run it with no argument to list the manuals, or provide
a full or partial manual name to select one. a full or partial manual name to select one.
hledger manuals are available in several formats. hledger help will hledger manuals are available in several formats. hledger help will
use the first of these display methods that it finds: info, man, use the first of these display methods that it finds: info, man,
$PAGER, less, stdout (or when non-interactive, just stdout). You can $PAGER, less, stdout (or when non-interactive, just stdout). You can
force a particular viewer with the --info, --man, --pager, --cat flags. force a particular viewer with the --info, --man, --pager, --cat flags.
$ hledger help $ hledger help
@ -1372,7 +1381,7 @@ COMMANDS
show balance change in each period (default) show balance change in each period (default)
--cumulative --cumulative
show balance change accumulated across periods (in multicolumn show balance change accumulated across periods (in multicolumn
reports), instead of changes during periods reports), instead of changes during periods
-H --historical -H --historical
@ -1403,8 +1412,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 income statement. It currently assumes This command displays a simple income statement. It currently assumes
that you have top-level accounts named income (or revenue) and expense that you have top-level accounts named income (or revenue) and expense
(plural forms also allowed.) (plural forms also allowed.)
$ hledger incomestatement $ hledger incomestatement
@ -1429,25 +1438,28 @@ COMMANDS
0 0
With a reporting interval, multiple columns will be shown, one for each With a reporting interval, multiple columns will be shown, one for each
report period. Normally incomestatement shows revenues/expenses per report period. Normally incomestatement shows revenues/expenses per
period, though as with multicolumn balance reports you can alter the period, though as with multicolumn balance reports you can alter the
report mode with --change/--cumulative/--historical. report mode with --change/--cumulative/--historical.
prices
Print all market prices from the journal.
print print
Show transactions from the journal. Show transactions from the journal. Aliases: p, txns.
-x --explicit -x --explicit
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
@ -1475,23 +1487,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
@ -1508,30 +1520,33 @@ 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.)
print-unique
Print transactions which do not reuse an already-seen description.
register register
Show postings and their running total. Alias: reg. Show postings and their running total. Aliases: r, reg.
--cumulative --cumulative
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
@ -1542,18 +1557,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
@ -1562,8 +1577,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
@ -1573,23 +1588,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
@ -1606,7 +1621,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
@ -1614,19 +1629,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) ---------------------------------->
@ -1642,14 +1657,22 @@ 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.
register-match
Print the one posting whose transaction description is closest to DESC,
in the style of the register command. Helps ledger-autosync detect
already-seen transactions when importing.
rewrite
Print all transactions, adding custom postings to the matched ones.
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
@ -1664,47 +1687,50 @@ 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
destination. destination.
tags
List all the tag names in use.
test test
Run built-in unit tests. Run built-in unit tests.
$ 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:
@ -1722,7 +1748,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
@ -1730,7 +1756,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
@ -1738,19 +1764,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
@ -1762,32 +1788,6 @@ ADD-ON COMMANDS
check check
hledger-check.hs checks more powerful account balance assertions. hledger-check.hs checks more powerful account balance assertions.
check-dupes
hledger-check-dupes.hs checks for account names sharing the same leaf
name.
equity
hledger-equity.hs prints balance-resetting transactions, useful for
bringing account balances across file boundaries.
prices
hledger-prices.hs prints all prices from the journal.
print-unique
hledger-print-unique.hs prints transactions which do not reuse an
already-seen description.
register-match
hledger-register-match.hs helps ledger-autosync detect already-seen
transactions when importing.
rewrite
hledger-rewrite.hs Adds one or more custom postings to matched transac-
tions.
tags
hledger-tags.hs Lists tag names in use.
ENVIRONMENT ENVIRONMENT
COLUMNS The screen width used by the register command. Default: the COLUMNS The screen width used by the register command. Default: the
full terminal width. full terminal width.