From a494e15d5586e3f4a2ae57472a89999ca253cbc0 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 29 Sep 2024 12:13:50 -1000 Subject: [PATCH] ;doc: update manuals --- hledger-ui/hledger-ui.1 | 4 + hledger-ui/hledger-ui.info | 60 +- hledger-ui/hledger-ui.txt | 4 + hledger-web/hledger-web.1 | 4 + hledger-web/hledger-web.info | 36 +- hledger-web/hledger-web.txt | 4 + hledger/hledger.1 | 95 ++- hledger/hledger.info | 1483 ++++++++++++++++++---------------- hledger/hledger.txt | 268 +++--- 9 files changed, 1094 insertions(+), 864 deletions(-) diff --git a/hledger-ui/hledger-ui.1 b/hledger-ui/hledger-ui.1 index e6e3a6c00..889fdb020 100644 --- a/hledger-ui/hledger-ui.1 +++ b/hledger-ui/hledger-ui.1 @@ -151,6 +151,10 @@ General help flags: .PP With hledger\-ui, the \f[CR]\-\-debug\f[R] option sends debug output to a \f[CR]hledger\-ui.log\f[R] file in the current directory. +.PP +If you use the bash shell, you can auto\-complete flags by pressing TAB +in the command line. +If this is not working see Install > Shell completions. .SH MOUSE In most modern terminals, you can navigate through the screens with a mouse or touchpad: diff --git a/hledger-ui/hledger-ui.info b/hledger-ui/hledger-ui.info index 00875e5c7..7304b53b3 100644 --- a/hledger-ui/hledger-ui.info +++ b/hledger-ui/hledger-ui.info @@ -162,6 +162,10 @@ General help flags: With hledger-ui, the '--debug' option sends debug output to a 'hledger-ui.log' file in the current directory. + If you use the bash shell, you can auto-complete flags by pressing +TAB in the command line. If this is not working see Install > Shell +completions. +  File: hledger-ui.info, Node: MOUSE, Next: KEYS, Prev: OPTIONS, Up: Top @@ -537,34 +541,34 @@ Tag Table: Node: Top221 Node: OPTIONS1872 Ref: #options1970 -Node: MOUSE8236 -Ref: #mouse8331 -Node: KEYS8568 -Ref: #keys8661 -Node: SCREENS13396 -Ref: #screens13500 -Node: Menu screen14136 -Ref: #menu-screen14257 -Node: Cash accounts screen14452 -Ref: #cash-accounts-screen14629 -Node: Balance sheet accounts screen14813 -Ref: #balance-sheet-accounts-screen15029 -Node: Income statement accounts screen15149 -Ref: #income-statement-accounts-screen15370 -Node: All accounts screen15534 -Ref: #all-accounts-screen15715 -Node: Register screen15897 -Ref: #register-screen16056 -Node: Transaction screen18340 -Ref: #transaction-screen18498 -Node: Error screen19915 -Ref: #error-screen20037 -Node: WATCH MODE20281 -Ref: #watch-mode20398 -Node: ENVIRONMENT21857 -Ref: #environment21973 -Node: BUGS22164 -Ref: #bugs22247 +Node: MOUSE8389 +Ref: #mouse8484 +Node: KEYS8721 +Ref: #keys8814 +Node: SCREENS13549 +Ref: #screens13653 +Node: Menu screen14289 +Ref: #menu-screen14410 +Node: Cash accounts screen14605 +Ref: #cash-accounts-screen14782 +Node: Balance sheet accounts screen14966 +Ref: #balance-sheet-accounts-screen15182 +Node: Income statement accounts screen15302 +Ref: #income-statement-accounts-screen15523 +Node: All accounts screen15687 +Ref: #all-accounts-screen15868 +Node: Register screen16050 +Ref: #register-screen16209 +Node: Transaction screen18493 +Ref: #transaction-screen18651 +Node: Error screen20068 +Ref: #error-screen20190 +Node: WATCH MODE20434 +Ref: #watch-mode20551 +Node: ENVIRONMENT22010 +Ref: #environment22126 +Node: BUGS22317 +Ref: #bugs22400  End Tag Table diff --git a/hledger-ui/hledger-ui.txt b/hledger-ui/hledger-ui.txt index 32bb78478..28070e874 100644 --- a/hledger-ui/hledger-ui.txt +++ b/hledger-ui/hledger-ui.txt @@ -140,6 +140,10 @@ OPTIONS With hledger-ui, the --debug option sends debug output to a hledger-ui.log file in the current directory. + If you use the bash shell, you can auto-complete flags by pressing TAB + in the command line. If this is not working see Install > Shell com- + pletions. + MOUSE In most modern terminals, you can navigate through the screens with a mouse or touchpad: diff --git a/hledger-web/hledger-web.1 b/hledger-web/hledger-web.1 index 6755fe208..491af36da 100644 --- a/hledger-web/hledger-web.1 +++ b/hledger-web/hledger-web.1 @@ -211,6 +211,10 @@ balance, which looks like zero when costs are hidden. Reporting options and/or query arguments can be used to set an initial query, which although not shown in the UI, will restrict the data shown (in addition to any search query entered in the UI). +.PP +If you use the bash shell, you can auto\-complete flags by pressing TAB +in the command line. +If this is not working see Install > Shell completions. .SH PERMISSIONS By default, hledger\-web allows anyone who can reach it to view the journal and to add new transactions, but not to change existing data. diff --git a/hledger-web/hledger-web.info b/hledger-web/hledger-web.info index a5ec138cd..4457e3d87 100644 --- a/hledger-web/hledger-web.info +++ b/hledger-web/hledger-web.info @@ -215,6 +215,10 @@ mixed-cost balance, which looks like zero when costs are hidden. initial query, which although not shown in the UI, will restrict the data shown (in addition to any search query entered in the UI). + If you use the bash shell, you can auto-complete flags by pressing +TAB in the command line. If this is not working see Install > Shell +completions. +  File: hledger-web.info, Node: PERMISSIONS, Next: EDITING UPLOADING DOWNLOADING, Prev: OPTIONS, Up: Top @@ -525,22 +529,22 @@ Tag Table: Node: Top223 Node: OPTIONS2569 Ref: #options2674 -Node: PERMISSIONS10948 -Ref: #permissions11087 -Node: EDITING UPLOADING DOWNLOADING12299 -Ref: #editing-uploading-downloading12480 -Node: RELOADING13314 -Ref: #reloading13448 -Node: JSON API13881 -Ref: #json-api13996 -Node: DEBUG OUTPUT19530 -Ref: #debug-output19655 -Node: Debug output19682 -Ref: #debug-output-119783 -Node: ENVIRONMENT20200 -Ref: #environment20319 -Node: BUGS20436 -Ref: #bugs20520 +Node: PERMISSIONS11101 +Ref: #permissions11240 +Node: EDITING UPLOADING DOWNLOADING12452 +Ref: #editing-uploading-downloading12633 +Node: RELOADING13467 +Ref: #reloading13601 +Node: JSON API14034 +Ref: #json-api14149 +Node: DEBUG OUTPUT19683 +Ref: #debug-output19808 +Node: Debug output19835 +Ref: #debug-output-119936 +Node: ENVIRONMENT20353 +Ref: #environment20472 +Node: BUGS20589 +Ref: #bugs20673  End Tag Table diff --git a/hledger-web/hledger-web.txt b/hledger-web/hledger-web.txt index 23212846f..4dc97ef99 100644 --- a/hledger-web/hledger-web.txt +++ b/hledger-web/hledger-web.txt @@ -192,6 +192,10 @@ OPTIONS query, which although not shown in the UI, will restrict the data shown (in addition to any search query entered in the UI). + If you use the bash shell, you can auto-complete flags by pressing TAB + in the command line. If this is not working see Install > Shell com- + pletions. + PERMISSIONS By default, hledger-web allows anyone who can reach it to view the journal and to add new transactions, but not to change existing data. diff --git a/hledger/hledger.1 b/hledger/hledger.1 index 12061639c..b7732b765 100644 --- a/hledger/hledger.1 +++ b/hledger/hledger.1 @@ -290,8 +290,9 @@ Most of these commands do not change the journal file; they just read it and output a report. A few commands assist with adding data and file management. .PP -To show the commands list, run \f[CR]hledger\f[R] with no arguments. -The commands are described in detail in PART 4: COMMANDS, below. +To show a summary of commands, run \f[CR]hledger\f[R] with no arguments. +You can see the same commands summary at the start of PART 4: COMMANDS +below. .PP To use a particular command, run \f[CR]hledger CMD [CMDOPTS] [CMDARGS]\f[R], @@ -748,8 +749,6 @@ Here\[aq]s a small example: To use a config file, specify it with the \f[CR]\-\-conf\f[R] option. Its options will be inserted near the start of your command line (so you can override them if needed). -Or, you can add a \f[CR]hledger \-\-conf\f[R] shebang line to a config -file and execute it like a script. .PP Or, you can set up an automatic config file that is used whenever you run hledger. @@ -769,12 +768,14 @@ To inspect the processing of config files, use \f[CR]\-\-debug\f[R] or Here is another example config file you could start with: https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample .PP +Tips: +.PP Automatic config files are convenient, but have a cost: it\[aq]s easy to change a report\[aq]s behaviour, or break scripts/applications which use hledger, in unintended ways that will surprise you later. They change the nature of hledger somewhat, making it less transparent and predictable. -If you decide to use one, here are some tips: +If you decide to use one: .IP \[bu] 2 Be conservative about what you put in it. Try to consider the effect on all your reports. @@ -785,8 +786,38 @@ Whenever a hledger command does not work as expected, try it again with If that helps, you can run it with \f[CR]\-\-debug\f[R] to see how a config file affected it. .PP -This feature has been added in hledger 1.40 and is considered +On unix machines, you can add a shebang line at the top of a config +file, set executable permission on the file, and use it like a script. +Eg (some operating systems need the \f[CR]\-S\f[R], some don\[aq]t): +.IP +.EX +#!/usr/bin/env \-S hledger \-\-conf +.EE +.PP +You can put not only options, but also arguments in a config file. +This is probably more useful in special\-purpose config files, not an +automatic one. +.PP +There\[aq]s an exception to this: a config file can\[aq]t provide the +command argument, currently (#2231). +If you need that, you can do it in the shebang line instead. +Eg: +.IP +.EX +#!/usr/bin/env \-S hledger balance \-\-conf +.EE +.PP +The config file feature has been added in hledger 1.40 and is considered \f[I]experimental\f[R]. +.SS Shell completions +If you use the bash shell, you can optionally set up context\-sensitive +autocompletions when you press TAB in a hledger command line. +At a bash shell prompt, try pressing \f[CR]hledger\f[R] +(should list all hledger commands) or +\f[CR]hledger reg acct:\f[R] (should list your top\-level +account names). +If completions aren\[aq]t working, or for more details, see Install > +Shell completions. .SH Output .SS Output destination hledger commands send their output to the terminal by default. @@ -4205,6 +4236,9 @@ in the code. A comment starting with \f[CR]\[rs]n\f[R] will begin on a new line. .PP Comments can contain tags, as usual. +.PP +Posting comments can also contain a posting date. +A secondary date, or a year\-less date, will be ignored. .SS account field Assigning to \f[CR]accountN\f[R], where N is 1 to 99, sets the account name of the Nth posting, and causes that posting to be generated. @@ -5467,6 +5501,11 @@ And from the first date line onward, Emacs org mode heading prefixes at the start of lines (one or more \f[CR]*\f[R]\[aq]s followed by a space) will be ignored. This means the time log can also be a org outline. +.PP +Timedot files don\[aq]t support directives like journal files. +So a common pattern is to have a main journal file (eg +\f[CR]time.journal\f[R]) that contains any needed directives, and then +includes the timedot file (\f[CR]include time.timedot\f[R]). .SS Timedot examples Numbers: .IP @@ -9089,6 +9128,7 @@ Flags: balance value minus cost basis) \-\-budget show sum of posting amounts compared to budget goals defined by periodic transactions + \-\-count show the count of postings \-\-change accumulate amounts from column start to column end (in multicolumn reports) \-\-cumulative accumulate amounts from report start (specified @@ -9120,6 +9160,9 @@ Flags: \[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]tall\[aq] : each commodity on a new line \[aq]bare\[aq] : bare numbers, symbols in a column + \-\-base\-url=URLPREFIX in html output, generate hyperlinks to + hledger\-web, with this prefix. (Usually the base + url shown by hledger\-web; can also be relative.) \-O \-\-output\-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. \-o \-\-output\-file=FILE write output to FILE. A file extension matching @@ -9189,6 +9232,7 @@ Flags: balance value minus cost basis) \-\-budget show sum of posting amounts compared to budget goals defined by periodic transactions + \-\-count show the count of postings \-\-change accumulate amounts from column start to column end (in multicolumn reports) \-\-cumulative accumulate amounts from report start (specified @@ -9220,6 +9264,9 @@ Flags: \[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]tall\[aq] : each commodity on a new line \[aq]bare\[aq] : bare numbers, symbols in a column + \-\-base\-url=URLPREFIX in html output, generate hyperlinks to + hledger\-web, with this prefix. (Usually the base + url shown by hledger\-web; can also be relative.) \-O \-\-output\-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. \-o \-\-output\-file=FILE write output to FILE. A file extension matching @@ -9297,6 +9344,7 @@ Flags: balance value minus cost basis) \-\-budget show sum of posting amounts compared to budget goals defined by periodic transactions + \-\-count show the count of postings \-\-change accumulate amounts from column start to column end (in multicolumn reports) (default) \-\-cumulative accumulate amounts from report start (specified @@ -9327,6 +9375,9 @@ Flags: \[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]tall\[aq] : each commodity on a new line \[aq]bare\[aq] : bare numbers, symbols in a column + \-\-base\-url=URLPREFIX in html output, generate hyperlinks to + hledger\-web, with this prefix. (Usually the base + url shown by hledger\-web; can also be relative.) \-O \-\-output\-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. \-o \-\-output\-file=FILE write output to FILE. A file extension matching @@ -9394,6 +9445,7 @@ Flags: balance value minus cost basis) \-\-budget show sum of posting amounts compared to budget goals defined by periodic transactions + \-\-count show the count of postings \-\-change accumulate amounts from column start to column end (in multicolumn reports) (default) \-\-cumulative accumulate amounts from report start (specified @@ -9424,6 +9476,9 @@ Flags: \[aq]wide[,WIDTH]\[aq]: all commodities on one line \[aq]tall\[aq] : each commodity on a new line \[aq]bare\[aq] : bare numbers, symbols in a column + \-\-base\-url=URLPREFIX in html output, generate hyperlinks to + hledger\-web, with this prefix. (Usually the base + url shown by hledger\-web; can also be relative.) \-O \-\-output\-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. \-o \-\-output\-file=FILE write output to FILE. A file extension matching @@ -9488,6 +9543,11 @@ performance, unrealised capital gains, etc. .EX Flags: \-\-sum show sum of posting amounts (default) + \-\-valuechange show total change of value of period\-end + historical balances (caused by deposits, + withdrawals, market price fluctuations) + \-\-gain show unrealised capital gain/loss (historical + balance value minus cost basis) \-\-budget[=DESCPAT] show sum of posting amounts together with budget goals defined by periodic transactions. With a DESCPAT argument (must be @@ -9495,11 +9555,6 @@ Flags: use only periodic transactions with matching description (case insensitive substring match). - \-\-valuechange show total change of value of period\-end - historical balances (caused by deposits, - withdrawals, market price fluctuations) - \-\-gain show unrealised capital gain/loss (historical - balance value minus cost basis) \-\-count show the count of postings \-\-change accumulate amounts from column start to column end (in multicolumn reports, default) @@ -9517,7 +9572,6 @@ Flags: with \-E) \-A \-\-average show a row average column (in multicolumn reports) - \-r \-\-related show postings\[aq] siblings instead \-T \-\-row\-total show a row total column (in multicolumn reports) \-\-summary\-only display only row summaries (e.g. row total, average) (in multicolumn reports) @@ -9530,14 +9584,18 @@ Flags: total, or by row average if that is displayed. \-% \-\-percent express values in percentage of each column\[aq]s total + \-r \-\-related show the other accounts transacted with, instead \-\-invert display all amounts with reversed sign - \-\-transpose transpose rows and columns + \-\-transpose switch rows and columns (use vertical time axis) \-\-layout=ARG how to lay out multi\-commodity amounts and the overall table: \[aq]wide[,WIDTH]\[aq]: commodities on one line \[aq]tall\[aq] : commodities on separate lines \[aq]bare\[aq] : commodity symbols in one column \[aq]tidy\[aq] : every attribute in its own column + \-\-base\-url=URLPREFIX in html output, generate links to hledger\-web, + with this prefix. (Usually the base url shown by + hledger\-web; can also be relative.) \-O \-\-output\-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json, fods. \-o \-\-output\-file=FILE write output to FILE. A file extension matching @@ -9890,6 +9948,17 @@ each commodity: $ hledger bal \-% cur:\[rs]\[rs]$ $ hledger bal \-% cur:€ .EE +.SS Hyperlinks +The HTML and FODS output formats can generate hyperlinks to a +\f[CR]hledger\-web\f[R] register view for each account and period. +E.g. +if your \f[CR]hledger\-web\f[R] server is reachable at +\f[CR]http://localhost:5000\f[R] then you might run the +\f[CR]balance\f[R] command with the extra option +\f[CR]\-\-base\-url=http://localhost:5000\f[R]. +You can also produce relative links, like +\f[CR]\-\-base\-url=\[dq]some/path\[dq]\f[R] or +\f[CR]\-\-base\-url=\[dq]\[dq]\f[R].) .SS Multi\-period balance report With a report interval (set by the \f[CR]\-D/\-\-daily\f[R], \f[CR]\-W/\-\-weekly\f[R], \f[CR]\-M/\-\-monthly\f[R], diff --git a/hledger/hledger.info b/hledger/hledger.info index 97a393eb9..c7679f837 100644 --- a/hledger/hledger.info +++ b/hledger/hledger.info @@ -301,8 +301,9 @@ these commands do not change the journal file; they just read it and output a report. A few commands assist with adding data and file management. - To show the commands list, run 'hledger' with no arguments. The -commands are described in detail in PART 4: COMMANDS, below. + To show a summary of commands, run 'hledger' with no arguments. You +can see the same commands summary at the start of PART 4: COMMANDS +below. To use a particular command, run 'hledger CMD [CMDOPTS] [CMDARGS]', @@ -469,6 +470,7 @@ to skip these until you need them. * Regular expressions:: * Argument files:: * Config files:: +* Shell completions::  File: hledger.info, Node: Special characters, Next: Unicode characters, Up: Options @@ -740,7 +742,7 @@ command prompt.) Argument files are now superseded by..  -File: hledger.info, Node: Config files, Prev: Argument files, Up: Options +File: hledger.info, Node: Config files, Next: Shell completions, Prev: Argument files, Up: Options 4.5 Config files ================ @@ -759,8 +761,7 @@ Here's a small example: To use a config file, specify it with the '--conf' option. Its options will be inserted near the start of your command line (so you can -override them if needed). Or, you can add a 'hledger --conf' shebang -line to a config file and execute it like a script. +override them if needed). Or, you can set up an automatic config file that is used whenever you run hledger. This can be 'hledger.conf' in the current directory or @@ -776,11 +777,13 @@ To inspect the processing of config files, use '--debug' or '--debug=8'. Here is another example config file you could start with: https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample + Tips: + Automatic config files are convenient, but have a cost: it's easy to change a report's behaviour, or break scripts/applications which use hledger, in unintended ways that will surprise you later. They change the nature of hledger somewhat, making it less transparent and -predictable. If you decide to use one, here are some tips: +predictable. If you decide to use one: * Be conservative about what you put in it. Try to consider the effect on all your reports. @@ -789,8 +792,37 @@ predictable. If you decide to use one, here are some tips: * If that helps, you can run it with '--debug' to see how a config file affected it. - This feature has been added in hledger 1.40 and is considered -_experimental_. + On unix machines, you can add a shebang line at the top of a config +file, set executable permission on the file, and use it like a script. +Eg (some operating systems need the '-S', some don't): + +#!/usr/bin/env -S hledger --conf + + You can put not only options, but also arguments in a config file. +This is probably more useful in special-purpose config files, not an +automatic one. + + There's an exception to this: a config file can't provide the command +argument, currently (#2231). If you need that, you can do it in the +shebang line instead. Eg: + +#!/usr/bin/env -S hledger balance --conf + + The config file feature has been added in hledger 1.40 and is +considered _experimental_. + + +File: hledger.info, Node: Shell completions, Prev: Config files, Up: Options + +4.6 Shell completions +===================== + +If you use the bash shell, you can optionally set up context-sensitive +autocompletions when you press TAB in a hledger command line. At a bash +shell prompt, try pressing 'hledger' (should list all +hledger commands) or 'hledger reg acct:' (should list your +top-level account names). If completions aren't working, or for more +details, see Install > Shell completions.  File: hledger.info, Node: Output, Next: Environment, Prev: Options, Up: Top @@ -4172,6 +4204,9 @@ code. A comment starting with '\n' will begin on a new line. Comments can contain tags, as usual. + Posting comments can also contain a posting date. A secondary date, +or a year-less date, will be ignored. +  File: hledger.info, Node: account field, Next: amount field, Prev: comment field, Up: Field names @@ -5424,6 +5459,11 @@ notes in the same file: followed by a space) will be ignored. This means the time log can also be a org outline. + Timedot files don't support directives like journal files. So a +common pattern is to have a main journal file (eg 'time.journal') that +contains any needed directives, and then includes the timedot file +('include time.timedot'). + * Menu: * Timedot examples:: @@ -8760,6 +8800,7 @@ Flags: balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) --cumulative accumulate amounts from report start (specified @@ -8791,6 +8832,9 @@ Flags: 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -8858,6 +8902,7 @@ Flags: balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) --cumulative accumulate amounts from report start (specified @@ -8889,6 +8934,9 @@ Flags: 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -8964,6 +9012,7 @@ Flags: balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) (default) --cumulative accumulate amounts from report start (specified @@ -8994,6 +9043,9 @@ Flags: 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -9058,6 +9110,7 @@ Flags: balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) (default) --cumulative accumulate amounts from report start (specified @@ -9088,6 +9141,9 @@ Flags: 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -9159,6 +9215,11 @@ balances, budget performance, unrealised capital gains, etc. Flags: --sum show sum of posting amounts (default) + --valuechange show total change of value of period-end + historical balances (caused by deposits, + withdrawals, market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) --budget[=DESCPAT] show sum of posting amounts together with budget goals defined by periodic transactions. With a DESCPAT argument (must be @@ -9166,11 +9227,6 @@ Flags: use only periodic transactions with matching description (case insensitive substring match). - --valuechange show total change of value of period-end - historical balances (caused by deposits, - withdrawals, market price fluctuations) - --gain show unrealised capital gain/loss (historical - balance value minus cost basis) --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports, default) @@ -9188,7 +9244,6 @@ Flags: with -E) -A --average show a row average column (in multicolumn reports) - -r --related show postings' siblings instead -T --row-total show a row total column (in multicolumn reports) --summary-only display only row summaries (e.g. row total, average) (in multicolumn reports) @@ -9201,14 +9256,18 @@ Flags: total, or by row average if that is displayed. -% --percent express values in percentage of each column's total + -r --related show the other accounts transacted with, instead --invert display all amounts with reversed sign - --transpose transpose rows and columns + --transpose switch rows and columns (use vertical time axis) --layout=ARG how to lay out multi-commodity amounts and the overall table: 'wide[,WIDTH]': commodities on one line 'tall' : commodities on separate lines 'bare' : commodity symbols in one column 'tidy' : every attribute in its own column + --base-url=URLPREFIX in html output, generate links to hledger-web, + with this prefix. (Usually the base url shown by + hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json, fods. -o --output-file=FILE write output to FILE. A file extension matching @@ -9236,6 +9295,7 @@ more control, then use 'balance'. * Showing declared accounts:: * Sorting by amount:: * Percentages:: +* Hyperlinks:: * Multi-period balance report:: * Balance change end balance:: * Balance report types:: @@ -9550,7 +9610,7 @@ commodity, it is treated as 0). which flip the sign automatically. Eg: 'hledger incomestatement -MAS').  -File: hledger.info, Node: Percentages, Next: Multi-period balance report, Prev: Sorting by amount, Up: balance +File: hledger.info, Node: Percentages, Next: Hyperlinks, Prev: Sorting by amount, Up: balance 29.1.10 Percentages ------------------- @@ -9573,9 +9633,22 @@ $ hledger bal -% cur:\\$ $ hledger bal -% cur:€  -File: hledger.info, Node: Multi-period balance report, Next: Balance change end balance, Prev: Percentages, Up: balance +File: hledger.info, Node: Hyperlinks, Next: Multi-period balance report, Prev: Percentages, Up: balance -29.1.11 Multi-period balance report +29.1.11 Hyperlinks +------------------ + +The HTML and FODS output formats can generate hyperlinks to a +'hledger-web' register view for each account and period. E.g. if your +'hledger-web' server is reachable at 'http://localhost:5000' then you +might run the 'balance' command with the extra option +'--base-url=http://localhost:5000'. You can also produce relative +links, like '--base-url="some/path"' or '--base-url=""'.) + + +File: hledger.info, Node: Multi-period balance report, Next: Balance change end balance, Prev: Hyperlinks, Up: balance + +29.1.12 Multi-period balance report ----------------------------------- With a report interval (set by the '-D/--daily', '-W/--weekly', @@ -9635,7 +9708,7 @@ viewing in the terminal. Here are some ways to handle that:  File: hledger.info, Node: Balance change end balance, Next: Balance report types, Prev: Multi-period balance report, Up: balance -29.1.12 Balance change, end balance +29.1.13 Balance change, end balance ----------------------------------- It's important to be clear on the meaning of the numbers shown in @@ -9672,7 +9745,7 @@ historical end balances:  File: hledger.info, Node: Balance report types, Next: Budget report, Prev: Balance change end balance, Up: balance -29.1.13 Balance report types +29.1.14 Balance report types ---------------------------- The balance command is quite flexible; here is the full detail on how to @@ -9695,7 +9768,7 @@ experimentation to get familiar with all the report modes.  File: hledger.info, Node: Calculation type, Next: Accumulation type, Up: Balance report types -29.1.13.1 Calculation type +29.1.14.1 Calculation type .......................... The basic calculation to perform for each table cell. It is one of: @@ -9713,7 +9786,7 @@ The basic calculation to perform for each table cell. It is one of:  File: hledger.info, Node: Accumulation type, Next: Valuation type, Prev: Calculation type, Up: Balance report types -29.1.13.2 Accumulation type +29.1.14.2 Accumulation type ........................... How amounts should accumulate across a report's subperiods/columns. @@ -9739,7 +9812,7 @@ each cell's calculation. It is one of:  File: hledger.info, Node: Valuation type, Next: Combining balance report types, Prev: Accumulation type, Up: Balance report types -29.1.13.3 Valuation type +29.1.14.3 Valuation type ........................ Which kind of value or cost conversion should be applied, if any, before @@ -9770,7 +9843,7 @@ displaying the report. It is one of:  File: hledger.info, Node: Combining balance report types, Prev: Valuation type, Up: Balance report types -29.1.13.4 Combining balance report types +29.1.14.4 Combining balance report types ........................................ Most combinations of these options should produce reasonable reports, @@ -9809,7 +9882,7 @@ Accumulation:v YYYY-MM-DD  File: hledger.info, Node: Budget report, Next: Balance report layout, Prev: Balance report types, Up: balance -29.1.14 Budget report +29.1.15 Budget report --------------------- The '--budget' report type is like a regular balance report, but with @@ -9880,7 +9953,7 @@ https://plaintextaccounting.org/Budgeting has more on this topic.  File: hledger.info, Node: Using the budget report, Next: Budget date surprises, Up: Budget report -29.1.14.1 Using the budget report +29.1.15.1 Using the budget report ................................. Historically this report has been confusing and fragile. hledger's @@ -9936,7 +10009,7 @@ troubleshooting.  File: hledger.info, Node: Budget date surprises, Next: Selecting budget goals, Prev: Using the budget report, Up: Budget report -29.1.14.2 Budget date surprises +29.1.15.2 Budget date surprises ............................... With small data, or when starting out, some of the generated budget goal @@ -9975,7 +10048,7 @@ the trick.  File: hledger.info, Node: Selecting budget goals, Next: Budgeting vs forecasting, Prev: Budget date surprises, Up: Budget report -29.1.14.3 Selecting budget goals +29.1.15.3 Selecting budget goals ................................ By default, the budget report uses all available periodic transaction @@ -9995,7 +10068,7 @@ defined in your journal.  File: hledger.info, Node: Budgeting vs forecasting, Prev: Selecting budget goals, Up: Budget report -29.1.14.4 Budgeting vs forecasting +29.1.15.4 Budgeting vs forecasting .................................. '--forecast' and '--budget' both use the periodic transaction rules in @@ -10027,7 +10100,7 @@ uses all periodic rules uses all periodic rules; or  File: hledger.info, Node: Balance report layout, Next: Some useful balance reports, Prev: Budget report, Up: balance -29.1.15 Balance report layout +29.1.16 Balance report layout ----------------------------- The '--layout' option affects how balance reports show multi-commodity @@ -10065,7 +10138,7 @@ tidy Y  File: hledger.info, Node: Wide layout, Next: Tall layout, Up: Balance report layout -29.1.15.1 Wide layout +29.1.16.1 Wide layout ..................... With many commodities, reports can be very wide: @@ -10093,7 +10166,7 @@ Balance changes in 2012-01-01..2014-12-31:  File: hledger.info, Node: Tall layout, Next: Bare layout, Prev: Wide layout, Up: Balance report layout -29.1.15.2 Tall layout +29.1.16.2 Tall layout ..................... Each commodity gets a new line (may be different in each column), and @@ -10119,7 +10192,7 @@ Balance changes in 2012-01-01..2014-12-31:  File: hledger.info, Node: Bare layout, Next: Tidy layout, Prev: Tall layout, Up: Balance report layout -29.1.15.3 Bare layout +29.1.16.3 Bare layout ..................... Commodity symbols are kept in one column, each commodity has its own @@ -10166,7 +10239,7 @@ commodity-less, usually). This can break 'hledger-bar' confusingly  File: hledger.info, Node: Tidy layout, Prev: Bare layout, Up: Balance report layout -29.1.15.4 Tidy layout +29.1.16.4 Tidy layout ..................... This produces normalised "tidy data" (see @@ -10196,7 +10269,7 @@ $ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -Y -O csv --layo  File: hledger.info, Node: Some useful balance reports, Prev: Balance report layout, Up: balance -29.1.16 Some useful balance reports +29.1.17 Some useful balance reports ----------------------------------- Some frequently used 'balance' options/reports are: @@ -11718,674 +11791,678 @@ Node: Strict mode9124 Ref: #strict-mode9234 Node: Commands9958 Ref: #commands10060 -Node: Add-on commands11127 -Ref: #add-on-commands11229 -Node: Options12345 -Ref: #options12446 -Node: Special characters18740 -Ref: #special-characters18877 -Node: Single escaping shell metacharacters19040 -Ref: #single-escaping-shell-metacharacters19281 -Node: Double escaping regular expression metacharacters19884 -Ref: #double-escaping-regular-expression-metacharacters20195 -Node: Triple escaping for add-on commands20721 -Ref: #triple-escaping-for-add-on-commands20981 -Node: Less escaping21625 -Ref: #less-escaping21779 -Node: Unicode characters22103 -Ref: #unicode-characters22268 -Node: Regular expressions23767 -Ref: #regular-expressions23930 -Node: hledger's regular expressions27026 -Ref: #hledgers-regular-expressions27185 -Node: Argument files28571 -Ref: #argument-files28718 -Node: Config files29224 -Ref: #config-files29339 -Node: Output31441 -Ref: #output31543 -Node: Output destination31670 -Ref: #output-destination31801 -Node: Output format32226 -Ref: #output-format32372 -Node: CSV output33857 -Ref: #csv-output33973 -Node: HTML output34076 -Ref: #html-output34214 -Node: JSON output34308 -Ref: #json-output34446 -Node: SQL output35431 -Ref: #sql-output35547 -Node: Commodity styles36282 -Ref: #commodity-styles36422 -Node: Colour37160 -Ref: #colour37278 -Node: Box-drawing37682 -Ref: #box-drawing37800 -Node: Paging38084 -Ref: #paging38198 -Node: Debug output39151 -Ref: #debug-output39257 -Node: Environment39920 -Ref: #environment40044 -Node: PART 2 DATA FORMATS40611 -Ref: #part-2-data-formats40754 -Node: Journal40754 -Ref: #journal40863 -Node: Journal cheatsheet43232 -Ref: #journal-cheatsheet43359 -Node: Comments49446 -Ref: #comments49574 -Node: Transactions50390 -Ref: #transactions50513 -Node: Dates51527 -Ref: #dates51634 -Node: Simple dates51679 -Ref: #simple-dates51795 -Node: Posting dates52295 -Ref: #posting-dates52413 -Node: Status53382 -Ref: #status53483 -Node: Code55148 -Ref: #code55251 -Node: Description55483 -Ref: #description55614 -Node: Payee and note56170 -Ref: #payee-and-note56276 -Node: Transaction comments57261 -Ref: #transaction-comments57414 -Node: Postings57777 -Ref: #postings57908 -Node: Debits and credits58940 -Ref: #debits-and-credits59087 -Node: The two space delimiter59550 -Ref: #the-two-space-delimiter59707 -Node: Account names60115 -Ref: #account-names60245 -Node: Amounts61919 -Ref: #amounts62047 -Node: Decimal marks62948 -Ref: #decimal-marks63075 -Node: Digit group marks64052 -Ref: #digit-group-marks64205 -Node: Commodity64687 -Ref: #commodity64816 -Node: Costs65804 -Ref: #costs65899 -Node: Balance assertions68056 -Ref: #balance-assertions68209 -Node: Assertions and ordering69293 -Ref: #assertions-and-ordering69482 -Node: Assertions and multiple included files70021 -Ref: #assertions-and-multiple-included-files70281 -Node: Assertions and multiple -f files70781 -Ref: #assertions-and-multiple--f-files71026 -Node: Assertions and costs71423 -Ref: #assertions-and-costs71632 -Node: Assertions and commodities72073 -Ref: #assertions-and-commodities72288 -Node: Assertions and subaccounts73732 -Ref: #assertions-and-subaccounts73958 -Node: Assertions and virtual postings74402 -Ref: #assertions-and-virtual-postings74640 -Node: Assertions and auto postings74772 -Ref: #assertions-and-auto-postings75002 -Node: Assertions and precision75647 -Ref: #assertions-and-precision75829 -Node: Posting comments76096 -Ref: #posting-comments76259 -Node: Transaction balancing76636 -Ref: #transaction-balancing76795 -Node: Tags78638 -Ref: #tags78757 -Node: Tag names80100 -Ref: #tag-names80207 -Node: Special tags80595 -Ref: #special-tags80727 -Node: Tag values82240 -Ref: #tag-values82350 -Node: Directives83222 -Ref: #directives83349 -Node: Directives and multiple files84679 -Ref: #directives-and-multiple-files84857 -Node: Directive effects85624 -Ref: #directive-effects85778 -Node: account directive88780 -Ref: #account-directive88936 -Node: Account comments90230 -Ref: #account-comments90381 -Node: Account error checking90889 -Ref: #account-error-checking91082 -Node: Account display order92271 -Ref: #account-display-order92459 -Node: Account types93469 -Ref: #account-types93610 -Node: alias directive97243 -Ref: #alias-directive97404 -Node: Basic aliases98454 -Ref: #basic-aliases98585 -Node: Regex aliases99329 -Ref: #regex-aliases99486 -Node: Combining aliases100376 -Ref: #combining-aliases100554 -Node: Aliases and multiple files101830 -Ref: #aliases-and-multiple-files102034 -Node: end aliases directive102613 -Ref: #end-aliases-directive102832 -Node: Aliases can generate bad account names102981 -Ref: #aliases-can-generate-bad-account-names103229 -Node: Aliases and account types103814 -Ref: #aliases-and-account-types104006 -Node: commodity directive104702 -Ref: #commodity-directive104876 -Node: Commodity directive syntax106289 -Ref: #commodity-directive-syntax106474 -Node: Commodity error checking107925 -Ref: #commodity-error-checking108106 -Node: decimal-mark directive108400 -Ref: #decimal-mark-directive108582 -Node: include directive108979 -Ref: #include-directive109143 -Node: P directive110055 -Ref: #p-directive110200 -Node: payee directive111089 -Ref: #payee-directive111238 -Node: tag directive111711 -Ref: #tag-directive111866 -Node: Periodic transactions112323 -Ref: #periodic-transactions112488 -Node: Periodic rule syntax114477 -Ref: #periodic-rule-syntax114655 -Node: Periodic rules and relative dates115300 -Ref: #periodic-rules-and-relative-dates115566 -Node: Two spaces between period expression and description!116077 -Ref: #two-spaces-between-period-expression-and-description116354 -Node: Auto postings117038 -Ref: #auto-postings117186 -Node: Auto postings and multiple files120198 -Ref: #auto-postings-and-multiple-files120394 -Node: Auto postings and dates120603 -Ref: #auto-postings-and-dates120869 -Node: Auto postings and transaction balancing / inferred amounts / balance assertions121044 -Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions121387 -Node: Auto posting tags121890 -Ref: #auto-posting-tags122149 -Node: Auto postings on forecast transactions only122785 -Ref: #auto-postings-on-forecast-transactions-only123008 -Node: Other syntax123255 -Ref: #other-syntax123371 -Node: Balance assignments124027 -Ref: #balance-assignments124183 -Node: Balance assignments and costs125555 -Ref: #balance-assignments-and-costs125767 -Node: Balance assignments and multiple files125977 -Ref: #balance-assignments-and-multiple-files126207 -Node: Bracketed posting dates126400 -Ref: #bracketed-posting-dates126584 -Node: D directive127098 -Ref: #d-directive127266 -Node: apply account directive128871 -Ref: #apply-account-directive129051 -Node: Y directive129738 -Ref: #y-directive129898 -Node: Secondary dates130726 -Ref: #secondary-dates130880 -Node: Star comments132211 -Ref: #star-comments132371 -Node: Valuation expressions132903 -Ref: #valuation-expressions133080 -Node: Virtual postings133202 -Ref: #virtual-postings133379 -Node: Other Ledger directives134826 -Ref: #other-ledger-directives135022 -Node: Other cost/lot notations135588 -Ref: #other-costlot-notations135761 -Node: CSV138350 -Ref: #csv138441 -Node: CSV rules cheatsheet140433 -Ref: #csv-rules-cheatsheet140560 -Node: source142358 -Ref: #source142479 -Node: separator143359 -Ref: #separator143470 -Node: skip144010 -Ref: #skip144116 -Node: date-format144660 -Ref: #date-format144779 -Node: timezone145503 -Ref: #timezone145624 -Node: newest-first146629 -Ref: #newest-first146765 -Node: intra-day-reversed147342 -Ref: #intra-day-reversed147494 -Node: decimal-mark147942 -Ref: #decimal-mark148081 -Node: fields list148420 -Ref: #fields-list148557 -Node: Field assignment150228 -Ref: #field-assignment150370 -Node: Field names151447 -Ref: #field-names151576 -Node: date field152779 -Ref: #date-field152895 -Node: date2 field152943 -Ref: #date2-field153082 -Node: status field153138 -Ref: #status-field153279 -Node: code field153328 -Ref: #code-field153471 -Node: description field153516 -Ref: #description-field153674 -Node: comment field153733 -Ref: #comment-field153886 -Node: account field154179 -Ref: #account-field154327 -Node: amount field154897 -Ref: #amount-field155044 -Node: currency field157736 -Ref: #currency-field157887 -Node: balance field158144 -Ref: #balance-field158274 -Node: if block158667 -Ref: #if-block158786 -Node: Matchers160194 -Ref: #matchers160306 -Node: What matchers match161103 -Ref: #what-matchers-match161250 -Node: Combining matchers161690 -Ref: #combining-matchers161856 -Node: Match groups162393 -Ref: #match-groups162519 -Node: if table163287 -Ref: #if-table163407 -Node: balance-type165288 -Ref: #balance-type165415 -Node: include166115 -Ref: #include166240 -Node: Working with CSV166684 -Ref: #working-with-csv166829 -Node: Rapid feedback167236 -Ref: #rapid-feedback167367 -Node: Valid CSV167819 -Ref: #valid-csv167963 -Node: File Extension168695 -Ref: #file-extension168866 -Node: Reading CSV from standard input169430 -Ref: #reading-csv-from-standard-input169652 -Node: Reading multiple CSV files169816 -Ref: #reading-multiple-csv-files170045 -Node: Reading files specified by rule170292 -Ref: #reading-files-specified-by-rule170518 -Node: Valid transactions171689 -Ref: #valid-transactions171886 -Node: Deduplicating importing172514 -Ref: #deduplicating-importing172707 -Node: Setting amounts173743 -Ref: #setting-amounts173912 -Node: Amount signs176270 -Ref: #amount-signs176438 -Node: Setting currency/commodity177335 -Ref: #setting-currencycommodity177537 -Node: Amount decimal places178711 -Ref: #amount-decimal-places178915 -Node: Referencing other fields179968 -Ref: #referencing-other-fields180179 -Node: How CSV rules are evaluated181076 -Ref: #how-csv-rules-are-evaluated181291 -Node: Well factored rules182744 -Ref: #well-factored-rules182910 -Node: CSV rules examples183234 -Ref: #csv-rules-examples183367 -Node: Bank of Ireland183432 -Ref: #bank-of-ireland183567 -Node: Coinbase185029 -Ref: #coinbase185165 -Node: Amazon186212 -Ref: #amazon186335 -Node: Paypal188054 -Ref: #paypal188160 -Node: Timeclock195804 -Ref: #timeclock195909 -Node: Timedot198073 -Ref: #timedot198196 -Node: Timedot examples201317 -Ref: #timedot-examples201423 -Node: PART 3 REPORTING CONCEPTS203594 -Ref: #part-3-reporting-concepts203758 -Node: Time periods203758 -Ref: #time-periods203892 -Node: Report start & end date204031 -Ref: #report-start-end-date204183 -Node: Smart dates205507 -Ref: #smart-dates205660 -Node: Report intervals207450 -Ref: #report-intervals207606 -Node: Date adjustments208024 -Ref: #date-adjustments208184 -Node: Start date adjustment208244 -Ref: #start-date-adjustment208406 -Node: End date adjustment209147 -Ref: #end-date-adjustment209305 -Node: Period headings209892 -Ref: #period-headings210052 -Node: Period expressions210825 -Ref: #period-expressions210966 -Node: Period expressions with a report interval212730 -Ref: #period-expressions-with-a-report-interval212964 -Node: More complex report intervals213178 -Ref: #more-complex-report-intervals213423 -Node: Multiple weekday intervals215294 -Ref: #multiple-weekday-intervals215483 -Node: Depth216305 -Ref: #depth216407 -Node: Queries216703 -Ref: #queries216805 -Node: Query types218401 -Ref: #query-types218522 -Node: Combining query terms221756 -Ref: #combining-query-terms221933 -Node: Queries and command options223496 -Ref: #queries-and-command-options223701 -Node: Queries and account aliases223950 -Ref: #queries-and-account-aliases224155 -Node: Queries and valuation224275 -Ref: #queries-and-valuation224432 -Node: Pivoting224637 -Ref: #pivoting224751 -Node: Generating data226528 -Ref: #generating-data226660 -Node: Forecasting228328 -Ref: #forecasting228453 -Node: --forecast228984 -Ref: #forecast229115 -Node: Inspecting forecast transactions230085 -Ref: #inspecting-forecast-transactions230287 -Node: Forecast reports231418 -Ref: #forecast-reports231591 -Node: Forecast tags232527 -Ref: #forecast-tags232687 -Node: Forecast period in detail233147 -Ref: #forecast-period-in-detail233341 -Node: Forecast troubleshooting234235 -Ref: #forecast-troubleshooting234403 -Node: Budgeting235306 -Ref: #budgeting235429 -Node: Amount formatting235866 -Ref: #amount-formatting236008 -Node: Commodity display style236110 -Ref: #commodity-display-style236264 -Node: Rounding237951 -Ref: #rounding238106 -Node: Trailing decimal marks238556 -Ref: #trailing-decimal-marks238735 -Node: Amount parseability239489 -Ref: #amount-parseability239645 -Node: Cost reporting241070 -Ref: #cost-reporting241212 -Node: Recording costs241873 -Ref: #recording-costs242009 -Node: Reporting at cost243600 -Ref: #reporting-at-cost243775 -Node: Equity conversion postings244365 -Ref: #equity-conversion-postings244579 -Node: Inferring equity conversion postings247010 -Ref: #inferring-equity-conversion-postings247273 -Node: Combining costs and equity conversion postings248025 -Ref: #combining-costs-and-equity-conversion-postings248335 -Node: Requirements for detecting equity conversion postings249250 -Ref: #requirements-for-detecting-equity-conversion-postings249572 -Node: Infer cost and equity by default ?250772 -Ref: #infer-cost-and-equity-by-default251001 -Node: Value reporting251209 -Ref: #value-reporting251351 -Node: -V Value252090 -Ref: #v-value252222 -Node: -X Value in specified commodity252417 -Ref: #x-value-in-specified-commodity252618 -Node: Valuation date252767 -Ref: #valuation-date252944 -Node: Finding market price253727 -Ref: #finding-market-price253938 -Node: --infer-market-prices market prices from transactions255107 -Ref: #infer-market-prices-market-prices-from-transactions255389 -Node: Valuation commodity258151 -Ref: #valuation-commodity258371 -Node: --value Flexible valuation259584 -Ref: #value-flexible-valuation259783 -Node: Valuation examples261427 -Ref: #valuation-examples261627 -Node: Interaction of valuation and queries263559 -Ref: #interaction-of-valuation-and-queries263799 -Node: Effect of valuation on reports264276 -Ref: #effect-of-valuation-on-reports264479 -Node: PART 4 COMMANDS272174 -Ref: #part-4-commands272317 -Node: Help commands274390 -Ref: #help-commands274535 -Node: help274563 -Ref: #help274652 -Node: demo276240 -Ref: #demo276329 -Node: User interface commands277373 -Ref: #user-interface-commands277542 -Node: ui277567 -Ref: #ui277659 -Node: web277692 -Ref: #web277786 -Node: Data entry commands277820 -Ref: #data-entry-commands277989 -Node: add278018 -Ref: #add278112 -Node: import280473 -Ref: #import280573 -Node: Date skipping281734 -Ref: #date-skipping281857 -Node: Import testing284635 -Ref: #import-testing284798 -Node: Importing balance assignments285641 -Ref: #importing-balance-assignments285848 -Node: Import and commodity styles286497 -Ref: #import-and-commodity-styles286677 -Node: Basic report commands286906 -Ref: #basic-report-commands287080 -Node: accounts287207 -Ref: #accounts287317 -Node: codes290080 -Ref: #codes290204 -Node: commodities291102 -Ref: #commodities291242 -Node: descriptions291346 -Ref: #descriptions291488 -Node: files291813 -Ref: #files291935 -Node: notes292110 -Ref: #notes292226 -Node: payees292622 -Ref: #payees292741 -Node: prices293406 -Ref: #prices293525 -Node: stats294298 -Ref: #stats294413 -Node: tags296039 -Ref: #tags-1296139 -Node: Standard report commands297346 -Ref: #standard-report-commands297531 -Node: print297651 -Ref: #print297759 -Node: print explicitness300097 -Ref: #print-explicitness300238 -Node: print amount style301017 -Ref: #print-amount-style301185 -Node: print parseability302255 -Ref: #print-parseability302425 -Node: print other features303174 -Ref: #print-other-features303351 -Node: print output format303872 -Ref: #print-output-format304018 -Node: aregister307157 -Ref: #aregister307290 -Node: aregister and posting dates310937 -Ref: #aregister-and-posting-dates311082 -Node: register311838 -Ref: #register311976 -Node: Custom register output318797 -Ref: #custom-register-output318926 -Node: balancesheet320273 -Ref: #balancesheet320428 -Node: balancesheetequity324909 -Ref: #balancesheetequity325076 -Node: cashflow329915 -Ref: #cashflow330065 -Node: incomestatement334343 -Ref: #incomestatement334480 -Node: Advanced report commands338807 -Ref: #advanced-report-commands338985 -Node: balance339015 -Ref: #balance339123 -Node: balance features343904 -Ref: #balance-features344044 -Node: Simple balance report345980 -Ref: #simple-balance-report346165 -Node: Balance report line format347790 -Ref: #balance-report-line-format347992 -Node: Filtered balance report350150 -Ref: #filtered-balance-report350342 -Node: List or tree mode350669 -Ref: #list-or-tree-mode350837 -Node: Depth limiting352182 -Ref: #depth-limiting352348 -Node: Dropping top-level accounts352949 -Ref: #dropping-top-level-accounts353149 -Node: Showing declared accounts353459 -Ref: #showing-declared-accounts353658 -Node: Sorting by amount354189 -Ref: #sorting-by-amount354356 -Node: Percentages355026 -Ref: #percentages355185 -Node: Multi-period balance report355733 -Ref: #multi-period-balance-report355933 -Node: Balance change end balance358485 -Ref: #balance-change-end-balance358694 -Node: Balance report types360122 -Ref: #balance-report-types360303 -Node: Calculation type360801 -Ref: #calculation-type360956 -Node: Accumulation type361505 -Ref: #accumulation-type361685 -Node: Valuation type362606 -Ref: #valuation-type362794 -Node: Combining balance report types363795 -Ref: #combining-balance-report-types363989 -Node: Budget report365827 -Ref: #budget-report365989 -Node: Using the budget report368132 -Ref: #using-the-budget-report368305 -Node: Budget date surprises370408 -Ref: #budget-date-surprises370608 -Node: Selecting budget goals371772 -Ref: #selecting-budget-goals371975 -Node: Budgeting vs forecasting372720 -Ref: #budgeting-vs-forecasting372897 -Node: Balance report layout374397 -Ref: #balance-report-layout374582 -Node: Wide layout375535 -Ref: #wide-layout375670 -Node: Tall layout377940 -Ref: #tall-layout378095 -Node: Bare layout379246 -Ref: #bare-layout379401 -Node: Tidy layout381310 -Ref: #tidy-layout381445 -Node: Some useful balance reports382854 -Ref: #some-useful-balance-reports383029 -Node: roi384114 -Ref: #roi384214 -Node: Spaces and special characters in --inv and --pnl386361 -Ref: #spaces-and-special-characters-in---inv-and---pnl386599 -Node: Semantics of --inv and --pnl387087 -Ref: #semantics-of---inv-and---pnl387324 -Node: IRR and TWR explained389174 -Ref: #irr-and-twr-explained389332 -Node: Chart commands392585 -Ref: #chart-commands392743 -Node: activity392766 -Ref: #activity392855 -Node: Data generation commands393263 -Ref: #data-generation-commands393437 -Node: close393469 -Ref: #close393575 -Node: close --migrate396061 -Ref: #close---migrate396186 -Node: close --close397825 -Ref: #close---close397967 -Node: close --open398203 -Ref: #close---open398342 -Node: close --assert398452 -Ref: #close---assert398596 -Node: close --assign398817 -Ref: #close---assign398963 -Node: close --retain399489 -Ref: #close---retain399640 -Node: close customisation400385 -Ref: #close-customisation400562 -Node: close and balance assertions402029 -Ref: #close-and-balance-assertions402224 -Node: close examples403551 -Ref: #close-examples403690 -Node: Retain earnings403788 -Ref: #retain-earnings403945 -Node: Migrate balances to a new file404291 -Ref: #migrate-balances-to-a-new-file404515 -Node: More detailed close examples405643 -Ref: #more-detailed-close-examples405839 -Node: rewrite405865 -Ref: #rewrite405975 -Node: Re-write rules in a file408437 -Ref: #re-write-rules-in-a-file408598 -Node: Diff output format409747 -Ref: #diff-output-format409928 -Node: rewrite vs print --auto411020 -Ref: #rewrite-vs.-print---auto411178 -Node: Maintenance commands411734 -Ref: #maintenance-commands411905 -Node: check411943 -Ref: #check412042 -Node: Basic checks413025 -Ref: #basic-checks413143 -Node: Strict checks413978 -Ref: #strict-checks414119 -Node: Other checks414853 -Ref: #other-checks414993 -Node: Custom checks416708 -Ref: #custom-checks416828 -Node: diff417163 -Ref: #diff417273 -Node: test418370 -Ref: #test418466 -Node: PART 5 COMMON TASKS419242 -Ref: #part-5-common-tasks419401 -Node: Getting help419475 -Ref: #getting-help419624 -Node: Constructing command lines420384 -Ref: #constructing-command-lines420565 -Node: Starting a journal file421222 -Ref: #starting-a-journal-file421404 -Node: Setting LEDGER_FILE422606 -Ref: #setting-ledger_file422778 -Node: Setting opening balances423735 -Ref: #setting-opening-balances423916 -Node: Recording transactions427057 -Ref: #recording-transactions427226 -Node: Reconciling427782 -Ref: #reconciling427914 -Node: Reporting430171 -Ref: #reporting430300 -Node: Migrating to a new file434285 -Ref: #migrating-to-a-new-file434435 -Node: BUGS434734 -Ref: #bugs434828 -Node: Troubleshooting435707 -Ref: #troubleshooting435807 +Node: Add-on commands11144 +Ref: #add-on-commands11246 +Node: Options12362 +Ref: #options12463 +Node: Special characters18779 +Ref: #special-characters18916 +Node: Single escaping shell metacharacters19079 +Ref: #single-escaping-shell-metacharacters19320 +Node: Double escaping regular expression metacharacters19923 +Ref: #double-escaping-regular-expression-metacharacters20234 +Node: Triple escaping for add-on commands20760 +Ref: #triple-escaping-for-add-on-commands21020 +Node: Less escaping21664 +Ref: #less-escaping21818 +Node: Unicode characters22142 +Ref: #unicode-characters22307 +Node: Regular expressions23806 +Ref: #regular-expressions23969 +Node: hledger's regular expressions27065 +Ref: #hledgers-regular-expressions27224 +Node: Argument files28610 +Ref: #argument-files28757 +Node: Config files29263 +Ref: #config-files29404 +Node: Shell completions32010 +Ref: #shell-completions32138 +Node: Output32535 +Ref: #output32637 +Node: Output destination32764 +Ref: #output-destination32895 +Node: Output format33320 +Ref: #output-format33466 +Node: CSV output34951 +Ref: #csv-output35067 +Node: HTML output35170 +Ref: #html-output35308 +Node: JSON output35402 +Ref: #json-output35540 +Node: SQL output36525 +Ref: #sql-output36641 +Node: Commodity styles37376 +Ref: #commodity-styles37516 +Node: Colour38254 +Ref: #colour38372 +Node: Box-drawing38776 +Ref: #box-drawing38894 +Node: Paging39178 +Ref: #paging39292 +Node: Debug output40245 +Ref: #debug-output40351 +Node: Environment41014 +Ref: #environment41138 +Node: PART 2 DATA FORMATS41705 +Ref: #part-2-data-formats41848 +Node: Journal41848 +Ref: #journal41957 +Node: Journal cheatsheet44326 +Ref: #journal-cheatsheet44453 +Node: Comments50540 +Ref: #comments50668 +Node: Transactions51484 +Ref: #transactions51607 +Node: Dates52621 +Ref: #dates52728 +Node: Simple dates52773 +Ref: #simple-dates52889 +Node: Posting dates53389 +Ref: #posting-dates53507 +Node: Status54476 +Ref: #status54577 +Node: Code56242 +Ref: #code56345 +Node: Description56577 +Ref: #description56708 +Node: Payee and note57264 +Ref: #payee-and-note57370 +Node: Transaction comments58355 +Ref: #transaction-comments58508 +Node: Postings58871 +Ref: #postings59002 +Node: Debits and credits60034 +Ref: #debits-and-credits60181 +Node: The two space delimiter60644 +Ref: #the-two-space-delimiter60801 +Node: Account names61209 +Ref: #account-names61339 +Node: Amounts63013 +Ref: #amounts63141 +Node: Decimal marks64042 +Ref: #decimal-marks64169 +Node: Digit group marks65146 +Ref: #digit-group-marks65299 +Node: Commodity65781 +Ref: #commodity65910 +Node: Costs66898 +Ref: #costs66993 +Node: Balance assertions69150 +Ref: #balance-assertions69303 +Node: Assertions and ordering70387 +Ref: #assertions-and-ordering70576 +Node: Assertions and multiple included files71115 +Ref: #assertions-and-multiple-included-files71375 +Node: Assertions and multiple -f files71875 +Ref: #assertions-and-multiple--f-files72120 +Node: Assertions and costs72517 +Ref: #assertions-and-costs72726 +Node: Assertions and commodities73167 +Ref: #assertions-and-commodities73382 +Node: Assertions and subaccounts74826 +Ref: #assertions-and-subaccounts75052 +Node: Assertions and virtual postings75496 +Ref: #assertions-and-virtual-postings75734 +Node: Assertions and auto postings75866 +Ref: #assertions-and-auto-postings76096 +Node: Assertions and precision76741 +Ref: #assertions-and-precision76923 +Node: Posting comments77190 +Ref: #posting-comments77353 +Node: Transaction balancing77730 +Ref: #transaction-balancing77889 +Node: Tags79732 +Ref: #tags79851 +Node: Tag names81194 +Ref: #tag-names81301 +Node: Special tags81689 +Ref: #special-tags81821 +Node: Tag values83334 +Ref: #tag-values83444 +Node: Directives84316 +Ref: #directives84443 +Node: Directives and multiple files85773 +Ref: #directives-and-multiple-files85951 +Node: Directive effects86718 +Ref: #directive-effects86872 +Node: account directive89874 +Ref: #account-directive90030 +Node: Account comments91324 +Ref: #account-comments91475 +Node: Account error checking91983 +Ref: #account-error-checking92176 +Node: Account display order93365 +Ref: #account-display-order93553 +Node: Account types94563 +Ref: #account-types94704 +Node: alias directive98337 +Ref: #alias-directive98498 +Node: Basic aliases99548 +Ref: #basic-aliases99679 +Node: Regex aliases100423 +Ref: #regex-aliases100580 +Node: Combining aliases101470 +Ref: #combining-aliases101648 +Node: Aliases and multiple files102924 +Ref: #aliases-and-multiple-files103128 +Node: end aliases directive103707 +Ref: #end-aliases-directive103926 +Node: Aliases can generate bad account names104075 +Ref: #aliases-can-generate-bad-account-names104323 +Node: Aliases and account types104908 +Ref: #aliases-and-account-types105100 +Node: commodity directive105796 +Ref: #commodity-directive105970 +Node: Commodity directive syntax107383 +Ref: #commodity-directive-syntax107568 +Node: Commodity error checking109019 +Ref: #commodity-error-checking109200 +Node: decimal-mark directive109494 +Ref: #decimal-mark-directive109676 +Node: include directive110073 +Ref: #include-directive110237 +Node: P directive111149 +Ref: #p-directive111294 +Node: payee directive112183 +Ref: #payee-directive112332 +Node: tag directive112805 +Ref: #tag-directive112960 +Node: Periodic transactions113417 +Ref: #periodic-transactions113582 +Node: Periodic rule syntax115571 +Ref: #periodic-rule-syntax115749 +Node: Periodic rules and relative dates116394 +Ref: #periodic-rules-and-relative-dates116660 +Node: Two spaces between period expression and description!117171 +Ref: #two-spaces-between-period-expression-and-description117448 +Node: Auto postings118132 +Ref: #auto-postings118280 +Node: Auto postings and multiple files121292 +Ref: #auto-postings-and-multiple-files121488 +Node: Auto postings and dates121697 +Ref: #auto-postings-and-dates121963 +Node: Auto postings and transaction balancing / inferred amounts / balance assertions122138 +Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions122481 +Node: Auto posting tags122984 +Ref: #auto-posting-tags123243 +Node: Auto postings on forecast transactions only123879 +Ref: #auto-postings-on-forecast-transactions-only124102 +Node: Other syntax124349 +Ref: #other-syntax124465 +Node: Balance assignments125121 +Ref: #balance-assignments125277 +Node: Balance assignments and costs126649 +Ref: #balance-assignments-and-costs126861 +Node: Balance assignments and multiple files127071 +Ref: #balance-assignments-and-multiple-files127301 +Node: Bracketed posting dates127494 +Ref: #bracketed-posting-dates127678 +Node: D directive128192 +Ref: #d-directive128360 +Node: apply account directive129965 +Ref: #apply-account-directive130145 +Node: Y directive130832 +Ref: #y-directive130992 +Node: Secondary dates131820 +Ref: #secondary-dates131974 +Node: Star comments133305 +Ref: #star-comments133465 +Node: Valuation expressions133997 +Ref: #valuation-expressions134174 +Node: Virtual postings134296 +Ref: #virtual-postings134473 +Node: Other Ledger directives135920 +Ref: #other-ledger-directives136116 +Node: Other cost/lot notations136682 +Ref: #other-costlot-notations136855 +Node: CSV139444 +Ref: #csv139535 +Node: CSV rules cheatsheet141527 +Ref: #csv-rules-cheatsheet141654 +Node: source143452 +Ref: #source143573 +Node: separator144453 +Ref: #separator144564 +Node: skip145104 +Ref: #skip145210 +Node: date-format145754 +Ref: #date-format145873 +Node: timezone146597 +Ref: #timezone146718 +Node: newest-first147723 +Ref: #newest-first147859 +Node: intra-day-reversed148436 +Ref: #intra-day-reversed148588 +Node: decimal-mark149036 +Ref: #decimal-mark149175 +Node: fields list149514 +Ref: #fields-list149651 +Node: Field assignment151322 +Ref: #field-assignment151464 +Node: Field names152541 +Ref: #field-names152670 +Node: date field153873 +Ref: #date-field153989 +Node: date2 field154037 +Ref: #date2-field154176 +Node: status field154232 +Ref: #status-field154373 +Node: code field154422 +Ref: #code-field154565 +Node: description field154610 +Ref: #description-field154768 +Node: comment field154827 +Ref: #comment-field154980 +Node: account field155384 +Ref: #account-field155532 +Node: amount field156102 +Ref: #amount-field156249 +Node: currency field158941 +Ref: #currency-field159092 +Node: balance field159349 +Ref: #balance-field159479 +Node: if block159872 +Ref: #if-block159991 +Node: Matchers161399 +Ref: #matchers161511 +Node: What matchers match162308 +Ref: #what-matchers-match162455 +Node: Combining matchers162895 +Ref: #combining-matchers163061 +Node: Match groups163598 +Ref: #match-groups163724 +Node: if table164492 +Ref: #if-table164612 +Node: balance-type166493 +Ref: #balance-type166620 +Node: include167320 +Ref: #include167445 +Node: Working with CSV167889 +Ref: #working-with-csv168034 +Node: Rapid feedback168441 +Ref: #rapid-feedback168572 +Node: Valid CSV169024 +Ref: #valid-csv169168 +Node: File Extension169900 +Ref: #file-extension170071 +Node: Reading CSV from standard input170635 +Ref: #reading-csv-from-standard-input170857 +Node: Reading multiple CSV files171021 +Ref: #reading-multiple-csv-files171250 +Node: Reading files specified by rule171497 +Ref: #reading-files-specified-by-rule171723 +Node: Valid transactions172894 +Ref: #valid-transactions173091 +Node: Deduplicating importing173719 +Ref: #deduplicating-importing173912 +Node: Setting amounts174948 +Ref: #setting-amounts175117 +Node: Amount signs177475 +Ref: #amount-signs177643 +Node: Setting currency/commodity178540 +Ref: #setting-currencycommodity178742 +Node: Amount decimal places179916 +Ref: #amount-decimal-places180120 +Node: Referencing other fields181173 +Ref: #referencing-other-fields181384 +Node: How CSV rules are evaluated182281 +Ref: #how-csv-rules-are-evaluated182496 +Node: Well factored rules183949 +Ref: #well-factored-rules184115 +Node: CSV rules examples184439 +Ref: #csv-rules-examples184572 +Node: Bank of Ireland184637 +Ref: #bank-of-ireland184772 +Node: Coinbase186234 +Ref: #coinbase186370 +Node: Amazon187417 +Ref: #amazon187540 +Node: Paypal189259 +Ref: #paypal189365 +Node: Timeclock197009 +Ref: #timeclock197114 +Node: Timedot199278 +Ref: #timedot199401 +Node: Timedot examples202755 +Ref: #timedot-examples202861 +Node: PART 3 REPORTING CONCEPTS205032 +Ref: #part-3-reporting-concepts205196 +Node: Time periods205196 +Ref: #time-periods205330 +Node: Report start & end date205469 +Ref: #report-start-end-date205621 +Node: Smart dates206945 +Ref: #smart-dates207098 +Node: Report intervals208888 +Ref: #report-intervals209044 +Node: Date adjustments209462 +Ref: #date-adjustments209622 +Node: Start date adjustment209682 +Ref: #start-date-adjustment209844 +Node: End date adjustment210585 +Ref: #end-date-adjustment210743 +Node: Period headings211330 +Ref: #period-headings211490 +Node: Period expressions212263 +Ref: #period-expressions212404 +Node: Period expressions with a report interval214168 +Ref: #period-expressions-with-a-report-interval214402 +Node: More complex report intervals214616 +Ref: #more-complex-report-intervals214861 +Node: Multiple weekday intervals216732 +Ref: #multiple-weekday-intervals216921 +Node: Depth217743 +Ref: #depth217845 +Node: Queries218141 +Ref: #queries218243 +Node: Query types219839 +Ref: #query-types219960 +Node: Combining query terms223194 +Ref: #combining-query-terms223371 +Node: Queries and command options224934 +Ref: #queries-and-command-options225139 +Node: Queries and account aliases225388 +Ref: #queries-and-account-aliases225593 +Node: Queries and valuation225713 +Ref: #queries-and-valuation225870 +Node: Pivoting226075 +Ref: #pivoting226189 +Node: Generating data227966 +Ref: #generating-data228098 +Node: Forecasting229766 +Ref: #forecasting229891 +Node: --forecast230422 +Ref: #forecast230553 +Node: Inspecting forecast transactions231523 +Ref: #inspecting-forecast-transactions231725 +Node: Forecast reports232856 +Ref: #forecast-reports233029 +Node: Forecast tags233965 +Ref: #forecast-tags234125 +Node: Forecast period in detail234585 +Ref: #forecast-period-in-detail234779 +Node: Forecast troubleshooting235673 +Ref: #forecast-troubleshooting235841 +Node: Budgeting236744 +Ref: #budgeting236867 +Node: Amount formatting237304 +Ref: #amount-formatting237446 +Node: Commodity display style237548 +Ref: #commodity-display-style237702 +Node: Rounding239389 +Ref: #rounding239544 +Node: Trailing decimal marks239994 +Ref: #trailing-decimal-marks240173 +Node: Amount parseability240927 +Ref: #amount-parseability241083 +Node: Cost reporting242508 +Ref: #cost-reporting242650 +Node: Recording costs243311 +Ref: #recording-costs243447 +Node: Reporting at cost245038 +Ref: #reporting-at-cost245213 +Node: Equity conversion postings245803 +Ref: #equity-conversion-postings246017 +Node: Inferring equity conversion postings248448 +Ref: #inferring-equity-conversion-postings248711 +Node: Combining costs and equity conversion postings249463 +Ref: #combining-costs-and-equity-conversion-postings249773 +Node: Requirements for detecting equity conversion postings250688 +Ref: #requirements-for-detecting-equity-conversion-postings251010 +Node: Infer cost and equity by default ?252210 +Ref: #infer-cost-and-equity-by-default252439 +Node: Value reporting252647 +Ref: #value-reporting252789 +Node: -V Value253528 +Ref: #v-value253660 +Node: -X Value in specified commodity253855 +Ref: #x-value-in-specified-commodity254056 +Node: Valuation date254205 +Ref: #valuation-date254382 +Node: Finding market price255165 +Ref: #finding-market-price255376 +Node: --infer-market-prices market prices from transactions256545 +Ref: #infer-market-prices-market-prices-from-transactions256827 +Node: Valuation commodity259589 +Ref: #valuation-commodity259809 +Node: --value Flexible valuation261022 +Ref: #value-flexible-valuation261221 +Node: Valuation examples262865 +Ref: #valuation-examples263065 +Node: Interaction of valuation and queries264997 +Ref: #interaction-of-valuation-and-queries265237 +Node: Effect of valuation on reports265714 +Ref: #effect-of-valuation-on-reports265917 +Node: PART 4 COMMANDS273612 +Ref: #part-4-commands273755 +Node: Help commands275828 +Ref: #help-commands275973 +Node: help276001 +Ref: #help276090 +Node: demo277678 +Ref: #demo277767 +Node: User interface commands278811 +Ref: #user-interface-commands278980 +Node: ui279005 +Ref: #ui279097 +Node: web279130 +Ref: #web279224 +Node: Data entry commands279258 +Ref: #data-entry-commands279427 +Node: add279456 +Ref: #add279550 +Node: import281911 +Ref: #import282011 +Node: Date skipping283172 +Ref: #date-skipping283295 +Node: Import testing286073 +Ref: #import-testing286236 +Node: Importing balance assignments287079 +Ref: #importing-balance-assignments287286 +Node: Import and commodity styles287935 +Ref: #import-and-commodity-styles288115 +Node: Basic report commands288344 +Ref: #basic-report-commands288518 +Node: accounts288645 +Ref: #accounts288755 +Node: codes291518 +Ref: #codes291642 +Node: commodities292540 +Ref: #commodities292680 +Node: descriptions292784 +Ref: #descriptions292926 +Node: files293251 +Ref: #files293373 +Node: notes293548 +Ref: #notes293664 +Node: payees294060 +Ref: #payees294179 +Node: prices294844 +Ref: #prices294963 +Node: stats295736 +Ref: #stats295851 +Node: tags297477 +Ref: #tags-1297577 +Node: Standard report commands298784 +Ref: #standard-report-commands298969 +Node: print299089 +Ref: #print299197 +Node: print explicitness301535 +Ref: #print-explicitness301676 +Node: print amount style302455 +Ref: #print-amount-style302623 +Node: print parseability303693 +Ref: #print-parseability303863 +Node: print other features304612 +Ref: #print-other-features304789 +Node: print output format305310 +Ref: #print-output-format305456 +Node: aregister308595 +Ref: #aregister308728 +Node: aregister and posting dates312375 +Ref: #aregister-and-posting-dates312520 +Node: register313276 +Ref: #register313414 +Node: Custom register output320235 +Ref: #custom-register-output320364 +Node: balancesheet321711 +Ref: #balancesheet321866 +Node: balancesheetequity326623 +Ref: #balancesheetequity326790 +Node: cashflow331905 +Ref: #cashflow332055 +Node: incomestatement336609 +Ref: #incomestatement336746 +Node: Advanced report commands341349 +Ref: #advanced-report-commands341527 +Node: balance341557 +Ref: #balance341665 +Node: balance features346716 +Ref: #balance-features346856 +Node: Simple balance report348792 +Ref: #simple-balance-report348977 +Node: Balance report line format350602 +Ref: #balance-report-line-format350804 +Node: Filtered balance report352962 +Ref: #filtered-balance-report353154 +Node: List or tree mode353481 +Ref: #list-or-tree-mode353649 +Node: Depth limiting354994 +Ref: #depth-limiting355160 +Node: Dropping top-level accounts355761 +Ref: #dropping-top-level-accounts355961 +Node: Showing declared accounts356271 +Ref: #showing-declared-accounts356470 +Node: Sorting by amount357001 +Ref: #sorting-by-amount357168 +Node: Percentages357838 +Ref: #percentages357980 +Node: Hyperlinks358528 +Ref: #hyperlinks358678 +Node: Multi-period balance report359062 +Ref: #multi-period-balance-report359261 +Node: Balance change end balance361813 +Ref: #balance-change-end-balance362022 +Node: Balance report types363450 +Ref: #balance-report-types363631 +Node: Calculation type364129 +Ref: #calculation-type364284 +Node: Accumulation type364833 +Ref: #accumulation-type365013 +Node: Valuation type365934 +Ref: #valuation-type366122 +Node: Combining balance report types367123 +Ref: #combining-balance-report-types367317 +Node: Budget report369155 +Ref: #budget-report369317 +Node: Using the budget report371460 +Ref: #using-the-budget-report371633 +Node: Budget date surprises373736 +Ref: #budget-date-surprises373936 +Node: Selecting budget goals375100 +Ref: #selecting-budget-goals375303 +Node: Budgeting vs forecasting376048 +Ref: #budgeting-vs-forecasting376225 +Node: Balance report layout377725 +Ref: #balance-report-layout377910 +Node: Wide layout378863 +Ref: #wide-layout378998 +Node: Tall layout381268 +Ref: #tall-layout381423 +Node: Bare layout382574 +Ref: #bare-layout382729 +Node: Tidy layout384638 +Ref: #tidy-layout384773 +Node: Some useful balance reports386182 +Ref: #some-useful-balance-reports386357 +Node: roi387442 +Ref: #roi387542 +Node: Spaces and special characters in --inv and --pnl389689 +Ref: #spaces-and-special-characters-in---inv-and---pnl389927 +Node: Semantics of --inv and --pnl390415 +Ref: #semantics-of---inv-and---pnl390652 +Node: IRR and TWR explained392502 +Ref: #irr-and-twr-explained392660 +Node: Chart commands395913 +Ref: #chart-commands396071 +Node: activity396094 +Ref: #activity396183 +Node: Data generation commands396591 +Ref: #data-generation-commands396765 +Node: close396797 +Ref: #close396903 +Node: close --migrate399389 +Ref: #close---migrate399514 +Node: close --close401153 +Ref: #close---close401295 +Node: close --open401531 +Ref: #close---open401670 +Node: close --assert401780 +Ref: #close---assert401924 +Node: close --assign402145 +Ref: #close---assign402291 +Node: close --retain402817 +Ref: #close---retain402968 +Node: close customisation403713 +Ref: #close-customisation403890 +Node: close and balance assertions405357 +Ref: #close-and-balance-assertions405552 +Node: close examples406879 +Ref: #close-examples407018 +Node: Retain earnings407116 +Ref: #retain-earnings407273 +Node: Migrate balances to a new file407619 +Ref: #migrate-balances-to-a-new-file407843 +Node: More detailed close examples408971 +Ref: #more-detailed-close-examples409167 +Node: rewrite409193 +Ref: #rewrite409303 +Node: Re-write rules in a file411765 +Ref: #re-write-rules-in-a-file411926 +Node: Diff output format413075 +Ref: #diff-output-format413256 +Node: rewrite vs print --auto414348 +Ref: #rewrite-vs.-print---auto414506 +Node: Maintenance commands415062 +Ref: #maintenance-commands415233 +Node: check415271 +Ref: #check415370 +Node: Basic checks416353 +Ref: #basic-checks416471 +Node: Strict checks417306 +Ref: #strict-checks417447 +Node: Other checks418181 +Ref: #other-checks418321 +Node: Custom checks420036 +Ref: #custom-checks420156 +Node: diff420491 +Ref: #diff420601 +Node: test421698 +Ref: #test421794 +Node: PART 5 COMMON TASKS422570 +Ref: #part-5-common-tasks422729 +Node: Getting help422803 +Ref: #getting-help422952 +Node: Constructing command lines423712 +Ref: #constructing-command-lines423893 +Node: Starting a journal file424550 +Ref: #starting-a-journal-file424732 +Node: Setting LEDGER_FILE425934 +Ref: #setting-ledger_file426106 +Node: Setting opening balances427063 +Ref: #setting-opening-balances427244 +Node: Recording transactions430385 +Ref: #recording-transactions430554 +Node: Reconciling431110 +Ref: #reconciling431242 +Node: Reporting433499 +Ref: #reporting433628 +Node: Migrating to a new file437613 +Ref: #migrating-to-a-new-file437763 +Node: BUGS438062 +Ref: #bugs438156 +Node: Troubleshooting439035 +Ref: #troubleshooting439135  End Tag Table diff --git a/hledger/hledger.txt b/hledger/hledger.txt index 2cbc24dd3..36ab82ba9 100644 --- a/hledger/hledger.txt +++ b/hledger/hledger.txt @@ -203,48 +203,48 @@ Commands output a report. A few commands assist with adding data and file man- agement. - To show the commands list, run hledger with no arguments. The commands - are described in detail in PART 4: COMMANDS, below. + To show a summary of commands, run hledger with no arguments. You can + see the same commands summary at the start of PART 4: COMMANDS below. To use a particular command, run hledger CMD [CMDOPTS] [CMDARGS], - o CMD is the full command name, or its standard abbreviation shown in + o CMD is the full command name, or its standard abbreviation shown in the commands list, or any unambiguous prefix of the name. - o CMDOPTS are command-specific options, if any. Command-specific op- + o CMDOPTS are command-specific options, if any. Command-specific op- tions must be written after the command name. Eg: hledger print -x. - o CMDARGS are additional arguments to the command, if any. Most - hledger commands accept arguments representing a query, to limit the + o CMDARGS are additional arguments to the command, if any. Most + hledger commands accept arguments representing a query, to limit the data in some way. Eg: hledger reg assets:checking. To list a command's options, arguments, and documentation in the termi- nal, run hledger CMD -h. Eg: hledger bal -h. Add-on commands - In addition to the built-in commands, you can install add-on commands: - programs or scripts named "hledger-SOMETHING", which will also appear - in hledger's commands list. If you used the hledger-install script, - you will have several add-ons installed already. Some more can be - found in hledger's bin/ directory, documented at + In addition to the built-in commands, you can install add-on commands: + programs or scripts named "hledger-SOMETHING", which will also appear + in hledger's commands list. If you used the hledger-install script, + you will have several add-ons installed already. Some more can be + found in hledger's bin/ directory, documented at https://hledger.org/scripts.html. More precisely, add-on commands are programs or scripts in your shell's PATH, whose name starts with "hledger-" and ends with no extension or a - recognised extension (".bat", ".com", ".exe", ".hs", ".js", ".lhs", - ".lua", ".php", ".pl", ".py", ".rb", ".rkt", or ".sh"), and (on unix + recognised extension (".bat", ".com", ".exe", ".hs", ".js", ".lhs", + ".lua", ".php", ".pl", ".py", ".rb", ".rkt", or ".sh"), and (on unix and mac) which has executable permission for the current user. You can run add-on commands using hledger, much like built-in commands: hledger ADDONCMD [-- ADDONCMDOPTS] [ADDONCMDARGS]. But note the double - hyphen argument, required before add-on-specific options. Eg: hledger - ui -- --watch or hledger web -- --serve. If this causes difficulty, + hyphen argument, required before add-on-specific options. Eg: hledger + ui -- --watch or hledger web -- --serve. If this causes difficulty, you can always run the add-on directly, without using hledger: hledger-ui --watch or hledger-web --serve. Options - Run hledger -h to see general command line help. Options can be writ- - ten either before or after the command name. These options are spe- + Run hledger -h to see general command line help. Options can be writ- + ten either before or after the command name. These options are spe- cific to the hledger CLI: Flags: @@ -334,14 +334,14 @@ Options --version show version information --debug=[1-9] show this much debug output (default: 1) - Usually hledger accepts any unambiguous flag prefix, eg you can write + Usually hledger accepts any unambiguous flag prefix, eg you can write --tl instead of --tldr or --dry instead of --dry-run. - If the same option appears more than once in a command, usually the + If the same option appears more than once in a command, usually the last (right-most) wins. - With most commands, arguments are interpreted as a hledger query which - filter the data. Some queries can be expressed either with options or + With most commands, arguments are interpreted as a hledger query which + filter the data. Some queries can be expressed either with options or with arguments. Below are more tips for using the command line interface - feel free to @@ -349,10 +349,10 @@ Options Special characters Single escaping (shell metacharacters) - In shell command lines, characters significant to your shell - such as - spaces, <, >, (, ), |, $ and \ - should be "shell-escaped" if you want - hledger to see them. This is done by enclosing them in single or dou- - ble quotes, or by writing a backslash before them. Eg to match an ac- + In shell command lines, characters significant to your shell - such as + spaces, <, >, (, ), |, $ and \ - should be "shell-escaped" if you want + hledger to see them. This is done by enclosing them in single or dou- + ble quotes, or by writing a backslash before them. Eg to match an ac- count name containing a space: $ hledger register 'credit card' @@ -361,17 +361,17 @@ Options $ hledger register credit\ card - Windows users should keep in mind that cmd treats single quote as a - regular character, so you should be using double quotes exclusively. + Windows users should keep in mind that cmd treats single quote as a + regular character, so you should be using double quotes exclusively. PowerShell treats both single and double quotes as quotes. Double escaping (regular expression metacharacters) - Characters significant in regular expressions (described below) - such - as ., ^, $, [, ], (, ), |, and \ - may need to be "regex-escaped" if - you don't want them to be interpreted by hledger's regular expression - engine. This is done by writing backslashes before them, but since - backslash is typically also a shell metacharacter, both shell-escaping - and regex-escaping will be needed. Eg to match a literal $ sign while + Characters significant in regular expressions (described below) - such + as ., ^, $, [, ], (, ), |, and \ - may need to be "regex-escaped" if + you don't want them to be interpreted by hledger's regular expression + engine. This is done by writing backslashes before them, but since + backslash is typically also a shell metacharacter, both shell-escaping + and regex-escaping will be needed. Eg to match a literal $ sign while using the bash shell: $ hledger balance cur:'\$' @@ -381,10 +381,10 @@ Options $ hledger balance cur:\\$ Triple escaping (for add-on commands) - When you use hledger to run an external add-on command (described be- + When you use hledger to run an external add-on command (described be- low), one level of shell-escaping is lost from any options or arguments - intended for by the add-on command, so those need an extra level of - shell-escaping. Eg to match a literal $ sign while using the bash + intended for by the add-on command, so those need an extra level of + shell-escaping. Eg to match a literal $ sign while using the bash shell and running an add-on command (ui): $ hledger ui cur:'\\$' @@ -400,14 +400,14 @@ Options double-escaped: \\$ triple-escaped: \\\\$ - Or, you can avoid the extra escaping by running the add-on executable + Or, you can avoid the extra escaping by running the add-on executable directly: $ hledger-ui cur:\\$ Less escaping Options and arguments are sometimes used in places other than the shell - command line, where shell-escaping is not needed, so there you should + command line, where shell-escaping is not needed, so there you should use one less level of escaping. Those places include: o an @argumentfile @@ -421,8 +421,8 @@ Options Unicode characters hledger is expected to handle non-ascii characters correctly: - o they should be parsed correctly in input files and on the command - line, by all hledger tools (add, iadd, hledger-web's search/add/edit + o they should be parsed correctly in input files and on the command + line, by all hledger tools (add, iadd, hledger-web's search/add/edit forms, etc.) o they should be displayed correctly by all hledger tools, and @@ -430,40 +430,40 @@ Options This requires a well-configured environment. Here are some tips: - o A system locale must be configured, and it must be one that can de- - code the characters being used. In bash, you can set a locale like - this: export LANG=en_US.UTF-8. There are some more details in Trou- - bleshooting. This step is essential - without it, hledger will quit - on encountering a non-ascii character (as with all GHC-compiled pro- + o A system locale must be configured, and it must be one that can de- + code the characters being used. In bash, you can set a locale like + this: export LANG=en_US.UTF-8. There are some more details in Trou- + bleshooting. This step is essential - without it, hledger will quit + on encountering a non-ascii character (as with all GHC-compiled pro- grams). - o Your terminal software (eg Terminal.app, iTerm, CMD.exe, xterm..) + o Your terminal software (eg Terminal.app, iTerm, CMD.exe, xterm..) must support unicode. On Windows, you may need to use Windows Termi- nal and/or enable UTF-8 support. o The terminal must be using a font which includes the required unicode glyphs. - o The terminal should be configured to display wide characters as dou- + o The terminal should be configured to display wide characters as dou- ble width (for report alignment). - o On Windows, for best results you should run hledger in the same kind - of environment in which it was built. Eg hledger built in the stan- - dard CMD.EXE environment (like the binaries on our download page) - might show display problems when run in a cygwin or msys terminal, + o On Windows, for best results you should run hledger in the same kind + of environment in which it was built. Eg hledger built in the stan- + dard CMD.EXE environment (like the binaries on our download page) + might show display problems when run in a cygwin or msys terminal, and vice versa. (See eg #961). Regular expressions - A regular expression (regexp) is a small piece of text where certain - characters (like ., ^, $, +, *, (), |, [], \) have special meanings, - forming a tiny language for matching text precisely - very useful in - hledger and elsewhere. To learn all about them, visit regular-expres- + A regular expression (regexp) is a small piece of text where certain + characters (like ., ^, $, +, *, (), |, [], \) have special meanings, + forming a tiny language for matching text precisely - very useful in + hledger and elsewhere. To learn all about them, visit regular-expres- sions.info. - hledger supports regexps whenever you are entering a pattern to match - something, eg in query arguments, account aliases, CSV if rules, + hledger supports regexps whenever you are entering a pattern to match + something, eg in query arguments, account aliases, CSV if rules, hledger-web's search form, hledger-ui's / search, etc. You may need to - wrap them in quotes, especially at the command line (see Special char- + wrap them in quotes, especially at the command line (see Special char- acters above). Here are some examples: Account name queries (quoted for command line use): @@ -519,57 +519,57 @@ Options & %date (29|30|31|01|02|03)$ hledger's regular expressions - hledger's regular expressions come from the regex-tdfa library. If - they're not doing what you expect, it's important to know exactly what + hledger's regular expressions come from the regex-tdfa library. If + they're not doing what you expect, it's important to know exactly what they support: 1. they are case insensitive - 2. they are infix matching (they do not need to match the entire thing + 2. they are infix matching (they do not need to match the entire thing being matched) 3. they are POSIX ERE (extended regular expressions) 4. they also support GNU word boundaries (\b, \B, \<, \>) - 5. backreferences are supported when doing text replacement in account - aliases or CSV rules, where backreferences can be used in the re- + 5. backreferences are supported when doing text replacement in account + aliases or CSV rules, where backreferences can be used in the re- placement string to reference capturing groups in the search regexp. Otherwise, if you write \1, it will match the digit 1. - 6. they do not support mode modifiers ((?s)), character classes (\w, + 6. they do not support mode modifiers ((?s)), character classes (\w, \d), or anything else not mentioned above. 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 In queries, to match a regular expression metacharacter like $ as a - literal character, prepend a backslash. Eg to search for amounts + o In queries, to match a regular expression metacharacter like $ as a + literal character, 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 at least once more. See Spe- cial characters. Argument files You can save a set of command line options and arguments in a file, and - then reuse them by writing @FILENAME as a command line argument. Eg: + then reuse them by writing @FILENAME as a command line argument. Eg: hledger bal @foo.args. - (Inside the argument file, each line should contain just one option or - argument. Don't use spaces except inside quotes; write = or nothing - between a flag and its argument. For the special characters mentioned - above, use one less level of quoting than you would at the command + (Inside the argument file, each line should contain just one option or + argument. Don't use spaces except inside quotes; write = or nothing + between a flag and its argument. For the special characters mentioned + above, use one less level of quoting than you would at the command prompt.) Argument files are now superseded by.. Config files - As of hledger 1.40, you can optionally save command line options (or - arguments) to be used when running hledger commands, in a config file. + As of hledger 1.40, you can optionally save command line options (or + arguments) to be used when running hledger commands, in a config file. Here's a small example: # General options are listed first, one or more per line. @@ -580,42 +580,67 @@ Options [print] --explicit --show-costs - To use a config file, specify it with the --conf option. Its options - will be inserted near the start of your command line (so you can over- - ride them if needed). Or, you can add a hledger --conf shebang line to - a config file and execute it like a script. + To use a config file, specify it with the --conf option. Its options + will be inserted near the start of your command line (so you can over- + ride them if needed). - Or, you can set up an automatic config file that is used whenever you - run hledger. This can be hledger.conf in the current directory or - above, or .hledger.conf in your home directory (~/.hledger.conf), or - hledger.conf in your XDG config directory (~/.con- + Or, you can set up an automatic config file that is used whenever you + run hledger. This can be hledger.conf in the current directory or + above, or .hledger.conf in your home directory (~/.hledger.conf), or + hledger.conf in your XDG config directory (~/.con- fig/hledger/hledger.conf). - You can ignore config files by adding the -n/--no-conf flag. This is - useful when using hledger in scripts, or when troubleshooting. (When - both --conf and --no-conf options are used, the right-most wins.) To + You can ignore config files by adding the -n/--no-conf flag. This is + useful when using hledger in scripts, or when troubleshooting. (When + both --conf and --no-conf options are used, the right-most wins.) To inspect the processing of config files, use --debug or --debug=8. - Here is another example config file you could start with: + Here is another example config file you could start with: https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample - Automatic config files are convenient, but have a cost: it's easy to - change a report's behaviour, or break scripts/applications which use - hledger, in unintended ways that will surprise you later. They change - the nature of hledger somewhat, making it less transparent and pre- - dictable. If you decide to use one, here are some tips: + Tips: + + Automatic config files are convenient, but have a cost: it's easy to + change a report's behaviour, or break scripts/applications which use + hledger, in unintended ways that will surprise you later. They change + the nature of hledger somewhat, making it less transparent and pre- + dictable. If you decide to use one: o Be conservative about what you put in it. Try to consider the effect on all your reports. - o Whenever a hledger command does not work as expected, try it again + o Whenever a hledger command does not work as expected, try it again with -n. - o If that helps, you can run it with --debug to see how a config file + o If that helps, you can run it with --debug to see how a config file affected it. - This feature has been added in hledger 1.40 and is considered experi- - mental. + On unix machines, you can add a shebang line at the top of a config + file, set executable permission on the file, and use it like a script. + Eg (some operating systems need the -S, some don't): + + #!/usr/bin/env -S hledger --conf + + You can put not only options, but also arguments in a config file. + This is probably more useful in special-purpose config files, not an + automatic one. + + There's an exception to this: a config file can't provide the command + argument, currently (#2231). If you need that, you can do it in the + shebang line instead. Eg: + + #!/usr/bin/env -S hledger balance --conf + + The config file feature has been added in hledger 1.40 and is consid- + ered experimental. + + Shell completions + If you use the bash shell, you can optionally set up context-sensitive + autocompletions when you press TAB in a hledger command line. At a + bash shell prompt, try pressing hledger (should list + all hledger commands) or hledger reg acct: (should list your + top-level account names). If completions aren't working, or for more + details, see Install > Shell completions. Output Output destination @@ -3276,6 +3301,9 @@ CSV Comments can contain tags, as usual. + Posting comments can also contain a posting date. A secondary date, or + a year-less date, will be ignored. + account field Assigning to accountN, where N is 1 to 99, sets the account name of the Nth posting, and causes that posting to be generated. @@ -4329,6 +4357,11 @@ Timedot space) will be ignored. This means the time log can also be a org outline. + Timedot files don't support directives like journal files. So a common + pattern is to have a main journal file (eg time.journal) that contains + any needed directives, and then includes the timedot file (include + time.timedot). + Timedot examples Numbers: @@ -7147,6 +7180,7 @@ Standard report commands balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) --cumulative accumulate amounts from report start (specified @@ -7178,6 +7212,9 @@ Standard report commands 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -7240,6 +7277,7 @@ Standard report commands balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) --cumulative accumulate amounts from report start (specified @@ -7271,6 +7309,9 @@ Standard report commands 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -7339,6 +7380,7 @@ Standard report commands balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) (default) --cumulative accumulate amounts from report start (specified @@ -7369,6 +7411,9 @@ Standard report commands 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -7428,6 +7473,7 @@ Standard report commands balance value minus cost basis) --budget show sum of posting amounts compared to budget goals defined by periodic transactions + --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports) (default) --cumulative accumulate amounts from report start (specified @@ -7458,6 +7504,9 @@ Standard report commands 'wide[,WIDTH]': all commodities on one line 'tall' : each commodity on a new line 'bare' : bare numbers, symbols in a column + --base-url=URLPREFIX in html output, generate hyperlinks to + hledger-web, with this prefix. (Usually the base + url shown by hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json. -o --output-file=FILE write output to FILE. A file extension matching @@ -7514,6 +7563,11 @@ Advanced report commands Flags: --sum show sum of posting amounts (default) + --valuechange show total change of value of period-end + historical balances (caused by deposits, + withdrawals, market price fluctuations) + --gain show unrealised capital gain/loss (historical + balance value minus cost basis) --budget[=DESCPAT] show sum of posting amounts together with budget goals defined by periodic transactions. With a DESCPAT argument (must be @@ -7521,11 +7575,6 @@ Advanced report commands use only periodic transactions with matching description (case insensitive substring match). - --valuechange show total change of value of period-end - historical balances (caused by deposits, - withdrawals, market price fluctuations) - --gain show unrealised capital gain/loss (historical - balance value minus cost basis) --count show the count of postings --change accumulate amounts from column start to column end (in multicolumn reports, default) @@ -7543,7 +7592,6 @@ Advanced report commands with -E) -A --average show a row average column (in multicolumn reports) - -r --related show postings' siblings instead -T --row-total show a row total column (in multicolumn reports) --summary-only display only row summaries (e.g. row total, average) (in multicolumn reports) @@ -7556,14 +7604,18 @@ Advanced report commands total, or by row average if that is displayed. -% --percent express values in percentage of each column's total + -r --related show the other accounts transacted with, instead --invert display all amounts with reversed sign - --transpose transpose rows and columns + --transpose switch rows and columns (use vertical time axis) --layout=ARG how to lay out multi-commodity amounts and the overall table: 'wide[,WIDTH]': commodities on one line 'tall' : commodities on separate lines 'bare' : commodity symbols in one column 'tidy' : every attribute in its own column + --base-url=URLPREFIX in html output, generate links to hledger-web, + with this prefix. (Usually the base url shown by + hledger-web; can also be relative.) -O --output-format=FMT select the output format. Supported formats: txt, html, csv, tsv, json, fods. -o --output-file=FILE write output to FILE. A file extension matching @@ -7879,6 +7931,14 @@ Advanced report commands $ hledger bal -% cur:\\$ $ hledger bal -% cur: + Hyperlinks + The HTML and FODS output formats can generate hyperlinks to a + hledger-web register view for each account and period. E.g. if your + hledger-web server is reachable at http://localhost:5000 then you might + run the balance command with the extra option --base-url=http://local- + host:5000. You can also produce relative links, like + --base-url="some/path" or --base-url="".) + Multi-period balance report With a report interval (set by the -D/--daily, -W/--weekly, -M/--monthly, -Q/--quarterly, -Y/--yearly, or -p/--period flag), bal-