From e6769b26fc6b547684b5339f267f386f1e06189b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 9 Jun 2016 18:07:08 -0700 Subject: [PATCH] doc: more macros, less redundancy, cleanups --- doc/lib.m4 | 16 + hledger-api/doc/hledger-api.1 | 22 +- hledger-api/doc/hledger-api.1.info | 12 +- hledger-api/doc/hledger-api.1.m4.md | 34 +- hledger-api/doc/hledger-api.1.txt | 20 +- hledger-ui/doc/hledger-ui.1 | 41 +-- hledger-ui/doc/hledger-ui.1.info | 49 ++- hledger-ui/doc/hledger-ui.1.m4.md | 37 +- hledger-ui/doc/hledger-ui.1.txt | 47 ++- hledger-web/doc/hledger-web.1 | 31 +- hledger-web/doc/hledger-web.1.info | 12 +- hledger-web/doc/hledger-web.1.m4.md | 25 +- hledger-web/doc/hledger-web.1.txt | 30 +- hledger/doc/hledger.1 | 40 +- hledger/doc/hledger.1.info | 207 +++++------ hledger/doc/hledger.1.m4.md | 35 +- hledger/doc/hledger.1.txt | 550 ++++++++++++++-------------- 17 files changed, 596 insertions(+), 612 deletions(-) diff --git a/doc/lib.m4 b/doc/lib.m4 index 70787691d..f29183ea4 100644 --- a/doc/lib.m4 +++ b/doc/lib.m4 @@ -142,3 +142,19 @@ m4_define({{_reportingoptions_}}, {{ : The TAG will only match if it is a full-length match. The pivot will only happen if the TAG is on a posting, not if it is on the transaction. If the tag value is a multi:level:account:name the new account name will be "TAG:multi:level:account:name". }} )m4_dnl +m4_dnl +m4_define({{_hledgerdescription_}}, {{ +hledger is a cross-platform program for tracking money, time, or any other commodity, +using double-entry accounting and a simple, editable file format. +hledger is inspired by and largely compatible with ledger(1). }} )m4_dnl +m4_dnl +m4_define({{_files_}}, +{{data from one or more files in hledger journal, timeclock, timedot, or CSV format +specified with `-f`, or `$LEDGER_FILE`, +or `$HOME/.hledger.journal` (on windows, perhaps `C:/Users/USER/.hledger.journal`).}})m4_dnl +m4_dnl +m4_define({{_LEDGER_FILE_}}, {{ +**LEDGER_FILE** +The journal file path when not specified with `-f`. +Default: `~/.hledger.journal` (on windows, perhaps `C:/Users/USER/.hledger.journal`). +}} )m4_dnl diff --git a/hledger-api/doc/hledger-api.1 b/hledger-api/doc/hledger-api.1 index 1485ff564..faca95b7f 100644 --- a/hledger-api/doc/hledger-api.1 +++ b/hledger-api/doc/hledger-api.1 @@ -29,10 +29,11 @@ client\-side web apps operating on hledger data. It comes with a series of simple client\-side app examples, which drive it\[aq]s evolution. .PP -Data is served from the usual hledger journal file: -\f[C]~/.hledger.journal\f[], \f[C]$LEDGER_FILE\f[], or another file -specified with \-f. -For more about the format, see hledger(1) or hledger_journal(5). +Like hledger, it reads data from one or more files in hledger journal, +timeclock, timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). +For more about this see hledger(1), hledger_journal(5) etc. .PP The server listens on port 8001, or another specified with \f[C]\-p\ PORT\f[]. @@ -117,13 +118,16 @@ ignore any failing balance assertions in the journal .RE .SH ENVIRONMENT .PP -\f[B]LEDGER_FILE\f[] sets the default journal file path. -If not set, it is \f[C]~/.hledger.journal\f[]. +\f[B]LEDGER_FILE\f[] The journal file path when not specified with +\f[C]\-f\f[]. +Default: \f[C]~/.hledger.journal\f[] (on windows, perhaps +\f[C]C:/Users/USER/.hledger.journal\f[]). .SH FILES .PP -Reads data from a hledger journal file (\f[C]$LEDGER_FILE\f[] or -\f[C]~/.hledger.journal\f[] by default), or a CSV file plus associated -CSV rules file. +Reads data from one or more files in hledger journal, timeclock, +timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). .SH BUGS .PP The need to precede options with \f[C]\-\-\f[] when invoked from hledger diff --git a/hledger-api/doc/hledger-api.1.info b/hledger-api/doc/hledger-api.1.info index abf8f2e8c..415c8be40 100644 --- a/hledger-api/doc/hledger-api.1.info +++ b/hledger-api/doc/hledger-api.1.info @@ -11,9 +11,11 @@ hledger-api is a simple web API server, intended to support client-side web apps operating on hledger data. It comes with a series of simple client-side app examples, which drive it's evolution. - Data is served from the usual hledger journal file: -`~/.hledger.journal', `$LEDGER_FILE', or another file specified with --f. For more about the format, see hledger(1) or hledger_journal(5). + Like hledger, it reads data from one or more files in hledger +journal, timeclock, timedot, or CSV format specified with `-f', or +`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps +`C:/Users/USER/.hledger.journal'). For more about this see hledger(1), +hledger_journal(5) etc. The server listens on port 8001, or another specified with `-p PORT'. Note there is no built-in access control, so you will need to @@ -82,7 +84,7 @@ before options as shown above.  Tag Table: Node: Top90 -Node: OPTIONS959 -Ref: #options1046 +Node: OPTIONS1058 +Ref: #options1145  End Tag Table diff --git a/hledger-api/doc/hledger-api.1.m4.md b/hledger-api/doc/hledger-api.1.m4.md index 0d26440b5..93cc224a1 100644 --- a/hledger-api/doc/hledger-api.1.m4.md +++ b/hledger-api/doc/hledger-api.1.m4.md @@ -10,8 +10,8 @@ version: _toc_ }}) -_man_({{ +_man_({{ # NAME hledger-api - web API server for the hledger accounting tool @@ -24,19 +24,15 @@ hledger-api - web API server for the hledger accounting tool # DESCRIPTION -hledger is a cross-platform program for tracking money, time, or any other commodity, -using double-entry accounting and a simple, editable file format. -hledger is inspired by and largely compatible with ledger(1). - +_hledgerdescription_ }}) hledger-api is a simple web API server, intended to support client-side web apps operating on hledger data. It comes with a series of simple client-side app examples, which drive it's evolution. -Data is served from the usual hledger journal file: -`~/.hledger.journal`, `$LEDGER_FILE`, or another file specified with -f. -For more about the format, see hledger(1) or hledger_journal(5). +Like hledger, it reads _files_ +For more about this see hledger(1), hledger_journal(5) etc. The server listens on port 8001, or another specified with `-p PORT`. Note there is no built-in access control, so you will need to hide @@ -67,32 +63,14 @@ _man_({{ # ENVIRONMENT -**LEDGER_FILE** -sets the default journal file path. If not set, it is `~/.hledger.journal`. +_LEDGER_FILE_ # FILES -Reads data from a hledger journal file (`$LEDGER_FILE` or -`~/.hledger.journal` by default), or a CSV file plus associated CSV -rules file. +Reads _files_ # BUGS The need to precede options with `--` when invoked from hledger is awkward. - - - - - - - - - - - - - - - }}) diff --git a/hledger-api/doc/hledger-api.1.txt b/hledger-api/doc/hledger-api.1.txt index 260b5f8fc..b849eb180 100644 --- a/hledger-api/doc/hledger-api.1.txt +++ b/hledger-api/doc/hledger-api.1.txt @@ -21,9 +21,11 @@ DDEESSCCRRIIPPTTIIOONN web apps operating on hledger data. It comes with a series of simple client-side app examples, which drive it's evolution. - Data is served from the usual hledger journal file: ~/.hledger.journal, - $LEDGER_FILE, or another file specified with -f. For more about the - format, see hledger(1) or hledger_journal(5). + Like hledger, it reads data from one or more files in hledger journal, + timeclock, timedot, or CSV format specified with -f, or $LEDGER_FILE, + or $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). For more about this see hledger(1), + hledger_journal(5) etc. The server listens on port 8001, or another specified with -p PORT. Note there is no built-in access control, so you will need to hide @@ -77,13 +79,15 @@ OOPPTTIIOONNSS ignore any failing balance assertions in the journal EENNVVIIRROONNMMEENNTT - LLEEDDGGEERR__FFIILLEE sets the default journal file path. If not set, it is - ~/.hledger.journal. + LLEEDDGGEERR__FFIILLEE The journal file path when not specified with -f. Default: + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + nal). FFIILLEESS - Reads data from a hledger journal file ($LEDGER_FILE or - ~/.hledger.journal by default), or a CSV file plus associated CSV rules - file. + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). BBUUGGSS The need to precede options with -- when invoked from hledger is awk- diff --git a/hledger-ui/doc/hledger-ui.1 b/hledger-ui/doc/hledger-ui.1 index 194b209b7..5e0782be9 100644 --- a/hledger-ui/doc/hledger-ui.1 +++ b/hledger-ui/doc/hledger-ui.1 @@ -20,21 +20,17 @@ other commodity, using double\-entry accounting and a simple, editable file format. hledger is inspired by and largely compatible with ledger(1). .PP -hledger\-ui is hledger\[aq]s curses\-style interface. -It reads a hledger journal file +hledger\-ui is hledger\[aq]s curses\-style interface, providing an +efficient full\-window text UI for viewing accounts and transactions, +and some limited data entry capability. +It is easier than hledger\[aq]s command\-line interface, and sometimes +quicker and more convenient than the web interface. .PP -(~/.hledger.journal, $LEDGER_FILE, or \-f FILE; see hledger(1) or -hledger_journal(5)) -.PP -and provides a simple full\-screen console interface for viewing account -balances and transactions. -.PP -It is simpler and more convenient for browsing than the command\-line -interface, but lighter and faster than hledger\-web. -.PP -The journal file is \f[C]~/.hledger.journal\f[], \f[C]$LEDGER_FILE\f[], -or another file specified with \-f. -For more about the format, see hledger(1) or hledger_journal(5). +Like hledger, it reads data from one or more files in hledger journal, +timeclock, timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). +For more about this see hledger(1), hledger_journal(5) etc. .SH OPTIONS .PP Note: if invoking hledger\-ui as a hledger subcommand, write @@ -369,16 +365,19 @@ Once you have fixed the problem described, press g again to reload and restore normal operation. .SH ENVIRONMENT .PP -\f[B]LEDGER_FILE\f[] sets the default journal file path. -If not set, it is \f[C]~/.hledger.journal\f[]. +\f[B]COLUMNS\f[] The screen width to use. +Default: the full terminal width. .PP -\f[B]COLUMNS\f[] sets the screen width to use (normally the full -terminal width). +\f[B]LEDGER_FILE\f[] The journal file path when not specified with +\f[C]\-f\f[]. +Default: \f[C]~/.hledger.journal\f[] (on windows, perhaps +\f[C]C:/Users/USER/.hledger.journal\f[]). .SH FILES .PP -Reads data from a hledger journal file (\f[C]$LEDGER_FILE\f[] or -\f[C]~/.hledger.journal\f[] by default), or a CSV file plus associated -CSV rules file. +Reads data from one or more files in hledger journal, timeclock, +timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). .SH BUGS .PP The need to precede options with \f[C]\-\-\f[] when invoked from hledger diff --git a/hledger-ui/doc/hledger-ui.1.info b/hledger-ui/doc/hledger-ui.1.info index cb71a9204..b708acf11 100644 --- a/hledger-ui/doc/hledger-ui.1.info +++ b/hledger-ui/doc/hledger-ui.1.info @@ -7,18 +7,17 @@ File: hledger-ui.1.info, Node: Top, Up: (dir) hledger-ui(1) hledger-ui 0.28 ***************************** -hledger-ui is hledger's curses-style interface. It reads a hledger -journal file +hledger-ui is hledger's curses-style interface, providing an efficient +full-window text UI for viewing accounts and transactions, and some +limited data entry capability. It is easier than hledger's command-line +interface, and sometimes quicker and more convenient than the web +interface. - and provides a simple full-screen console interface for viewing -account balances and transactions. - - It is simpler and more convenient for browsing than the command-line -interface, but lighter and faster than hledger-web. - - The journal file is `~/.hledger.journal', `$LEDGER_FILE', or another -file specified with -f. For more about the format, see hledger(1) or -hledger_journal(5). + Like hledger, it reads data from one or more files in hledger +journal, timeclock, timedot, or CSV format specified with `-f', or +`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps +`C:/Users/USER/.hledger.journal'). For more about this see hledger(1), +hledger_journal(5) etc. * Menu: @@ -316,19 +315,19 @@ press g again to reload and restore normal operation.  Tag Table: Node: Top88 -Node: OPTIONS714 -Ref: #options813 -Node: KEYS3689 -Ref: #keys3786 -Node: SCREENS4726 -Ref: #screens4813 -Node: Accounts screen4903 -Ref: #accounts-screen5033 -Node: Register screen6137 -Ref: #register-screen6294 -Node: Transaction screen8047 -Ref: #transaction-screen8207 -Node: Error screen9074 -Ref: #error-screen9198 +Node: OPTIONS825 +Ref: #options924 +Node: KEYS3800 +Ref: #keys3897 +Node: SCREENS4837 +Ref: #screens4924 +Node: Accounts screen5014 +Ref: #accounts-screen5144 +Node: Register screen6248 +Ref: #register-screen6405 +Node: Transaction screen8158 +Ref: #transaction-screen8318 +Node: Error screen9185 +Ref: #error-screen9309  End Tag Table diff --git a/hledger-ui/doc/hledger-ui.1.m4.md b/hledger-ui/doc/hledger-ui.1.m4.md index f5c3fed0d..17731b3bc 100644 --- a/hledger-ui/doc/hledger-ui.1.m4.md +++ b/hledger-ui/doc/hledger-ui.1.m4.md @@ -19,8 +19,8 @@ _toc_ }}) -_man_({{ +_man_({{ # NAME hledger-ui - curses-style interface for the hledger accounting tool @@ -32,25 +32,16 @@ hledger-ui - curses-style interface for the hledger accounting tool # DESCRIPTION -hledger is a cross-platform program for tracking money, time, or any other commodity, -using double-entry accounting and a simple, editable file format. -hledger is inspired by and largely compatible with ledger(1). - +_hledgerdescription_ }}) -hledger-ui is hledger's curses-style interface. -It reads a hledger journal file -_man_({{ -(~/.hledger.journal, $LEDGER_FILE, or -f FILE; see hledger(1) or hledger_journal(5)) -}}) -and provides a simple full-screen console interface for viewing account balances and transactions. +hledger-ui is hledger's curses-style interface, providing an efficient full-window text UI +for viewing accounts and transactions, and some limited data entry capability. +It is easier than hledger's command-line interface, and +sometimes quicker and more convenient than the web interface. -It is simpler and more convenient for -browsing than the command-line interface, but lighter and faster than -hledger-web. - -The journal file is `~/.hledger.journal`, `$LEDGER_FILE`, or another file specified with -f. -For more about the format, see hledger(1) or hledger_journal(5). +Like hledger, it reads _files_ +For more about this see hledger(1), hledger_journal(5) etc. # OPTIONS @@ -217,17 +208,15 @@ _man_({{ # ENVIRONMENT -**LEDGER_FILE** -sets the default journal file path. If not set, it is `~/.hledger.journal`. - **COLUMNS** -sets the screen width to use (normally the full terminal width). +The screen width to use. +Default: the full terminal width. + +_LEDGER_FILE_ # FILES -Reads data from a hledger journal file (`$LEDGER_FILE` or -`~/.hledger.journal` by default), or a CSV file plus associated CSV -rules file. +Reads _files_ # BUGS diff --git a/hledger-ui/doc/hledger-ui.1.txt b/hledger-ui/doc/hledger-ui.1.txt index 814d46a74..8d9579c3d 100644 --- a/hledger-ui/doc/hledger-ui.1.txt +++ b/hledger-ui/doc/hledger-ui.1.txt @@ -16,21 +16,17 @@ DDEESSCCRRIIPPTTIIOONN file format. hledger is inspired by and largely compatible with ledger(1). - hledger-ui is hledger's curses-style interface. It reads a hledger - journal file + hledger-ui is hledger's curses-style interface, providing an efficient + full-window text UI for viewing accounts and transactions, and some + limited data entry capability. It is easier than hledger's com- + mand-line interface, and sometimes quicker and more convenient than the + web interface. - (~/.hledger.journal, $LEDGER_FILE, or -f FILE; see hledger(1) or - hledger_journal(5)) - - and provides a simple full-screen console interface for viewing account - balances and transactions. - - It is simpler and more convenient for browsing than the command-line - interface, but lighter and faster than hledger-web. - - The journal file is ~/.hledger.journal, $LEDGER_FILE, or another file - specified with -f. For more about the format, see hledger(1) or - hledger_journal(5). + Like hledger, it reads data from one or more files in hledger journal, + timeclock, timedot, or CSV format specified with -f, or $LEDGER_FILE, + or $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). For more about this see hledger(1), + hledger_journal(5) etc. OOPPTTIIOONNSS Note: if invoking hledger-ui as a hledger subcommand, write -- before @@ -266,19 +262,20 @@ SSCCRREEEENNSS press g again to reload and restore normal operation. EENNVVIIRROONNMMEENNTT - LLEEDDGGEERR__FFIILLEE sets the default journal file path. If not set, it is - ~/.hledger.journal. + CCOOLLUUMMNNSS The screen width to use. Default: the full terminal width. - CCOOLLUUMMNNSS sets the screen width to use (normally the full terminal - width). + LLEEDDGGEERR__FFIILLEE The journal file path when not specified with -f. Default: + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + nal). FFIILLEESS - Reads data from a hledger journal file ($LEDGER_FILE or - ~/.hledger.journal by default), or a CSV file plus associated CSV rules - file. + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). BBUUGGSS - The need to precede options with -- when invoked from hledger is awk- + The need to precede options with -- when invoked from hledger is awk- ward. -f- doesn't work (hledger-ui can't read from stdin). @@ -289,14 +286,14 @@ BBUUGGSS which may cause a noticeable pause. Also there is no visual indication that this is in progress. - The register screen's switching between historic balance and running + The register screen's switching between historic balance and running total based on query arguments may be confusing, and there is no column heading to indicate which is being displayed. RREEPPOORRTTIINNGG BBUUGGSS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -310,7 +307,7 @@ CCOOPPYYRRIIGGHHTT SSEEEE AALLSSOO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1) diff --git a/hledger-web/doc/hledger-web.1 b/hledger-web/doc/hledger-web.1 index df9c010c5..31069b8b0 100644 --- a/hledger-web/doc/hledger-web.1 +++ b/hledger-web/doc/hledger-web.1 @@ -38,9 +38,11 @@ As a small protection against data loss when running an unprotected instance, it writes a numbered backup of the main journal file (only ?) on every edit. .PP -The journal file is \f[C]~/.hledger.journal\f[], \f[C]$LEDGER_FILE\f[], -or another file specified with \-f. -For more about the format, see hledger(1) or hledger_journal(5). +Like hledger, it reads data from one or more files in hledger journal, +timeclock, timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). +For more about this see hledger(1), hledger_journal(5) etc. .PP By default, hledger\-web starts the web app in "transient mode" and also opens it in your default web browser if possible. @@ -266,13 +268,16 @@ be "TAG:multi:level:account:name". .RE .SH ENVIRONMENT .PP -\f[B]LEDGER_FILE\f[] sets the default journal file path. -If not set, it is \f[C]~/.hledger.journal\f[]. +\f[B]LEDGER_FILE\f[] The journal file path when not specified with +\f[C]\-f\f[]. +Default: \f[C]~/.hledger.journal\f[] (on windows, perhaps +\f[C]C:/Users/USER/.hledger.journal\f[]). .SH FILES .PP -Reads data from a hledger journal file (\f[C]$LEDGER_FILE\f[] or -\f[C]~/.hledger.journal\f[] by default), or a CSV file plus associated -CSV rules file. +Reads data from one or more files in hledger journal, timeclock, +timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). .SH BUGS .PP The need to precede options with \f[C]\-\-\f[] when invoked from hledger @@ -281,19 +286,11 @@ is awkward. \f[C]\-f\-\f[] doesn\[aq]t work (hledger\-web can\[aq]t read from stdin). .PP -Query arguments and some applicable hledger options probably aren\[aq]t -supported. +Query arguments and some hledger options are ignored. .PP Does not work in text\-mode browsers. .PP Does not work well on small screens. -.PP -The auto\-exit feature was added to avoid leaving stray processes, eg on -Windows. -It is not well tested. -.PP -If you start two instances on the same port, the second one will appear -to run normally, but you will be seeing pages served from the first one. .SH "REPORTING BUGS" diff --git a/hledger-web/doc/hledger-web.1.info b/hledger-web/doc/hledger-web.1.info index a641fa7ec..b37ae56e7 100644 --- a/hledger-web/doc/hledger-web.1.info +++ b/hledger-web/doc/hledger-web.1.info @@ -20,9 +20,11 @@ should put it behind a suitable web proxy. As a small protection against data loss when running an unprotected instance, it writes a numbered backup of the main journal file (only ?) on every edit. - The journal file is `~/.hledger.journal', `$LEDGER_FILE', or another -file specified with -f. For more about the format, see hledger(1) or -hledger_journal(5). + Like hledger, it reads data from one or more files in hledger +journal, timeclock, timedot, or CSV format specified with `-f', or +`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps +`C:/Users/USER/.hledger.journal'). For more about this see hledger(1), +hledger_journal(5) etc. By default, hledger-web starts the web app in "transient mode" and also opens it in your default web browser if possible. In this mode the @@ -188,7 +190,7 @@ before options as shown above.  Tag Table: Node: Top90 -Node: OPTIONS2868 -Ref: #options2955 +Node: OPTIONS2999 +Ref: #options3086  End Tag Table diff --git a/hledger-web/doc/hledger-web.1.m4.md b/hledger-web/doc/hledger-web.1.m4.md index 593154840..7a3434f42 100644 --- a/hledger-web/doc/hledger-web.1.m4.md +++ b/hledger-web/doc/hledger-web.1.m4.md @@ -6,6 +6,7 @@ _web_({{ _versions_({{hledger-web}}) _toc_ }}) + _man_({{ # NAME @@ -28,9 +29,7 @@ hledger-web - web interface for the hledger accounting tool # DESCRIPTION -hledger is a cross-platform program for tracking money, time, or any other commodity, -using double-entry accounting and a simple, editable file format. -hledger is inspired by and largely compatible with ledger(1). +_hledgerdescription_ }}) hledger-web is hledger's web interface. It starts a simple web @@ -47,8 +46,8 @@ behind a suitable web proxy. As a small protection against data loss when running an unprotected instance, it writes a numbered backup of the main journal file (only ?) on every edit. -The journal file is `~/.hledger.journal`, `$LEDGER_FILE`, or another file specified with -f. -For more about the format, see hledger(1) or hledger_journal(5). +Like hledger, it reads _files_ +For more about this see hledger(1), hledger_journal(5) etc. By default, hledger-web starts the web app in "transient mode" and also opens it in your default web browser if possible. In this mode @@ -133,14 +132,11 @@ _man_({{ # ENVIRONMENT -**LEDGER_FILE** -sets the default journal file path. If not set, it is `~/.hledger.journal`. +_LEDGER_FILE_ # FILES -Reads data from a hledger journal file (`$LEDGER_FILE` or -`~/.hledger.journal` by default), or a CSV file plus associated CSV -rules file. +Reads _files_ # BUGS @@ -148,17 +144,10 @@ The need to precede options with `--` when invoked from hledger is awkward. `-f-` doesn't work (hledger-web can't read from stdin). -Query arguments and some applicable hledger options probably aren't supported. +Query arguments and some hledger options are ignored. Does not work in text-mode browsers. Does not work well on small screens. -The auto-exit feature was added to avoid leaving stray processes, eg on Windows. -It is not well tested. - -If you start two instances on the same port, the second one will -appear to run normally, but you will be seeing pages served from the -first one. - }}) diff --git a/hledger-web/doc/hledger-web.1.txt b/hledger-web/doc/hledger-web.1.txt index 88e1ee2ef..e53225c2a 100644 --- a/hledger-web/doc/hledger-web.1.txt +++ b/hledger-web/doc/hledger-web.1.txt @@ -31,9 +31,11 @@ DDEESSCCRRIIPPTTIIOONN against data loss when running an unprotected instance, it writes a numbered backup of the main journal file (only ?) on every edit. - The journal file is ~/.hledger.journal, $LEDGER_FILE, or another file - specified with -f. For more about the format, see hledger(1) or - hledger_journal(5). + Like hledger, it reads data from one or more files in hledger journal, + timeclock, timedot, or CSV format specified with -f, or $LEDGER_FILE, + or $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). For more about this see hledger(1), + hledger_journal(5) etc. By default, hledger-web starts the web app in "transient mode" and also opens it in your default web browser if possible. In this mode the web @@ -183,13 +185,15 @@ OOPPTTIIOONNSS name will be "TAG:multi:level:account:name". EENNVVIIRROONNMMEENNTT - LLEEDDGGEERR__FFIILLEE sets the default journal file path. If not set, it is - ~/.hledger.journal. + LLEEDDGGEERR__FFIILLEE The journal file path when not specified with -f. Default: + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + nal). FFIILLEESS - Reads data from a hledger journal file ($LEDGER_FILE or - ~/.hledger.journal by default), or a CSV file plus associated CSV rules - file. + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). BBUUGGSS The need to precede options with -- when invoked from hledger is awk- @@ -197,20 +201,12 @@ BBUUGGSS -f- doesn't work (hledger-web can't read from stdin). - Query arguments and some applicable hledger options probably aren't - supported. + Query arguments and some hledger options are ignored. Does not work in text-mode browsers. Does not work well on small screens. - The auto-exit feature was added to avoid leaving stray processes, eg on - Windows. It is not well tested. - - If you start two instances on the same port, the second one will appear - to run normally, but you will be seeing pages served from the first - one. - RREEPPOORRTTIINNGG BBUUGGSS diff --git a/hledger/doc/hledger.1 b/hledger/doc/hledger.1 index 36e4359c6..370e2a3cb 100644 --- a/hledger/doc/hledger.1 +++ b/hledger/doc/hledger.1 @@ -19,7 +19,10 @@ hledger \- a command\-line accounting tool hledger is a cross\-platform program for tracking money, time, or any other commodity, using double\-entry accounting and a simple, editable file format. -It is inspired by and largely compatible with ledger(1). +hledger is inspired by and largely compatible with ledger(1). +.PD 0 +.P +.PD Tested on unix, mac, windows, hledger aims to be a reliable, practical tool for daily use. .PP @@ -28,16 +31,18 @@ interfaces). Its basic function is to read a plain text file describing financial transactions (in accounting terms, a general journal) and print useful reports on standard output, or export them as CSV. -hledger can also read CSV files, converting them semi\-automatically to -journal format. +hledger can also read some other file formats such as CSV files, +translating them to journal format. Additionally, hledger lists other hledger\-* executables found in the user's $PATH and can invoke them as subcommands. .PP -The journal file is \f[C]~/.hledger.journal\f[] by default, or another -file path specified by \f[C]$LEDGER_FILE\f[]. -(This should be a real environment variable, not a shell variable.) You -can also specify a file with \f[C]\-f\ FILE\f[], or standard input with -\f[C]\-f\-\f[]. +hledger reads data from one or more files in hledger journal, timeclock, +timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). +If using \f[C]$LEDGER_FILE\f[], note this must be a real environment +variable, not a shell variable. +You can specify standard input with \f[C]\-f\-\f[]. .PP Transactions are dated movements of money between two (or more) named accounts, and are recorded with journal entries like this: @@ -50,7 +55,7 @@ accounts, and are recorded with journal entries like this: \f[] .fi .PP -For more about the format, see hledger_journal(5). +For more about this format, see hledger_journal(5). .PP Most users use a text editor to edit the journal, usually with an editor mode such as ledger\-mode for added convenience. @@ -2272,16 +2277,19 @@ In a windows Cygwin/MSYS/Mintty window, the tab key is not supported in hledger add. .SH ENVIRONMENT .PP -\f[B]LEDGER_FILE\f[] sets the default journal file path. -If not set, it is \f[C]~/.hledger.journal\f[]. +\f[B]COLUMNS\f[] The screen width used by the register command. +Default: the full terminal width. .PP -\f[B]COLUMNS\f[] sets the default width used by the register command -(normally the full terminal width). +\f[B]LEDGER_FILE\f[] The journal file path when not specified with +\f[C]\-f\f[]. +Default: \f[C]~/.hledger.journal\f[] (on windows, perhaps +\f[C]C:/Users/USER/.hledger.journal\f[]). .SH FILES .PP -Reads data from a hledger journal file (\f[C]$LEDGER_FILE\f[] or -\f[C]~/.hledger.journal\f[] by default), or a CSV file plus associated -CSV rules file. +Reads data from one or more files in hledger journal, timeclock, +timedot, or CSV format specified with \f[C]\-f\f[], or +\f[C]$LEDGER_FILE\f[], or \f[C]$HOME/.hledger.journal\f[] (on windows, +perhaps \f[C]C:/Users/USER/.hledger.journal\f[]). .SH BUGS .PP The need to precede options with \f[C]\-\-\f[] when invoked from hledger diff --git a/hledger/doc/hledger.1.info b/hledger/doc/hledger.1.info index de1be67fb..f098f9c99 100644 --- a/hledger/doc/hledger.1.info +++ b/hledger/doc/hledger.1.info @@ -11,14 +11,17 @@ This is hledger's command-line interface (there are also curses and web interfaces). Its basic function is to read a plain text file describing financial transactions (in accounting terms, a general journal) and print useful reports on standard output, or export them as CSV. hledger -can also read CSV files, converting them semi-automatically to journal -format. Additionally, hledger lists other hledger-* executables found in -the user's $PATH and can invoke them as subcommands. +can also read some other file formats such as CSV files, translating +them to journal format. Additionally, hledger lists other hledger-* +executables found in the user's $PATH and can invoke them as +subcommands. - The journal file is `~/.hledger.journal' by default, or another file -path specified by `$LEDGER_FILE'. (This should be a real environment -variable, not a shell variable.) You can also specify a file with `-f -FILE', or standard input with `-f-'. + hledger reads data from one or more files in hledger journal, +timeclock, timedot, or CSV format specified with `-f', or +`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps +`C:/Users/USER/.hledger.journal'). If using `$LEDGER_FILE', note this +must be a real environment variable, not a shell variable. You can +specify standard input with `-f-'. Transactions are dated movements of money between two (or more) named accounts, and are recorded with journal entries like this: @@ -28,7 +31,7 @@ accounts, and are recorded with journal entries like this: expenses:food $10 assets:cash - For more about the format, see hledger_journal(5). + For more about this format, see hledger_journal(5). Most users use a text editor to edit the journal, usually with an editor mode such as ledger-mode for added convenience. hledger's @@ -2039,99 +2042,99 @@ in hledger add.  Tag Table: Node: Top82 -Node: EXAMPLES1748 -Ref: #examples1850 -Node: OPTIONS3854 -Ref: #options3958 -Node: Multiple files7267 -Ref: #multiple-files7392 -Node: Repeated options7657 -Ref: #repeated-options7809 -Node: Depth limiting7929 -Ref: #depth-limiting8074 -Node: Smart dates8275 -Ref: #smart-dates8416 -Node: Reporting interval9413 -Ref: #reporting-interval9572 -Node: Period expressions9915 -Ref: #period-expressions10082 -Node: Regular Expressions12128 -Ref: #regular-expressions12270 -Node: QUERIES13753 -Ref: #queries13857 -Node: COMMANDS17159 -Ref: #commands17273 -Node: accounts17946 -Ref: #accounts18046 -Node: activity19028 -Ref: #activity19140 -Node: add19499 -Ref: #add19600 -Node: balance22259 -Ref: #balance22372 -Node: Flat mode25088 -Ref: #flat-mode25215 -Node: Depth limited balance reports25634 -Ref: #depth-limited-balance-reports25837 -Node: Multicolumn balance reports26258 -Ref: #multicolumn-balance-reports26460 -Node: Market value31109 -Ref: #market-value31273 -Node: Custom balance output31766 -Ref: #custom-balance-output31939 -Node: Output destination34043 -Ref: #output-destination34208 -Node: CSV output34478 -Ref: #csv-output34597 -Node: balancesheet34994 -Ref: #balancesheet35122 -Node: cashflow35774 -Ref: #cashflow35891 -Node: help36581 -Ref: #help36693 -Node: incomestatement37530 -Ref: #incomestatement37660 -Node: info38387 -Ref: #info38494 -Node: man38856 -Ref: #man38953 -Node: print39356 -Ref: #print39461 -Node: register40812 -Ref: #register40925 -Node: Custom register output45266 -Ref: #custom-register-output45397 -Node: stats46694 -Ref: #stats46800 -Node: test47681 -Ref: #test47768 -Node: ADD-ON COMMANDS48135 -Ref: #add-on-commands48271 -Node: api49559 -Ref: #api49651 -Node: autosync49685 -Ref: #autosync49800 -Node: diff52115 -Ref: #diff52225 -Node: equity52889 -Ref: #equity53003 -Node: interest54331 -Ref: #interest54448 -Node: irr57532 -Ref: #irr57645 -Node: print-unique60020 -Ref: #print-unique60150 -Node: rewrite60408 -Ref: #rewrite60527 -Node: ui61056 -Ref: #ui61156 -Node: web61197 -Ref: #web61285 -Node: TROUBLESHOOTING61318 -Ref: #troubleshooting61437 -Node: Run-time problems61491 -Ref: #run-time-problems61634 -Node: Known limitations63578 -Ref: #known-limitations63721 +Node: EXAMPLES1875 +Ref: #examples1977 +Node: OPTIONS3981 +Ref: #options4085 +Node: Multiple files7394 +Ref: #multiple-files7519 +Node: Repeated options7784 +Ref: #repeated-options7936 +Node: Depth limiting8056 +Ref: #depth-limiting8201 +Node: Smart dates8402 +Ref: #smart-dates8543 +Node: Reporting interval9540 +Ref: #reporting-interval9699 +Node: Period expressions10042 +Ref: #period-expressions10209 +Node: Regular Expressions12255 +Ref: #regular-expressions12397 +Node: QUERIES13880 +Ref: #queries13984 +Node: COMMANDS17286 +Ref: #commands17400 +Node: accounts18073 +Ref: #accounts18173 +Node: activity19155 +Ref: #activity19267 +Node: add19626 +Ref: #add19727 +Node: balance22386 +Ref: #balance22499 +Node: Flat mode25215 +Ref: #flat-mode25342 +Node: Depth limited balance reports25761 +Ref: #depth-limited-balance-reports25964 +Node: Multicolumn balance reports26385 +Ref: #multicolumn-balance-reports26587 +Node: Market value31236 +Ref: #market-value31400 +Node: Custom balance output31893 +Ref: #custom-balance-output32066 +Node: Output destination34170 +Ref: #output-destination34335 +Node: CSV output34605 +Ref: #csv-output34724 +Node: balancesheet35121 +Ref: #balancesheet35249 +Node: cashflow35901 +Ref: #cashflow36018 +Node: help36708 +Ref: #help36820 +Node: incomestatement37657 +Ref: #incomestatement37787 +Node: info38514 +Ref: #info38621 +Node: man38983 +Ref: #man39080 +Node: print39483 +Ref: #print39588 +Node: register40939 +Ref: #register41052 +Node: Custom register output45393 +Ref: #custom-register-output45524 +Node: stats46821 +Ref: #stats46927 +Node: test47808 +Ref: #test47895 +Node: ADD-ON COMMANDS48262 +Ref: #add-on-commands48398 +Node: api49686 +Ref: #api49778 +Node: autosync49812 +Ref: #autosync49927 +Node: diff52242 +Ref: #diff52352 +Node: equity53016 +Ref: #equity53130 +Node: interest54458 +Ref: #interest54575 +Node: irr57659 +Ref: #irr57772 +Node: print-unique60147 +Ref: #print-unique60277 +Node: rewrite60535 +Ref: #rewrite60654 +Node: ui61183 +Ref: #ui61283 +Node: web61324 +Ref: #web61412 +Node: TROUBLESHOOTING61445 +Ref: #troubleshooting61564 +Node: Run-time problems61618 +Ref: #run-time-problems61761 +Node: Known limitations63705 +Ref: #known-limitations63848  End Tag Table diff --git a/hledger/doc/hledger.1.m4.md b/hledger/doc/hledger.1.m4.md index 96ece9f97..3f4694a78 100644 --- a/hledger/doc/hledger.1.m4.md +++ b/hledger/doc/hledger.1.m4.md @@ -6,6 +6,7 @@ _web_({{ _versions_({{hledger}}) _toc_ }}) + _man_({{ # NAME @@ -19,27 +20,23 @@ hledger - a command-line accounting tool # DESCRIPTION -hledger is a cross-platform program for tracking money, time, or any -other commodity, using double-entry accounting and a simple, editable -file format. It is inspired by and largely compatible with ledger(1). +_hledgerdescription_ Tested on unix, mac, windows, hledger aims to be a reliable, practical tool for daily use. - }}) This is hledger’s command-line interface (there are also curses and web interfaces). Its basic function is to read a plain text file describing financial transactions (in accounting terms, a general journal) and print useful reports on standard output, or export them as CSV. hledger -can also read CSV files, converting them semi-automatically to journal -format. Additionally, hledger lists other hledger-\* executables found -in the user’s \$PATH and can invoke them as subcommands. +can also read some other file formats such as CSV files, translating +them to journal format. Additionally, hledger lists other hledger-\* +executables found in the user’s \$PATH and can invoke them as subcommands. -The journal file is `~/.hledger.journal` by default, or another file path -specified by `$LEDGER_FILE`. -(This should be a real environment variable, not a shell variable.) -You can also specify a file with `-f FILE`, -or standard input with `-f-`. +hledger reads _files_ +If using `$LEDGER_FILE`, note this must be a real environment variable, +not a shell variable. +You can specify standard input with `-f-`. Transactions are dated movements of money between two (or more) named accounts, and are recorded with journal entries like this: @@ -50,7 +47,7 @@ _journal_({{ assets:cash }}) -For more about the format, see hledger_journal(5). +For more about this format, see hledger_journal(5). Most users use a text editor to edit the journal, usually with an editor mode such as ledger-mode for added convenience. hledger’s interactive @@ -71,17 +68,15 @@ _man_({{ # ENVIRONMENT -**LEDGER_FILE** -sets the default journal file path. If not set, it is `~/.hledger.journal`. - **COLUMNS** -sets the default width used by the register command (normally the full terminal width). +The screen width used by the register command. +Default: the full terminal width. + +_LEDGER_FILE_ # FILES -Reads data from a hledger journal file (`$LEDGER_FILE` or -`~/.hledger.journal` by default), or a CSV file plus associated CSV -rules file. +Reads _files_ # BUGS diff --git a/hledger/doc/hledger.1.txt b/hledger/doc/hledger.1.txt index 71f46b773..22b4c54a9 100644 --- a/hledger/doc/hledger.1.txt +++ b/hledger/doc/hledger.1.txt @@ -13,7 +13,8 @@ SSYYNNOOPPSSIISS DDEESSCCRRIIPPTTIIOONN hledger is a cross-platform program for tracking money, time, or any other commodity, using double-entry accounting and a simple, editable - file format. It is inspired by and largely compatible with ledger(1). + file format. hledger is inspired by and largely compatible with + ledger(1). Tested on unix, mac, windows, hledger aims to be a reliable, practical tool for daily use. @@ -21,32 +22,35 @@ DDEESSCCRRIIPPTTIIOONN interfaces). Its basic function is to read a plain text file describ- ing financial transactions (in accounting terms, a general journal) and print useful reports on standard output, or export them as CSV. - hledger can also read CSV files, converting them semi-automatically to - journal format. Additionally, hledger lists other hledger-* executa- - bles found in the user's $PATH and can invoke them as subcommands. + hledger can also read some other file formats such as CSV files, trans- + lating them to journal format. Additionally, hledger lists other + hledger-* executables found in the user's $PATH and can invoke them as + subcommands. - The journal file is ~/.hledger.journal by default, or another file path - specified by $LEDGER_FILE. (This should be a real environment vari- - able, not a shell variable.) You can also specify a file with -f FILE, - or standard input with -f-. + hledger reads data from one or more files in hledger journal, time- + clock, timedot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). If using $LEDGER_FILE, note this must + be a real environment variable, not a shell variable. You can specify + standard input with -f-. - Transactions are dated movements of money between two (or more) named + Transactions are dated movements of money between two (or more) named accounts, and are recorded with journal entries like this: 2015/10/16 bought food expenses:food $10 assets:cash - For more about the format, see hledger_journal(5). + For more about this format, see hledger_journal(5). - Most users use a text editor to edit the journal, usually with an edi- + Most users use a text editor to edit the journal, usually with an edi- tor mode such as ledger-mode for added convenience. hledger's interac- - tive add command is another way to record new transactions. hledger + tive add command is another way to record new transactions. hledger never changes existing transactions. - To get started, you can either save some entries like the above in - ~/.hledger.journal, or run hledger add and follow the prompts. Then - try some commands like hledger print or hledger balance. See COMMANDS + To get started, you can either save some entries like the above in + ~/.hledger.journal, or run hledger add and follow the prompts. Then + try some commands like hledger print or hledger balance. See COMMANDS and EXAMPLES below. EEXXAAMMPPLLEESS @@ -121,11 +125,11 @@ OOPPTTIIOONNSS To see usage for a specific command: hledger COMMAND -h - Except for the General options below, options must be written after + Except for the General options below, options must be written after COMMAND, not before it. - Also, when invoking external add-on commands, their options must be - written after a double hyphen. (Or, you can invoke the external com- + Also, when invoking external add-on commands, their options must be + written after a double hyphen. (Or, you can invoke the external com- mand directly.) Eg: $ hledger ui -- --register cash @@ -139,7 +143,7 @@ OOPPTTIIOONNSS --hh show general usage (or after COMMAND, the command's usage) - ----hheellpp show the current program's manual as plain text (or after an + ----hheellpp show the current program's manual as plain text (or after an add-on COMMAND, the add-on's manual) ----mmaann show the current program's manual with man @@ -156,7 +160,7 @@ OOPPTTIIOONNSS use a different input file. For stdin, use - ----rruulleess--ffiillee==RRUULLEESSFFIILLEE - Conversion rules file to use when reading CSV (default: + Conversion rules file to use when reading CSV (default: FILE.rules) ----aalliiaass==OOLLDD==NNEEWW @@ -165,8 +169,8 @@ OOPPTTIIOONNSS ----iiggnnoorree--aasssseerrttiioonnss ignore any failing balance assertions in the journal - Common reporting options are supported by most commands where applica- - ble, and individual commands may provide additional command-specific + Common reporting options are supported by most commands where applica- + ble, and individual commands may provide additional command-specific options. Both of these must be written after the command name. --bb ----bbeeggiinn==DDAATTEE @@ -191,7 +195,7 @@ OOPPTTIIOONNSS multiperiod/multicolumn report by year --pp ----ppeerriioodd==PPEERRIIOODDEEXXPP - set start date, end date, and/or reporting interval all at once + set start date, end date, and/or reporting interval all at once (overrides the flags above) ----ddaattee22 @@ -219,18 +223,18 @@ OOPPTTIIOONNSS show amounts in their cost price's commodity ----ppiivvoott TTAAGG - will transform the journal before any other processing by - replacing the account name of every posting having the tag TAG + will transform the journal before any other processing by + replacing the account name of every posting having the tag TAG with content VALUE by the account name "TAG:VALUE". - The TAG will only match if it is a full-length match. The pivot will - only happen if the TAG is on a posting, not if it is on the transac- - tion. If the tag value is a multi:level:account:name the new account + The TAG will only match if it is a full-length match. The pivot will + only happen if the TAG is on a posting, not if it is on the transac- + tion. If the tag value is a multi:level:account:name the new account name will be "TAG:multi:level:account:name". MMuullttiippllee ffiilleess - You can specify multiple -f/--file FILE options. This is like combin- - ing all the files into one, except they can have different formats. - Also directives and aliases in one file do not affect subsequent files + You can specify multiple -f/--file FILE options. This is like combin- + ing all the files into one, except they can have different formats. + Also directives and aliases in one file do not affect subsequent files (if you need that, use the include directive instead). RReeppeeaatteedd ooppttiioonnss @@ -238,145 +242,145 @@ OOPPTTIIOONNSS dence. Eg -p jan -p feb is equivalent to -p feb. DDeepptthh lliimmiittiinngg - With the --depth N option, commands like account, balance and register - will show only the uppermost accounts in the account tree, down to + With the --depth N option, commands like account, balance and register + will show only the uppermost accounts in the account tree, down to level N. Use this when you want a summary with less detail. SSmmaarrtt ddaatteess hledger's user interfaces accept a flexible "smart date" syntax (unlike - dates in the journal file). Smart dates allow some english words, can - be relative to today's date, and can have less-significant date parts + dates in the journal file). Smart dates allow some english words, can + be relative to today's date, and can have less-significant date parts omitted (defaulting to 1). Examples: - tab(@); l l. T{ 2009/1/1, 2009/01/01, 2009-1-1, 2009.1.1 T}@T{ simple - dates, several separators allowed T} T{ 2009/1, 2009 T}@T{ same as - above - a missing day or month defaults to 1 T} T{ 1/1, january, jan, - this year T}@T{ relative dates, meaning january 1 of the current year + tab(@); l l. T{ 2009/1/1, 2009/01/01, 2009-1-1, 2009.1.1 T}@T{ simple + dates, several separators allowed T} T{ 2009/1, 2009 T}@T{ same as + above - a missing day or month defaults to 1 T} T{ 1/1, january, jan, + this year T}@T{ relative dates, meaning january 1 of the current year T} T{ next year T}@T{ january 1 of next year T} T{ this month T}@T{ the - 1st of the current month T} T{ this week T}@T{ the most recent monday - T} T{ last week T}@T{ the monday of the week before this one T} T{ - lastweek T}@T{ spaces are optional T} T{ today, yesterday, tomorrow + 1st of the current month T} T{ this week T}@T{ the most recent monday + T} T{ last week T}@T{ the monday of the week before this one T} T{ + lastweek T}@T{ spaces are optional T} T{ today, yesterday, tomorrow T}@T{ T} RReeppoorrttiinngg iinntteerrvvaall - A reporting interval can be specified so that commands like register, - balance and activity will divide their reports into multiple report - periods. The basic intervals can be selected with one of -D/--daily, - -W/--weekly, -M/--monthly, -Q/--quarterly, or -Y/--yearly. More com- + A reporting interval can be specified so that commands like register, + balance and activity will divide their reports into multiple report + periods. The basic intervals can be selected with one of -D/--daily, + -W/--weekly, -M/--monthly, -Q/--quarterly, or -Y/--yearly. More com- plex intervals may be specified with a period expression. PPeerriioodd eexxpprreessssiioonnss - The -p/--period option accepts period expressions, a shorthand way of - expressing a start date, end date, and or reporting interval all at - once. Note a period expression on the command line will cause any + The -p/--period option accepts period expressions, a shorthand way of + expressing a start date, end date, and or reporting interval all at + once. Note a period expression on the command line will cause any other date flags (-b/-e/-D/-W/-M/-Q/-Y) to be ignored. - hledger's period expressions are similar to Ledger's, though not iden- - tical. Here's a basic period expression specifying the first quarter - of 2009. Note, hledger always treats start dates as inclusive and end + hledger's period expressions are similar to Ledger's, though not iden- + tical. Here's a basic period expression specifying the first quarter + of 2009. Note, hledger always treats start dates as inclusive and end dates as exclusive: -p "from 2009/1/1 to 2009/4/1" - Keywords like "from" and "to" are optional, and so are the spaces, as - long as you don't run two dates together. "to" can also be written as + Keywords like "from" and "to" are optional, and so are the spaces, as + long as you don't run two dates together. "to" can also be written as "-". These are equivalent to the above: - tab(@); l. T{ -p "2009/1/1 2009/4/1" T} T{ -p2009/1/1to2009/4/1 T} T{ + tab(@); l. T{ -p "2009/1/1 2009/4/1" T} T{ -p2009/1/1to2009/4/1 T} T{ -p2009/1/1-2009/4/1 T} - Dates are smart dates, so if the current year is 2009, the above can + Dates are smart dates, so if the current year is 2009, the above can also be written as: - tab(@); l. T{ -p "1/1 4/1" T} T{ -p "january-apr" T} T{ + tab(@); l. T{ -p "1/1 4/1" T} T{ -p "january-apr" T} T{ -p "this year to 4/1" T} If you specify only one date, the missing start or end date will be the earliest or latest transaction in your journal: - tab(@); l l. T{ -p "from 2009/1/1" T}@T{ everything after january 1, - 2009 T} T{ -p "from 2009/1" T}@T{ the same T} T{ -p "from 2009" T}@T{ + tab(@); l l. T{ -p "from 2009/1/1" T}@T{ everything after january 1, + 2009 T} T{ -p "from 2009/1" T}@T{ the same T} T{ -p "from 2009" T}@T{ the same T} T{ -p "to 2009" T}@T{ everything before january 1, 2009 T} - A single date with no "from" or "to" defines both the start and end + A single date with no "from" or "to" defines both the start and end date like so: tab(@); l l. T{ -p "2009" T}@T{ the year 2009; equivalent to "2009/1/1 - to 2010/1/1" T} T{ -p "2009/1" T}@T{ the month of jan; equivalent to + to 2010/1/1" T} T{ -p "2009/1" T}@T{ the month of jan; equivalent to "2009/1/1 to 2009/2/1" T} T{ -p "2009/1/1" T}@T{ just that day; equiva- lent to "2009/1/1 to 2009/1/2" T} - Period expressions can also start with (or be) a reporting interval: - daily, weekly, monthly, quarterly, yearly, or one of the every ... - expressions below. Optionally the word in may appear between the + Period expressions can also start with (or be) a reporting interval: + daily, weekly, monthly, quarterly, yearly, or one of the every ... + expressions below. Optionally the word in may appear between the reporting interval and the start/end dates. Examples: - tab(@); l. T{ -p "weekly from 2009/1/1 to 2009/4/1" T} T{ - -p "monthly in 2008" T} T{ -p "bimonthly from 2008" T} T{ -p "quar- - terly" T} T{ -p "every 2 weeks" T} T{ -p "every 5 days from 1/3" T} T{ + tab(@); l. T{ -p "weekly from 2009/1/1 to 2009/4/1" T} T{ + -p "monthly in 2008" T} T{ -p "bimonthly from 2008" T} T{ -p "quar- + terly" T} T{ -p "every 2 weeks" T} T{ -p "every 5 days from 1/3" T} T{ -p "every 15th day of month" T} T{ -p "every 4th day of week" T} RReegguullaarr EExxpprreessssiioonnss hledger uses regular expressions in a number of places: - +o query terms, on the command line and in the hledger-web search form: + +o query terms, on the command line and in the hledger-web search form: REGEX, desc:REGEX, cur:REGEX, tag:...=REGEX +o CSV rules conditional blocks: if REGEX ... - +o account alias directives and options: alias /REGEX/ = REPLACEMENT, + +o account alias directives and options: alias /REGEX/ = REPLACEMENT, --alias /REGEX/=REPLACEMENT - hledger's regular expressions come from the regex-tdfa library. In + hledger's regular expressions come from the regex-tdfa library. In general they: +o are case insensitive - +o are infix matching (do not need to match the entire thing being + +o are infix matching (do not need to match the entire thing being matched) +o are POSIX extended regular expressions +o also support GNU word boundaries (\<, \>, \b, \B) - +o and parenthesised capturing groups and numeric backreferences in + +o and parenthesised capturing groups and numeric backreferences in replacement strings +o do not support mode modifiers like (?s) Some things to note: - +o In the alias directive and --alias option, regular expressions must - be enclosed in forward slashes (/REGEX/). Elsewhere in hledger, + +o In the alias directive and --alias option, regular expressions must + be enclosed in forward slashes (/REGEX/). Elsewhere in hledger, these are not required. +o To match a regular expression metacharacter like $ as a literal char- acter, prepend a backslash. Eg to search for amounts with the dollar sign in hledger-web, write cur:\$. - +o On the command line, some metacharacters like $ have a special mean- + +o On the command line, some metacharacters like $ have a special mean- ing to the shell and so must be escaped a second time, with single or - double quotes or another backslash. Eg, to match amounts with the + double quotes or another backslash. Eg, to match amounts with the dollar sign from the command line, write cur:'\$' or cur:\\$. QQUUEERRIIEESS - One of hledger's strengths is being able to quickly report on precise - subsets of your data. Most commands accept an optional query expres- - sion, written as arguments after the command name, to filter the data - by date, account name or other criteria. The syntax is similar to a + One of hledger's strengths is being able to quickly report on precise + subsets of your data. Most commands accept an optional query expres- + sion, written as arguments after the command name, to filter the data + by date, account name or other criteria. The syntax is similar to a web search: one or more space-separated search terms, quotes to enclose - whitespace, optional prefixes to match specific fields. Multiple + whitespace, optional prefixes to match specific fields. Multiple search terms are combined as follows: - All commands except print: show transactions/postings/accounts which + All commands except print: show transactions/postings/accounts which match (or negatively match) +o any of the description terms AND @@ -403,22 +407,22 @@ QQUUEERRIIEESS same as above aammtt::NN,, aammtt::<>NN,, aammtt::>>==NN - match postings with a single-commodity amount that is equal to, - less than, or greater than N. (Multi-commodity amounts are not + match postings with a single-commodity amount that is equal to, + less than, or greater than N. (Multi-commodity amounts are not tested, and will always match.) The comparison has two modes: if N is preceded by a + or - sign (or is 0), the two signed numbers - are compared. Otherwise, the absolute magnitudes are compared, + are compared. Otherwise, the absolute magnitudes are compared, ignoring sign. ccooddee::RREEGGEEXX match by transaction code (eg check number) ccuurr::RREEGGEEXX - match postings or transactions including any amounts whose cur- - rency/commodity symbol is fully matched by REGEX. (For a par- + match postings or transactions including any amounts whose cur- + rency/commodity symbol is fully matched by REGEX. (For a par- tial match, use .*REGEX.*). Note, to match characters which are regex-significant, like the dollar sign ($), you need to prepend - \. And when using the command line you need to add one more + \. And when using the command line you need to add one more level of quoting to hide it from the shell, so eg do: hledger print cur:'\$' or hledger print cur:\\$. @@ -426,48 +430,48 @@ QQUUEERRIIEESS match transaction descriptions ddaattee::PPEERRIIOODDEEXXPPRR - match dates within the specified period. PERIODEXPR should not - include a reporting interval. The command-line --date2 flag - makes this match secondary dates instead (like the -b/-e/-p + match dates within the specified period. PERIODEXPR should not + include a reporting interval. The command-line --date2 flag + makes this match secondary dates instead (like the -b/-e/-p options). ddaattee22::PPEERRIIOODDEEXXPPRR - match secondary dates within the specified period. PERIODEXPR + match secondary dates within the specified period. PERIODEXPR should not include a reporting interval. ddeepptthh::NN - match (or display, depending on command) accounts at or above + match (or display, depending on command) accounts at or above this depth rreeaall::,, rreeaall::00 match real or virtual postings respectively ssttaattuuss::**,, ssttaattuuss::!!,, ssttaattuuss:: - match cleared, pending, or uncleared/pending transactions + match cleared, pending, or uncleared/pending transactions respectively ttaagg::RREEGGEEXX[[==RREEGGEEXX]] - match by tag name, and optionally also by tag value. Note a - tag: query is considered to match a transaction if it matches - any of the postings. Also remember that postings inherit the + match by tag name, and optionally also by tag value. Note a + tag: query is considered to match a transaction if it matches + any of the postings. Also remember that postings inherit the tags of their parent transaction. nnoott:: before any of the above negates the match. Some of these can also be expressed as command-line options (eg depth:2 - is equivalent to --depth 2). Generally you can mix options and query - arguments, and the resulting query will be their intersection (perhaps + is equivalent to --depth 2). Generally you can mix options and query + arguments, and the resulting query will be their intersection (perhaps excluding the -p/--period option). CCOOMMMMAANNDDSS - hledger provides a number of subcommands; hledger with no arguments + hledger provides a number of subcommands; hledger with no arguments shows a list. If you install additional hledger-* packages, or if you put programs or - scripts named hledger-NAME in your PATH, these will also be listed as + scripts named hledger-NAME in your PATH, these will also be listed as 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 a command name (hledger inc), or one of the standard short aliases dis- played in the command list (hledger is). @@ -482,14 +486,14 @@ CCOOMMMMAANNDDSS ----ddrroopp==NN in flat mode: omit N leading account name parts - This command lists all account names that are in use (ie, all the - accounts which have at least one transaction posting to them). With + This command lists all account names that are in use (ie, all the + accounts which have at least one transaction posting to them). With query arguments, only matched account names are shown. - It shows a flat list by default. With --tree, it uses indentation to + It shows a flat list by default. With --tree, it uses indentation to show the account hierarchy. - In flat mode you can add --drop N to omit the first few account name + In flat mode you can add --drop N to omit the first few account name components. Examples: @@ -532,8 +536,8 @@ CCOOMMMMAANNDDSS aaccttiivviittyy Show an ascii barchart of posting counts per interval. - The activity command displays an ascii histogram showing transaction - counts by day, week, month or other reporting interval (by day is the + The activity command displays an ascii histogram showing transaction + counts by day, week, month or other reporting interval (by day is the default). With query arguments, it counts only matched transactions. $ hledger activity --quarterly @@ -546,24 +550,24 @@ CCOOMMMMAANNDDSS Prompt for transactions and add them to the journal. ----nnoo--nneeww--aaccccoouunnttss - don't allow creating new accounts; helps prevent typos when + don't allow creating new accounts; helps prevent typos when entering account names - Many hledger users edit their journals directly with a text editor, or - generate them from CSV. For more interactive data entry, there is the - add command, which prompts interactively on the console for new trans- - actions, and appends them to the journal file (if there are multiple + Many hledger users edit their journals directly with a text editor, or + generate them from CSV. For more interactive data entry, there is the + add command, which prompts interactively on the console for new trans- + actions, and appends them to the journal file (if there are multiple -f FILE options, the first file is used.) Existing transactions are not - changed. This is the only hledger command that writes to the journal + changed. This is the only hledger command that writes to the journal file. To use it, just run hledger add and follow the prompts. You can add as - many transactions as you like; when you are finished, enter . or press + many transactions as you like; when you are finished, enter . or press control-d or control-c to exit. Features: - +o add tries to provide useful defaults, using the most similar recent + +o add tries to provide useful defaults, using the most similar recent transaction (by description) as a template. +o You can also set the initial defaults with command line arguments. @@ -571,20 +575,20 @@ CCOOMMMMAANNDDSS +o Readline-style edit keys can be used during data entry. +o The tab key will auto-complete whenever possible - accounts, descrip- - tions, dates (yesterday, today, tomorrow). If the input area is + tions, dates (yesterday, today, tomorrow). If the input area is empty, it will insert the default value. - +o If the journal defines a default commodity, it will be added to any + +o If the journal defines a default commodity, it will be added to any bare numbers entered. +o A parenthesised transaction code may be entered following a date. +o Comments and tags may be entered following a description or amount. - +o If you make a mistake, enter < at any prompt to restart the transac- + +o If you make a mistake, enter < at any prompt to restart the transac- tion. - +o Input prompts are displayed in a different colour when the terminal + +o Input prompts are displayed in a different colour when the terminal supports it. Example (see the tutorial for a detailed explanation): @@ -656,7 +660,7 @@ CCOOMMMMAANNDDSS --OO FFMMTT ----oouuttppuutt--ffoorrmmaatt==FFMMTT select the output format. Supported formats: txt, csv. - The balance command displays accounts and balances. It is hledger's + The balance command displays accounts and balances. It is hledger's most featureful and most useful command. $ hledger balance @@ -673,24 +677,24 @@ CCOOMMMMAANNDDSS -------------------- 0 - More precisely, the balance command shows the _c_h_a_n_g_e to each account's + More precisely, the balance command shows the _c_h_a_n_g_e to each account's balance caused by all (matched) postings. In the common case where you - do not filter by date and your journal sets the correct opening bal- + do not filter by date and your journal sets the correct opening bal- ances, this is the same as the account's ending balance. - By default, accounts are displayed hierarchically, with subaccounts + By default, accounts are displayed hierarchically, with subaccounts indented below their parent. "Boring" accounts, which contain a single interesting subaccount and no balance of their own, are elided into the - following line for more compact output. (Use --no-elide to prevent + following line for more compact output. (Use --no-elide to prevent this.) - Each account's balance is the "inclusive" balance - it includes the + Each account's balance is the "inclusive" balance - it includes the balances of any subaccounts. - Accounts which have zero balance (and no non-zero subaccounts) are + Accounts which have zero balance (and no non-zero subaccounts) are omitted. Use -E/--empty to show them. - A final total is displayed by default; use -N/--no-total to suppress + A final total is displayed by default; use -N/--no-total to suppress it: $ hledger balance -p 2008/6 expenses --no-total @@ -700,9 +704,9 @@ CCOOMMMMAANNDDSS FFllaatt mmooddee To see a flat list of full account names instead of the default hierar- - chical display, use --flat. In this mode, accounts (unless + chical display, use --flat. In this mode, accounts (unless depth-clipped) show their "exclusive" balance, excluding any subaccount - balances. In this mode, you can also use --drop N to omit the first + balances. In this mode, you can also use --drop N to omit the first few account name components. $ hledger balance -p 2008/6 expenses -N --flat --drop 1 @@ -710,9 +714,9 @@ CCOOMMMMAANNDDSS $1 supplies DDeepptthh lliimmiitteedd bbaallaannccee rreeppoorrttss - With --depth N, balance shows accounts only to the specified depth. - This is very useful to show a complex charts of accounts in less - detail. In flat mode, balances from accounts below the depth limit + With --depth N, balance shows accounts only to the specified depth. + This is very useful to show a complex charts of accounts in less + detail. In flat mode, balances from accounts below the depth limit will be shown as part of a parent account at the depth limit. $ hledger balance -N --depth 1 @@ -722,12 +726,12 @@ CCOOMMMMAANNDDSS $1 liabilities MMuullttiiccoolluummnn bbaallaannccee rreeppoorrttss - With a reporting interval, multiple balance columns will be shown, one - for each report period. There are three types of multi-column balance + With a reporting interval, multiple balance columns will be shown, one + for each report period. There are three types of multi-column balance report, showing different information: 1. By default: each column shows the sum of postings in that period, ie - the account's change of balance in that period. This is useful eg + the account's change of balance in that period. This is useful eg for a monthly income statement: $ hledger balance --quarterly income expenses -E @@ -742,8 +746,8 @@ CCOOMMMMAANNDDSS -------------------++--------------------------------- || $-1 $1 0 0 - 2. With --cumulative: each column shows the ending balance for that - period, accumulating the changes across periods, starting from 0 at + 2. With --cumulative: each column shows the ending balance for that + period, accumulating the changes across periods, starting from 0 at the report start date: $ hledger balance --quarterly income expenses -E --cumulative @@ -759,8 +763,8 @@ CCOOMMMMAANNDDSS || $-1 0 0 0 3. With --historical/-H: each column shows the actual historical ending - balance for that period, accumulating the changes across periods, - starting from the actual balance at the report start date. This is + balance for that period, accumulating the changes across periods, + starting from the actual balance at the report start date. This is useful eg for a multi-period balance sheet, and when you are showing only the data after a certain start date: @@ -776,26 +780,26 @@ CCOOMMMMAANNDDSS ----------------------++------------------------------------- || 0 0 0 - Multi-column balance reports display accounts in flat mode by default; + Multi-column balance reports display accounts in flat mode by default; to see the hierarchy, use --tree. - With a reporting interval (like --quarterly above), the report - start/end dates will be adjusted if necessary so that they encompass + With a reporting interval (like --quarterly above), the report + start/end dates will be adjusted if necessary so that they encompass the displayed report periods. This is so that the first and last peri- ods will be "full" and comparable to the others. - The -E/--empty flag does two things in multicolumn balance reports: - first, the report will show all columns within the specified report - period (without -E, leading and trailing columns with all zeroes are - not shown). Second, all accounts which existed at the report start - date will be considered, not just the ones with activity during the + The -E/--empty flag does two things in multicolumn balance reports: + first, the report will show all columns within the specified report + period (without -E, leading and trailing columns with all zeroes are + not shown). Second, all accounts which existed at the report start + date will be considered, not just the ones with activity during the report period (use -E to include low-activity accounts which would oth- erwise would be omitted). The -T/--row-total flag adds an additional column showing the total for each row. - The -A/--average flag adds a column showing the average value in each + The -A/--average flag adds a column showing the average value in each row. Here's an example of all three: @@ -818,16 +822,16 @@ CCOOMMMMAANNDDSS MMaarrkkeett vvaalluuee The -V/--value flag converts all the reported amounts to their "current - market value" using their default market price. That is the latest - market price (P directive) found in the journal (or an included file), + market value" using their default market price. That is the latest + market price (P directive) found in the journal (or an included file), for the amount's commodity, dated on or before the report end date. Unlike Ledger, hledger's -V only uses the market prices recorded with P - directives, ignoring transaction prices recorded as part of posting + directives, ignoring transaction prices recorded as part of posting amounts (which -B/--cost uses). Using -B and -V together is allowed. CCuussttoomm bbaallaannccee oouuttppuutt - In simple (non-multi-column) balance reports, you can customise the + In simple (non-multi-column) balance reports, you can customise the output with --format FMT: $ hledger balance --format "%20(account) %12(total)" @@ -845,7 +849,7 @@ CCOOMMMMAANNDDSS 0 The FMT format string (plus a newline) specifies the formatting applied - to each account/balance pair. It may contain any suitable text, with + to each account/balance pair. It may contain any suitable text, with data fields interpolated like so: %[MIN][.MAX](FIELDNAME) @@ -856,14 +860,14 @@ CCOOMMMMAANNDDSS +o FIELDNAME must be enclosed in parentheses, and can be one of: - +o depth_spacer - a number of spaces equal to the account's depth, or + +o depth_spacer - a number of spaces equal to the account's depth, or if MIN is specified, MIN * depth spaces. +o account - the account's name +o total - the account's balance/posted total, right justified - Also, FMT can begin with an optional prefix to control how multi-com- + Also, FMT can begin with an optional prefix to control how multi-com- modity amounts are rendered: +o %_ - render on multiple lines, bottom-aligned (the default) @@ -872,7 +876,7 @@ CCOOMMMMAANNDDSS +o %, - render on one line, comma-separated - There are some quirks. Eg in one-line mode, %(depth_spacer) has no + There are some quirks. Eg in one-line mode, %(depth_spacer) has no effect, instead %(account) has indentation built in. Experimentation may be needed to get pleasing results. @@ -880,19 +884,19 @@ CCOOMMMMAANNDDSS +o %(total) - the account's total - +o %-20.20(account) - the account's name, left justified, padded to 20 + +o %-20.20(account) - the account's name, left justified, padded to 20 characters and clipped at 20 characters - +o %,%-50(account) %25(total) - account name padded to 50 characters, - total padded to 20 characters, with multiple commodities rendered on + +o %,%-50(account) %25(total) - account name padded to 50 characters, + total padded to 20 characters, with multiple commodities rendered on one line - +o %20(total) %2(depth_spacer)%-(account) - the default format for the + +o %20(total) %2(depth_spacer)%-(account) - the default format for the single-column balance report OOuuttppuutt ddeessttiinnaattiioonn - The balance, print, register and stats commands can write their output - to a destination other than the console. This is controlled by the + The balance, print, register and stats commands can write their output + to a destination other than the console. This is controlled by the -o/--output-file option. $ hledger balance -o - # write to stdout (the default) @@ -900,8 +904,8 @@ CCOOMMMMAANNDDSS CCSSVV oouuttppuutt The balance, print and register commands can write their output as CSV. - This is useful for exporting data to other applications, eg to make - charts in a spreadsheet. This is controlled by the -O/--output-format + This is useful for exporting data to other applications, eg to make + charts in a spreadsheet. This is controlled by the -O/--output-format option, or by specifying a .csv file extension with -o/--output-file. $ hledger balance -O csv # write CSV to stdout @@ -915,8 +919,8 @@ CCOOMMMMAANNDDSS ----ddrroopp==NN in flat mode: omit N leading account name parts - This command displays a simple balance sheet. It currently assumes - that you have top-level accounts named asset and liability (plural + This command displays a simple balance sheet. It currently assumes + that you have top-level accounts named asset and liability (plural forms also allowed.) $ hledger balancesheet @@ -946,9 +950,9 @@ CCOOMMMMAANNDDSS ----ddrroopp==NN in flat mode: omit N leading account name parts - This command displays a simple cashflow statement It shows the change - in all "cash" (ie, liquid assets) accounts for the period. It cur- - rently assumes that cash accounts are under a top-level account named + This command displays a simple cashflow statement It shows the change + in all "cash" (ie, liquid assets) accounts for the period. It cur- + rently assumes that cash accounts are under a top-level account named asset and do not contain receivable or A/R (plural forms also allowed.) $ hledger cashflow @@ -968,11 +972,11 @@ CCOOMMMMAANNDDSS hheellpp Show any of the hledger manuals. - The help command displays any of the main hledger man pages. (Unlike - hledger --help, which displays only the hledger man page.) Run it with - no arguments to list available topics (their names are shortened for - 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 + The help command displays any of the main hledger man pages. (Unlike + hledger --help, which displays only the hledger man page.) Run it with + no arguments to list available topics (their names are shortened for + 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 wish to pipe it into a pager. See also info and man. $ hledger help @@ -1001,8 +1005,8 @@ CCOOMMMMAANNDDSS ----ddrroopp==NN in flat mode: omit N leading account name parts - This command displays a simple income statement. It currently assumes - that you have top-level accounts named income (or revenue) and expense + This command displays a simple income statement. It currently assumes + that you have top-level accounts named income (or revenue) and expense (plural forms also allowed.) $ hledger incomestatement @@ -1029,30 +1033,30 @@ CCOOMMMMAANNDDSS iinnffoo Show any of the hledger manuals using info. - The info command displays any of the hledger reference manuals using - the info hypertextual documentation viewer. This can be a very effi- - cient way to browse large manuals. It requires the "info" program to + The info command displays any of the hledger reference manuals using + the info hypertextual documentation viewer. This can be a very effi- + cient way to browse large manuals. It requires the "info" 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). mmaann Show any of the hledger manuals using man. - The man command displays any of the hledger reference manuals using - man, the standard documentation viewer on unix systems. This will fit - the text to your terminal width, and probably invoke a pager automati- + The man command displays any of the hledger reference manuals using + man, the standard documentation viewer on unix systems. This will fit + the text to your terminal width, and probably invoke a pager automati- 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). pprriinntt Show transactions from the journal. --mm SSTTRR ----mmaattcchh==SSTTRR - show the transaction whose description is most similar to STR, + show the transaction whose description is most similar to STR, and is most recent --oo FFIILLEE[[..FFMMTT]] ----oouuttppuutt--ffiillee==FFIILLEE[[..FFMMTT]] @@ -1084,12 +1088,12 @@ CCOOMMMMAANNDDSS liabilities:debts $1 assets:bank:checking $-1 - The print command displays full transactions from the journal file, - tidily formatted and showing all amounts explicitly. The output of - print is always a valid hledger journal, but it does always not pre- + The print command displays full transactions from the journal file, + tidily formatted and showing all amounts explicitly. The output of + print is always a valid hledger journal, but it does always not pre- serve all original content exactly (eg directives). - hledger's print command also shows all unit prices in effect, or (with + hledger's print command also shows all unit prices in effect, or (with -B/--cost) shows cost amounts. The print command also supports output destination and CSV output. @@ -1101,14 +1105,14 @@ CCOOMMMMAANNDDSS include prior postings in the running total --AA ----aavveerraaggee - show a running average instead of the running total (implies + show a running average instead of the running total (implies --empty) --rr ----rreellaatteedd show postings' siblings instead --ww NN ----wwiiddtthh==NN - 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) --oo FFIILLEE[[..FFMMTT]] ----oouuttppuutt--ffiillee==FFIILLEE[[..FFMMTT]] @@ -1119,7 +1123,7 @@ CCOOMMMMAANNDDSS select the output format. Supported formats: txt, csv. 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: $ hledger register checking @@ -1128,8 +1132,8 @@ CCOOMMMMAANNDDSS 2008/06/02 save assets:bank:checking $-1 $1 2008/12/31 pay off assets:bank:checking $-1 0 - The --historical/-H flag adds the balance from any undisplayed prior - postings to the running total. This is useful when you want to see + The --historical/-H flag adds the balance from any undisplayed prior + postings to the running total. This is useful when you want to see only recent activity, with a historically accurate running balance: $ hledger register checking -b 2008/6 --historical @@ -1139,22 +1143,22 @@ CCOOMMMMAANNDDSS 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 - the whole report period). This flag implies --empty (see below). It + the whole report period). This flag implies --empty (see below). It works best when showing just one account and one commodity. - The --related/-r flag shows the _o_t_h_e_r postings in the transactions of + The --related/-r flag shows the _o_t_h_e_r postings in the transactions of 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: $ hledger register --monthly income 2008/01 income:salary $-1 $-1 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: $ hledger register --monthly income -E @@ -1171,7 +1175,7 @@ CCOOMMMMAANNDDSS 2008/11 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: $ hledger register --monthly assets --depth 1h @@ -1179,19 +1183,19 @@ CCOOMMMMAANNDDSS 2008/06 assets $-1 0 2008/12 assets $-1 $-1 - Note when using report intervals, if you specify start/end dates these - will be adjusted outward if necessary to contain a whole number of - intervals. This ensures that the first and last intervals are full + Note when using report intervals, if you specify start/end dates these + will be adjusted outward if necessary to contain a whole number of + intervals. This ensures that the first and last intervals are full length and comparable to the others in the report. CCuussttoomm rreeggiisstteerr oouuttppuutt - register uses the full terminal width by default, except on windows. - You can override this by setting the COLUMNS environment variable (not + register uses the full terminal width by default, except on windows. + You can override this by setting the COLUMNS environment variable (not a bash shell variable) or by using the --width/-w option. - The description and account columns normally share the space equally - (about half of (width - 40) each). You can adjust this by adding a - description width as part of --width's argument, comma-separated: + The description and account columns normally share the space equally + (about half of (width - 40) each). You can adjust this by adding a + description width as part of --width's argument, comma-separated: --width W,D . Here's a diagram: <--------------------------------- width (W) ----------------------------------> @@ -1207,7 +1211,7 @@ CCOOMMMMAANNDDSS $ hledger reg -w 100,40 # set overall width 100, description width 40 $ 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. ssttaattss @@ -1229,8 +1233,8 @@ CCOOMMMMAANNDDSS Accounts : 8 (depth 3) Commodities : 1 ($) - The stats command displays summary information for the whole journal, - or a matched part of it. With a reporting interval, it shows a report + The stats command displays summary information for the whole journal, + or a matched part of it. With a reporting interval, it shows a report for each report period. The stats command also supports -o/--output-file for controlling output @@ -1242,37 +1246,37 @@ CCOOMMMMAANNDDSS $ hledger test 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 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. AADDDD--OONN CCOOMMMMAANNDDSS - Add-on commands are executables in your PATH whose name starts with - hledger- and ends with any of these file extensions: none, - .hs,.lhs,.pl,.py,.rb,.rkt,.sh,.bat,.com,.exe. Also, an add-on's name + Add-on commands are executables in your PATH whose name starts with + hledger- and ends with any of these file extensions: none, + .hs,.lhs,.pl,.py,.rb,.rkt,.sh,.bat,.com,.exe. Also, an add-on's name may not be the same as any built-in command or alias. - hledger will detect these and include them in the command list and let - you invoke them with hledger ADDONCMD. However there are some limita- + hledger will detect these and include them in the command list and let + you invoke them with hledger ADDONCMD. However there are some limita- tions: +o Options appearing before ADDONCMD will be visible only to hledger and will not be passed to the add-on. Eg: hledger -h web shows hledger's usage, hledger web -h shows hledger-web's usage. - +o Options understood only by the add-on must go after a -- argument to - hide them from hledger, which would otherwise reject them. Eg: + +o Options understood only by the add-on must go after a -- argument to + hide them from hledger, which would otherwise reject them. Eg: hledger web -- --server. - Sometimes it may be more convenient to just run the add-on directly, + Sometimes it may be more convenient to just run the add-on directly, eg: hledger-web --server. - Add-ons which are written in haskell can take advantage of the - hledger-lib library for journal parsing, reporting, command-line + Add-ons which are written in haskell can take advantage of the + hledger-lib library for journal parsing, reporting, command-line options, etc. - Here are some hledger add-ons available from Hackage, the extra direc- + Here are some hledger add-ons available from Hackage, the extra direc- tory in the hledger source, or elsewhere: aappii @@ -1330,11 +1334,11 @@ AADDDD--OONN CCOOMMMMAANNDDSS WF:4303001832 -$6.00 [assets:business:bank:wf:bchecking:banking] $6.00 - ledger-autosync, which includes a hledger-autosync alias, downloads + ledger-autosync, which includes a hledger-autosync alias, downloads transactions from your bank(s) via OFX, and prints just the new ones as journal entries which you can add to your journal. It can also operate - on .OFX files which you've downloaded manually. It can be a nice - alternative to hledger's built-in CSV reader, especially if your bank + on .OFX files which you've downloaded manually. It can be a nice + alternative to hledger's built-in CSV reader, especially if your bank supports OFX download. ddiiffff @@ -1360,9 +1364,9 @@ AADDDD--OONN CCOOMMMMAANNDDSS 2015/02/02 (acct:two) $2 - hledger-diff compares two journal files. Given an account name, it - prints out the transactions affecting that account which are in one - journal file but not in the other. This can be useful for reconciling + hledger-diff compares two journal files. Given an account name, it + prints out the transactions affecting that account which are in one + journal file but not in the other. This can be useful for reconciling existing journals with bank statements. eeqquuiittyy @@ -1389,14 +1393,14 @@ AADDDD--OONN CCOOMMMMAANNDDSS equity:opening balances 0 This prints a journal entry which zeroes out the specified accounts (or - all accounts) with a transfer to/from "equity:closing balances" (like - Ledger's equity command). Also, it prints an similar entry with oppo- + all accounts) with a transfer to/from "equity:closing balances" (like + Ledger's equity command). Also, it prints an similar entry with oppo- site sign for restoring the balances from "equity:opening balances". These can be useful for ending one journal file and starting a new one, - respectively. By zeroing your asset and liability accounts at the end + respectively. By zeroing your asset and liability accounts at the end of a file and restoring them at the start of the next one, you will see - correct asset/liability balances whether you run hledger on just one + correct asset/liability balances whether you run hledger on just one file, or on several files concatenated with include. iinntteerreesstt @@ -1477,11 +1481,11 @@ AADDDD--OONN CCOOMMMMAANNDDSS Liabilities:Bank EUR 3700.00 hledger-interest computes interests for a given account. Using command - line flags, the program can be configured to use various schemes for - day-counting, such as act/act, 30/360, 30E/360, and 30/360isda. Fur- - thermore, it supports a (small) number of interest schemes, i.e. + line flags, the program can be configured to use various schemes for + day-counting, such as act/act, 30/360, 30E/360, and 30/360isda. Fur- + thermore, it supports a (small) number of interest schemes, i.e. annual interest with a fixed rate and the scheme mandated by the German - BGB288 (Basiszins f~A1/4r Verbrauchergesch~Aoxfte). See the package page + BGB288 (Basiszins f~A1/4r Verbrauchergesch~Aoxfte). See the package page for more. iirrrr @@ -1539,11 +1543,11 @@ AADDDD--OONN CCOOMMMMAANNDDSS 2011/04/01 - 2011/05/01: 32.24% 2011/05/01 - 2011/06/01: 95.92% - hledger-irr computes the internal rate of return, also known as the - effective interest rate, of a given investment. After specifying what - account holds the investment, and what account stores the gains (or - losses, or fees, or cost), it calculates the hypothetical annual rate - of fixed rate investment that would have provided the exact same cash + hledger-irr computes the internal rate of return, also known as the + effective interest rate, of a given investment. After specifying what + account holds the investment, and what account stores the gains (or + losses, or fees, or cost), it calculates the hypothetical annual rate + of fixed rate investment that would have provided the exact same cash flow. See the package page for more. pprriinntt--uunniiqquuee @@ -1564,8 +1568,8 @@ AADDDD--OONN CCOOMMMMAANNDDSS entries. hledger-rewrite.hs, in hledger's extra directory (compilation - optional), adds postings to existing transactions, optionally with an - amount based on the existing transaction's first amount. See the + optional), adds postings to existing transactions, optionally with an + amount based on the existing transaction's first amount. See the script for more details. $ hledger rewrite -- [QUERY] --add-posting "ACCT AMTEXPR" ... @@ -1580,26 +1584,26 @@ AADDDD--OONN CCOOMMMMAANNDDSS TTRROOUUBBLLEESSHHOOOOTTIINNGG RRuunn--ttiimmee pprroobblleemmss - Here are some issues you might encounter when you run hledger (and - remember you can also seek help from the IRC channel, mail list or bug + Here are some issues you might encounter when you run hledger (and + remember you can also seek help from the IRC channel, mail list or bug tracker): SSuucccceessssffuullllyy iinnssttaalllleedd,, bbuutt ""NNoo ccoommmmaanndd ''hhlleeddggeerr'' ffoouunndd"" stack and cabal install binaries into a special directory, which should - be added to your PATH environment variable. Eg on unix-like systems, + be added to your PATH environment variable. Eg on unix-like systems, that is ~/.local/bin and ~/.cabal/bin respectively. II sseett aa ccuussttoomm LLEEDDGGEERR__FFIILLEE,, bbuutt hhlleeddggeerr iiss ssttiillll uussiinngg tthhee ddeeffaauulltt ffiillee - LEDGER_FILE should be a real environment variable, not just a shell - variable. The command env | grep LEDGER_FILE should show it. You may + LEDGER_FILE should be a real environment variable, not just a shell + variable. The command env | grep LEDGER_FILE should show it. You may need to use export. Here's an explanation. - ""IIlllleeggaall bbyyttee sseeqquueennccee"" oorr ""IInnvvaalliidd oorr iinnccoommpplleettee mmuullttiibbyyttee oorr wwiiddee + ""IIlllleeggaall bbyyttee sseeqquueennccee"" oorr ""IInnvvaalliidd oorr iinnccoommpplleettee mmuullttiibbyyttee oorr wwiiddee cchhaarraacctteerr"" eerrrroorrss - In order to handle non-ascii letters and symbols (like ^A-L), hledger - needs an appropriate locale. This is usually configured system-wide; - you can also configure it temporarily. The locale may need to be one - that supports UTF-8, if you built hledger with GHC < 7.2 (or possibly + In order to handle non-ascii letters and symbols (like ^A-L), hledger + needs an appropriate locale. This is usually configured system-wide; + you can also configure it temporarily. The locale may need to be one + that supports UTF-8, if you built hledger with GHC < 7.2 (or possibly always, I'm not sure yet). Here's an example of setting the locale temporarily, on ubuntu @@ -1618,7 +1622,7 @@ TTRROOUUBBLLEESSHHOOOOTTIINNGG $ echo "export LANG=en_US.UTF-8" >>~/.bash_profile $ bash --login - If we preferred to use eg fr_FR.utf8, we might have to install that + If we preferred to use eg fr_FR.utf8, we might have to install that first: $ apt-get install language-pack-fr @@ -1639,43 +1643,45 @@ TTRROOUUBBLLEESSHHOOOOTTIINNGG KKnnoowwnn lliimmiittaattiioonnss CCoommmmaanndd lliinnee iinntteerrffaaccee - Add-on command options, unless they are also understood by the main - hledger executable, must be written after --, like this: + Add-on command options, unless they are also understood by the main + hledger executable, must be written after --, like this: hledger web -- --server DDiiffffeerreenncceess ffrroomm LLeeddggeerr - Not all of Ledger's journal file syntax is supported. See file format + Not all of Ledger's journal file syntax is supported. See file format differences. - hledger is slower than Ledger, and uses more memory, on large data + hledger is slower than Ledger, and uses more memory, on large data files. WWiinnddoowwss lliimmiittaattiioonnss - In a windows CMD window, non-ascii characters and colours are not sup- + In a windows CMD window, non-ascii characters and colours are not sup- ported. In a windows Cygwin/MSYS/Mintty window, the tab key is not supported in hledger add. EENNVVIIRROONNMMEENNTT - LLEEDDGGEERR__FFIILLEE sets the default journal file path. If not set, it is - ~/.hledger.journal. + CCOOLLUUMMNNSS The screen width used by the register command. Default: the + full terminal width. - CCOOLLUUMMNNSS sets the default width used by the register command (normally - the full terminal width). + LLEEDDGGEERR__FFIILLEE The journal file path when not specified with -f. Default: + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + nal). FFIILLEESS - Reads data from a hledger journal file ($LEDGER_FILE or - ~/.hledger.journal by default), or a CSV file plus associated CSV rules - file. + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps + C:/Users/USER/.hledger.journal). BBUUGGSS - The need to precede options with -- when invoked from hledger is awk- + The need to precede options with -- when invoked from hledger is awk- ward. - hledger can't render non-ascii characters when run from a Windows com- + hledger can't render non-ascii characters when run from a Windows com- mand prompt (up to Windows 7 at least). When input data contains non-ascii characters, a suitable system locale @@ -1685,7 +1691,7 @@ BBUUGGSS RREEPPOORRTTIINNGG BBUUGGSS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -1699,7 +1705,7 @@ CCOOPPYYRRIIGGHHTT SSEEEE AALLSSOO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1)