diff --git a/hledger-lib/defs.m4 b/hledger-lib/defs.m4 index bdd331d09..60764108e 100644 --- a/hledger-lib/defs.m4 +++ b/hledger-lib/defs.m4 @@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion. m4_define({{_version_}}, {{1.17.99}})m4_dnl m4_dnl m4_dnl Date to show in man pages. Updated by make setdate. -m4_define({{_monthyear_}}, {{May 2020}})m4_dnl +m4_define({{_monthyear_}}, {{June 2020}})m4_dnl diff --git a/hledger-lib/hledger_csv.5 b/hledger-lib/hledger_csv.5 index 5066de42c..c11d04a59 100644 --- a/hledger-lib/hledger_csv.5 +++ b/hledger-lib/hledger_csv.5 @@ -1,6 +1,6 @@ .\"t -.TH "hledger_csv" "5" "May 2020" "hledger 1.17.99" "hledger User Manuals" +.TH "hledger_csv" "5" "June 2020" "hledger 1.17.99" "hledger User Manuals" diff --git a/hledger-lib/hledger_csv.txt b/hledger-lib/hledger_csv.txt index 2a0808dce..d3f8483dc 100644 --- a/hledger-lib/hledger_csv.txt +++ b/hledger-lib/hledger_csv.txt @@ -850,4 +850,4 @@ SEE ALSO -hledger 1.17.99 May 2020 hledger_csv(5) +hledger 1.17.99 June 2020 hledger_csv(5) diff --git a/hledger-lib/hledger_journal.5 b/hledger-lib/hledger_journal.5 index 003f9ea1a..c582fd175 100644 --- a/hledger-lib/hledger_journal.5 +++ b/hledger-lib/hledger_journal.5 @@ -1,6 +1,6 @@ .\"t -.TH "hledger_journal" "5" "May 2020" "hledger 1.17.99" "hledger User Manuals" +.TH "hledger_journal" "5" "June 2020" "hledger 1.17.99" "hledger User Manuals" @@ -1133,17 +1133,25 @@ directive, like this: .IP .nf \f[C] -include path/to/file.journal +include FILEPATH \f[R] .fi .PP -If the path does not begin with a slash, it is relative to the current -file. -The include file path may contain common glob patterns (e.g. -\f[C]*\f[R]). +Only journal files can include, and only journal, timeclock or timedot +files can be included (not CSV files, currently). .PP -The \f[C]include\f[R] directive can only be used in journal files. -It can include journal, timeclock or timedot files, but not CSV files. +If the file path does not begin with a slash, it is relative to the +current file\[aq]s folder. +.PP +It may contain glob patterns to match multiple files, eg: +\f[C]include *.journal\f[R]. +.PP +Or a tilde, meaning home directory: +\f[C]include \[ti]/main.journal\f[R]. +.PP +It may also be prefixed to force a specific file format, overriding the +file extension (as described in hledger.1 -> Input files): +\f[C]include timedot:\[ti]/notes/2020*.md\f[R]. .SS Default year .PP You can set a default year to be used for subsequent dates which @@ -1789,25 +1797,25 @@ Don\[aq]t accidentally write two spaces in the middle of your period expression. .SS Forecasting with periodic transactions .PP -With the \f[C]--forecast\f[R] flag, each periodic transaction rule -generates future transactions recurring at the specified interval. -These are not saved in the journal, but appear in all reports. -They will look like normal transactions, but with an extra tag: -.IP \[bu] 2 -\f[C]generated-transaction:\[ti] PERIODICEXPR\f[R] - shows that this was -generated by a periodic transaction rule, and the period +The \f[C]--forecast\f[R] flag activates any periodic transaction rules +in the journal. +They will generate temporary recurring transactions, which are not saved +in the journal, but will appear in all reports (eg print). +This can be useful for estimating balances into the future, or +experimenting with different scenarios. +Or, it can be used as a data entry aid: describe recurring transactions, +and every so often copy the output of \f[C]print --forecast\f[R] into +the journal. .PP -There is also a hidden tag, with an underscore prefix, which does not -appear in hledger\[aq]s output: -.IP \[bu] 2 -\f[C]_generated-transaction:\[ti] PERIODICEXPR\f[R] +These transactions will have an extra tag indicating which periodic rule +generated them: \f[C]generated-transaction:\[ti] PERIODICEXPR\f[R]. +And a similar, hidden tag (beginning with an underscore) which, because +it\[aq]s never displayed by print, can be used to match transactions +generated \[dq]just now\[dq]: +\f[C]_generated-transaction:\[ti] PERIODICEXPR\f[R]. .PP -This can be used to match transactions generated \[dq]just now\[dq], -rather than generated in the past and saved to the journal. -.PP -Forecast transactions start on the first occurrence, and end on the last -occurrence, of their interval within the forecast period. -The forecast period: +Periodic transactions are generated within some forecast period. +By default, this .IP \[bu] 2 begins on the later of .RS 2 @@ -1818,27 +1826,26 @@ the day after the latest normal (non-periodic) transaction in the journal, or today if there are no normal transactions. .RE .IP \[bu] 2 -ends on the report end date if specified with -e/-p/date:, or 180 days -from today. +ends on the report end date if specified with -e/-p/date:, or 6 months +(180 days) from today. .PP -where \[dq]today\[dq] means the current date at report time. -The \[dq]later of\[dq] rule ensures that forecast transactions do not -overlap normal transactions in time; they will begin only after normal -transactions end. +This means that periodic transactions will begin only after the latest +recorded transaction. +And a recorded transaction dated in the future can prevent generation of +periodic transactions. +(You can avoid that by writing the future transaction as a one-time +periodic rule instead - put tilde before the date, eg +\f[C]\[ti] YYYY-MM-DD ...\f[R]). .PP -Forecasting can be useful for estimating balances into the future, and -experimenting with different scenarios. -Note the start date logic means that forecasted transactions are -automatically replaced by normal transactions as you add those. -.PP -Forecasting can also help with data entry: describe most of your -transactions with periodic rules, and every so often copy the output of -\f[C]print --forecast\f[R] to the journal. -.PP -You can generate one-time transactions too: just write a period -expression specifying a date with no report interval. -(You could also write a normal transaction with a future date, but -remember this disables forecast transactions on previous dates.) +Or, you can set your own arbitrary \[dq]forecast period\[dq], which can +overlap recorded transactions, and need not be in the future, by +providing an option argument, like \f[C]--forecast=PERIODEXPR\f[R]. +Note the equals sign is required, a space won\[aq]t work. +PERIODEXPR is a period expression, which can specify the start date, end +date, or both, like in a \f[C]date:\f[R] query. +(See also hledger.1 -> Report start & end date). +Some examples: \f[C]--forecast=202001-202004\f[R], +\f[C]--forecast=jan-\f[R], \f[C]--forecast=2020\f[R]. .SS Budgeting with periodic transactions .PP With the \f[C]--budget\f[R] flag, currently supported by the balance diff --git a/hledger-lib/hledger_journal.info b/hledger-lib/hledger_journal.info index 754ab8f55..ecf299fe2 100644 --- a/hledger-lib/hledger_journal.info +++ b/hledger-lib/hledger_journal.info @@ -1015,14 +1015,22 @@ File: hledger_journal.info, Node: Including other files, Next: Default year, You can pull in the content of additional files by writing an include directive, like this: -include path/to/file.journal +include FILEPATH - If the path does not begin with a slash, it is relative to the -current file. The include file path may contain common glob patterns -(e.g. '*'). + Only journal files can include, and only journal, timeclock or +timedot files can be included (not CSV files, currently). - The 'include' directive can only be used in journal files. It can -include journal, timeclock or timedot files, but not CSV files. + If the file path does not begin with a slash, it is relative to the +current file's folder. + + It may contain glob patterns to match multiple files, eg: 'include +*.journal'. + + Or a tilde, meaning home directory: 'include ~/main.journal'. + + It may also be prefixed to force a specific file format, overriding +the file extension (as described in hledger.1 -> Input files): 'include +timedot:~/notes/2020*.md'.  File: hledger_journal.info, Node: Default year, Next: Declaring commodities, Prev: Including other files, Up: Directives @@ -1620,52 +1628,45 @@ File: hledger_journal.info, Node: Forecasting with periodic transactions, Next 1.14.3 Forecasting with periodic transactions --------------------------------------------- -With the '--forecast' flag, each periodic transaction rule generates -future transactions recurring at the specified interval. These are not -saved in the journal, but appear in all reports. They will look like -normal transactions, but with an extra tag: +The '--forecast' flag activates any periodic transaction rules in the +journal. They will generate temporary recurring transactions, which are +not saved in the journal, but will appear in all reports (eg print). +This can be useful for estimating balances into the future, or +experimenting with different scenarios. Or, it can be used as a data +entry aid: describe recurring transactions, and every so often copy the +output of 'print --forecast' into the journal. - * 'generated-transaction:~ PERIODICEXPR' - shows that this was - generated by a periodic transaction rule, and the period + These transactions will have an extra tag indicating which periodic +rule generated them: 'generated-transaction:~ PERIODICEXPR'. And a +similar, hidden tag (beginning with an underscore) which, because it's +never displayed by print, can be used to match transactions generated +"just now": '_generated-transaction:~ PERIODICEXPR'. - There is also a hidden tag, with an underscore prefix, which does not -appear in hledger's output: - - * '_generated-transaction:~ PERIODICEXPR' - - This can be used to match transactions generated "just now", rather -than generated in the past and saved to the journal. - - Forecast transactions start on the first occurrence, and end on the -last occurrence, of their interval within the forecast period. The -forecast period: + Periodic transactions are generated within some forecast period. By +default, this * begins on the later of * the report start date if specified with -b/-p/date: * the day after the latest normal (non-periodic) transaction in the journal, or today if there are no normal transactions. - * ends on the report end date if specified with -e/-p/date:, or 180 - days from today. + * ends on the report end date if specified with -e/-p/date:, or 6 + months (180 days) from today. - where "today" means the current date at report time. The "later of" -rule ensures that forecast transactions do not overlap normal -transactions in time; they will begin only after normal transactions -end. + This means that periodic transactions will begin only after the +latest recorded transaction. And a recorded transaction dated in the +future can prevent generation of periodic transactions. (You can avoid +that by writing the future transaction as a one-time periodic rule +instead - put tilde before the date, eg '~ YYYY-MM-DD ...'). - Forecasting can be useful for estimating balances into the future, -and experimenting with different scenarios. Note the start date logic -means that forecasted transactions are automatically replaced by normal -transactions as you add those. - - Forecasting can also help with data entry: describe most of your -transactions with periodic rules, and every so often copy the output of -'print --forecast' to the journal. - - You can generate one-time transactions too: just write a period -expression specifying a date with no report interval. (You could also -write a normal transaction with a future date, but remember this -disables forecast transactions on previous dates.) + Or, you can set your own arbitrary "forecast period", which can +overlap recorded transactions, and need not be in the future, by +providing an option argument, like '--forecast=PERIODEXPR'. Note the +equals sign is required, a space won't work. PERIODEXPR is a period +expression, which can specify the start date, end date, or both, like in +a 'date:' query. (See also hledger.1 -> Report start & end date). Some +examples: '--forecast=202001-202004', '--forecast=jan-', +'--forecast=2020'.  File: hledger_journal.info, Node: Budgeting with periodic transactions, Prev: Forecasting with periodic transactions, Up: Periodic transactions @@ -1888,58 +1889,58 @@ Node: Comment blocks37860 Ref: #comment-blocks38043 Node: Including other files38219 Ref: #including-other-files38399 -Node: Default year38807 -Ref: #default-year38976 -Node: Declaring commodities39383 -Ref: #declaring-commodities39566 -Node: Default commodity41372 -Ref: #default-commodity41558 -Node: Declaring market prices42447 -Ref: #declaring-market-prices42642 -Node: Declaring accounts43499 -Ref: #declaring-accounts43685 -Node: Account comments44610 -Ref: #account-comments44773 -Node: Account subdirectives45197 -Ref: #account-subdirectives45392 -Node: Account types45705 -Ref: #account-types45889 -Node: Account display order47528 -Ref: #account-display-order47698 -Node: Rewriting accounts48849 -Ref: #rewriting-accounts49034 -Node: Basic aliases49791 -Ref: #basic-aliases49937 -Node: Regex aliases50641 -Ref: #regex-aliases50813 -Node: Combining aliases51531 -Ref: #combining-aliases51724 -Node: Aliases and multiple files53000 -Ref: #aliases-and-multiple-files53209 -Node: end aliases53788 -Ref: #end-aliases53945 -Node: Default parent account54046 -Ref: #default-parent-account54214 -Node: Periodic transactions55098 -Ref: #periodic-transactions55273 -Node: Periodic rule syntax57145 -Ref: #periodic-rule-syntax57351 -Node: Two spaces between period expression and description!58055 -Ref: #two-spaces-between-period-expression-and-description58374 -Node: Forecasting with periodic transactions59058 -Ref: #forecasting-with-periodic-transactions59363 -Node: Budgeting with periodic transactions61389 -Ref: #budgeting-with-periodic-transactions61628 -Node: Auto postings62077 -Ref: #auto-postings62217 -Node: Auto postings and multiple files64396 -Ref: #auto-postings-and-multiple-files64600 -Node: Auto postings and dates64809 -Ref: #auto-postings-and-dates65083 -Node: Auto postings and transaction balancing / inferred amounts / balance assertions65258 -Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions65609 -Node: Auto posting tags65951 -Ref: #auto-posting-tags66166 +Node: Default year39050 +Ref: #default-year39219 +Node: Declaring commodities39626 +Ref: #declaring-commodities39809 +Node: Default commodity41615 +Ref: #default-commodity41801 +Node: Declaring market prices42690 +Ref: #declaring-market-prices42885 +Node: Declaring accounts43742 +Ref: #declaring-accounts43928 +Node: Account comments44853 +Ref: #account-comments45016 +Node: Account subdirectives45440 +Ref: #account-subdirectives45635 +Node: Account types45948 +Ref: #account-types46132 +Node: Account display order47771 +Ref: #account-display-order47941 +Node: Rewriting accounts49092 +Ref: #rewriting-accounts49277 +Node: Basic aliases50034 +Ref: #basic-aliases50180 +Node: Regex aliases50884 +Ref: #regex-aliases51056 +Node: Combining aliases51774 +Ref: #combining-aliases51967 +Node: Aliases and multiple files53243 +Ref: #aliases-and-multiple-files53452 +Node: end aliases54031 +Ref: #end-aliases54188 +Node: Default parent account54289 +Ref: #default-parent-account54457 +Node: Periodic transactions55341 +Ref: #periodic-transactions55516 +Node: Periodic rule syntax57388 +Ref: #periodic-rule-syntax57594 +Node: Two spaces between period expression and description!58298 +Ref: #two-spaces-between-period-expression-and-description58617 +Node: Forecasting with periodic transactions59301 +Ref: #forecasting-with-periodic-transactions59606 +Node: Budgeting with periodic transactions61661 +Ref: #budgeting-with-periodic-transactions61900 +Node: Auto postings62349 +Ref: #auto-postings62489 +Node: Auto postings and multiple files64668 +Ref: #auto-postings-and-multiple-files64872 +Node: Auto postings and dates65081 +Ref: #auto-postings-and-dates65355 +Node: Auto postings and transaction balancing / inferred amounts / balance assertions65530 +Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions65881 +Node: Auto posting tags66223 +Ref: #auto-posting-tags66438  End Tag Table diff --git a/hledger-lib/hledger_journal.txt b/hledger-lib/hledger_journal.txt index 64167514f..6307fc8ba 100644 --- a/hledger-lib/hledger_journal.txt +++ b/hledger-lib/hledger_journal.txt @@ -784,14 +784,22 @@ FILE FORMAT You can pull in the content of additional files by writing an include directive, like this: - include path/to/file.journal + include FILEPATH - If the path does not begin with a slash, it is relative to the current - file. The include file path may contain common glob patterns (e.g. - *). + Only journal files can include, and only journal, timeclock or timedot + files can be included (not CSV files, currently). - The include directive can only be used in journal files. It can in- - clude journal, timeclock or timedot files, but not CSV files. + If the file path does not begin with a slash, it is relative to the + current file's folder. + + It may contain glob patterns to match multiple files, eg: include + *.journal. + + Or a tilde, meaning home directory: include ~/main.journal. + + It may also be prefixed to force a specific file format, overriding the + file extension (as described in hledger.1 -> Input files): include + timedot:~/notes/2020*.md. Default year You can set a default year to be used for subsequent dates which don't @@ -1285,68 +1293,61 @@ FILE FORMAT pression. Forecasting with periodic transactions - With the --forecast flag, each periodic transaction rule generates fu- - ture transactions recurring at the specified interval. These are not - saved in the journal, but appear in all reports. They will look like - normal transactions, but with an extra tag: + The --forecast flag activates any periodic transaction rules in the + journal. They will generate temporary recurring transactions, which + are not saved in the journal, but will appear in all reports (eg + print). This can be useful for estimating balances into the future, or + experimenting with different scenarios. Or, it can be used as a data + entry aid: describe recurring transactions, and every so often copy the + output of print --forecast into the journal. - o generated-transaction:~ PERIODICEXPR - shows that this was generated - by a periodic transaction rule, and the period + These transactions will have an extra tag indicating which periodic + rule generated them: generated-transaction:~ PERIODICEXPR. And a simi- + lar, hidden tag (beginning with an underscore) which, because it's + never displayed by print, can be used to match transactions generated + "just now": _generated-transaction:~ PERIODICEXPR. - There is also a hidden tag, with an underscore prefix, which does not - appear in hledger's output: - - o _generated-transaction:~ PERIODICEXPR - - This can be used to match transactions generated "just now", rather - than generated in the past and saved to the journal. - - Forecast transactions start on the first occurrence, and end on the - last occurrence, of their interval within the forecast period. The - forecast period: + Periodic transactions are generated within some forecast period. By + default, this o begins on the later of o the report start date if specified with -b/-p/date: - o the day after the latest normal (non-periodic) transaction in the + o the day after the latest normal (non-periodic) transaction in the journal, or today if there are no normal transactions. - o ends on the report end date if specified with -e/-p/date:, or 180 - days from today. + o ends on the report end date if specified with -e/-p/date:, or 6 + months (180 days) from today. - where "today" means the current date at report time. The "later of" - rule ensures that forecast transactions do not overlap normal transac- - tions in time; they will begin only after normal transactions end. + This means that periodic transactions will begin only after the latest + recorded transaction. And a recorded transaction dated in the future + can prevent generation of periodic transactions. (You can avoid that + by writing the future transaction as a one-time periodic rule instead - + put tilde before the date, eg ~ YYYY-MM-DD ...). - Forecasting can be useful for estimating balances into the future, and - experimenting with different scenarios. Note the start date logic - means that forecasted transactions are automatically replaced by normal - transactions as you add those. - - Forecasting can also help with data entry: describe most of your trans- - actions with periodic rules, and every so often copy the output of - print --forecast to the journal. - - You can generate one-time transactions too: just write a period expres- - sion specifying a date with no report interval. (You could also write - a normal transaction with a future date, but remember this disables - forecast transactions on previous dates.) + Or, you can set your own arbitrary "forecast period", which can overlap + recorded transactions, and need not be in the future, by providing an + option argument, like --forecast=PERIODEXPR. Note the equals sign is + required, a space won't work. PERIODEXPR is a period expression, which + can specify the start date, end date, or both, like in a date: query. + (See also hledger.1 -> Report start & end date). Some examples: + --forecast=202001-202004, --forecast=jan-, --forecast=2020. Budgeting with periodic transactions - With the --budget flag, currently supported by the balance command, - each periodic transaction rule declares recurring budget goals for the - specified accounts. Eg the first example above declares a goal of - spending $2000 on rent (and also, a goal of depositing $2000 into - checking) every month. Goals and actual performance can then be com- + With the --budget flag, currently supported by the balance command, + each periodic transaction rule declares recurring budget goals for the + specified accounts. Eg the first example above declares a goal of + spending $2000 on rent (and also, a goal of depositing $2000 into + checking) every month. Goals and actual performance can then be com- pared in budget reports. - For more details, see: balance: Budget report and Budgeting and Fore- + For more details, see: balance: Budget report and Budgeting and Fore- casting. Auto postings - "Automated postings" or "auto postings" are extra postings which get - added automatically to transactions which match certain queries, de- + "Automated postings" or "auto postings" are extra postings which get + added automatically to transactions which match certain queries, de- fined by "auto posting rules", when you use the --auto flag. An auto posting rule looks a bit like a transaction: @@ -1356,27 +1357,27 @@ FILE FORMAT ... ACCOUNT [AMOUNT] - except the first line is an equals sign (mnemonic: = suggests match- - ing), followed by a query (which matches existing postings), and each - "posting" line describes a posting to be generated, and the posting + except the first line is an equals sign (mnemonic: = suggests match- + ing), followed by a query (which matches existing postings), and each + "posting" line describes a posting to be generated, and the posting amounts can be: - o a normal amount with a commodity symbol, eg $2. This will be used + o a normal amount with a commodity symbol, eg $2. This will be used as-is. o a number, eg 2. The commodity symbol (if any) from the matched post- ing will be added to this. - o a numeric multiplier, eg *2 (a star followed by a number N). The + o a numeric multiplier, eg *2 (a star followed by a number N). The matched posting's amount (and total price, if any) will be multiplied by N. - o a multiplier with a commodity symbol, eg *$2 (a star, number N, and + o a multiplier with a commodity symbol, eg *$2 (a star, number N, and symbol S). The matched posting's amount will be multiplied by N, and its commodity symbol will be replaced with S. - Any query term containing spaces must be enclosed in single or double - quotes, as on the command line. Eg, note the quotes around the second + Any query term containing spaces must be enclosed in single or double + quotes, as on the command line. Eg, note the quotes around the second query term below: = expenses:groceries 'expenses:dining out' @@ -1415,24 +1416,24 @@ FILE FORMAT Auto postings and multiple files An auto posting rule can affect any transaction in the current file, or - in any parent file or child file. Note, currently it will not affect + in any parent file or child file. Note, currently it will not affect sibling files (when multiple -f/--file are used - see #1212). Auto postings and dates - A posting date (or secondary date) in the matched posting, or (taking - precedence) a posting date in the auto posting rule itself, will also + A posting date (or secondary date) in the matched posting, or (taking + precedence) a posting date in the auto posting rule itself, will also be used in the generated posting. Auto postings and transaction balancing / inferred amounts / balance asser- tions Currently, auto postings are added: - o after missing amounts are inferred, and transactions are checked for + o after missing amounts are inferred, and transactions are checked for balancedness, o but before balance assertions are checked. - Note this means that journal entries must be balanced both before and + Note this means that journal entries must be balanced both before and after auto postings are added. This changed in hledger 1.12+; see #893 for background. @@ -1442,11 +1443,11 @@ FILE FORMAT o generated-posting:= QUERY - shows this was generated by an auto post- ing rule, and the query - o _generated-posting:= QUERY - a hidden tag, which does not appear in + o _generated-posting:= QUERY - a hidden tag, which does not appear in hledger's output. This can be used to match postings generated "just now", rather than generated in the past and saved to the journal. - Also, any transaction that has been changed by auto posting rules will + Also, any transaction that has been changed by auto posting rules will have these tags added: o modified: - this transaction was modified @@ -1457,7 +1458,7 @@ FILE FORMAT REPORTING BUGS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -1471,7 +1472,7 @@ COPYRIGHT SEE ALSO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1) @@ -1479,4 +1480,4 @@ SEE ALSO -hledger 1.17.99 May 2020 hledger_journal(5) +hledger 1.17.99 June 2020 hledger_journal(5) diff --git a/hledger-lib/hledger_timeclock.5 b/hledger-lib/hledger_timeclock.5 index 1b1ed13eb..294fa1d43 100644 --- a/hledger-lib/hledger_timeclock.5 +++ b/hledger-lib/hledger_timeclock.5 @@ -1,5 +1,5 @@ -.TH "hledger_timeclock" "5" "May 2020" "hledger 1.17.99" "hledger User Manuals" +.TH "hledger_timeclock" "5" "June 2020" "hledger 1.17.99" "hledger User Manuals" diff --git a/hledger-lib/hledger_timeclock.txt b/hledger-lib/hledger_timeclock.txt index 049a3d09c..70ff1dbc3 100644 --- a/hledger-lib/hledger_timeclock.txt +++ b/hledger-lib/hledger_timeclock.txt @@ -78,4 +78,4 @@ SEE ALSO -hledger 1.17.99 May 2020 hledger_timeclock(5) +hledger 1.17.99 June 2020 hledger_timeclock(5) diff --git a/hledger-lib/hledger_timedot.5 b/hledger-lib/hledger_timedot.5 index f366555bb..60d6b1498 100644 --- a/hledger-lib/hledger_timedot.5 +++ b/hledger-lib/hledger_timedot.5 @@ -1,5 +1,5 @@ -.TH "hledger_timedot" "5" "May 2020" "hledger 1.17.99" "hledger User Manuals" +.TH "hledger_timedot" "5" "June 2020" "hledger 1.17.99" "hledger User Manuals" diff --git a/hledger-lib/hledger_timedot.txt b/hledger-lib/hledger_timedot.txt index 0f52b6a92..5f2b4d41c 100644 --- a/hledger-lib/hledger_timedot.txt +++ b/hledger-lib/hledger_timedot.txt @@ -161,4 +161,4 @@ SEE ALSO -hledger 1.17.99 May 2020 hledger_timedot(5) +hledger 1.17.99 June 2020 hledger_timedot(5) diff --git a/hledger-ui/defs.m4 b/hledger-ui/defs.m4 index bdd331d09..60764108e 100644 --- a/hledger-ui/defs.m4 +++ b/hledger-ui/defs.m4 @@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion. m4_define({{_version_}}, {{1.17.99}})m4_dnl m4_dnl m4_dnl Date to show in man pages. Updated by make setdate. -m4_define({{_monthyear_}}, {{May 2020}})m4_dnl +m4_define({{_monthyear_}}, {{June 2020}})m4_dnl diff --git a/hledger-ui/hledger-ui.1 b/hledger-ui/hledger-ui.1 index bcc31c26e..1a2e500e3 100644 --- a/hledger-ui/hledger-ui.1 +++ b/hledger-ui/hledger-ui.1 @@ -1,5 +1,5 @@ -.TH "hledger-ui" "1" "May 2020" "hledger-ui 1.17.99" "hledger User Manuals" +.TH "hledger-ui" "1" "June 2020" "hledger-ui 1.17.99" "hledger User Manuals" diff --git a/hledger-ui/hledger-ui.txt b/hledger-ui/hledger-ui.txt index b6d2ba4bb..093ec9b3c 100644 --- a/hledger-ui/hledger-ui.txt +++ b/hledger-ui/hledger-ui.txt @@ -441,4 +441,4 @@ SEE ALSO -hledger-ui 1.17.99 May 2020 hledger-ui(1) +hledger-ui 1.17.99 June 2020 hledger-ui(1) diff --git a/hledger-web/defs.m4 b/hledger-web/defs.m4 index bdd331d09..60764108e 100644 --- a/hledger-web/defs.m4 +++ b/hledger-web/defs.m4 @@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion. m4_define({{_version_}}, {{1.17.99}})m4_dnl m4_dnl m4_dnl Date to show in man pages. Updated by make setdate. -m4_define({{_monthyear_}}, {{May 2020}})m4_dnl +m4_define({{_monthyear_}}, {{June 2020}})m4_dnl diff --git a/hledger-web/hledger-web.1 b/hledger-web/hledger-web.1 index 5cf21245c..6d4e48443 100644 --- a/hledger-web/hledger-web.1 +++ b/hledger-web/hledger-web.1 @@ -1,5 +1,5 @@ -.TH "hledger-web" "1" "May 2020" "hledger-web 1.17.99" "hledger User Manuals" +.TH "hledger-web" "1" "June 2020" "hledger-web 1.17.99" "hledger User Manuals" diff --git a/hledger-web/hledger-web.txt b/hledger-web/hledger-web.txt index 4a543f307..a4195ca7e 100644 --- a/hledger-web/hledger-web.txt +++ b/hledger-web/hledger-web.txt @@ -533,4 +533,4 @@ SEE ALSO -hledger-web 1.17.99 May 2020 hledger-web(1) +hledger-web 1.17.99 June 2020 hledger-web(1) diff --git a/hledger/defs.m4 b/hledger/defs.m4 index bdd331d09..60764108e 100644 --- a/hledger/defs.m4 +++ b/hledger/defs.m4 @@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion. m4_define({{_version_}}, {{1.17.99}})m4_dnl m4_dnl m4_dnl Date to show in man pages. Updated by make setdate. -m4_define({{_monthyear_}}, {{May 2020}})m4_dnl +m4_define({{_monthyear_}}, {{June 2020}})m4_dnl diff --git a/hledger/hledger.1 b/hledger/hledger.1 index 54af914b2..655e8dac9 100644 --- a/hledger/hledger.1 +++ b/hledger/hledger.1 @@ -1,6 +1,6 @@ .\"t -.TH "hledger" "1" "May 2020" "hledger 1.17.99" "hledger User Manuals" +.TH "hledger" "1" "June 2020" "hledger 1.17.99" "hledger User Manuals" @@ -1101,15 +1101,6 @@ To understand the JSON, read the Haskell type definitions, which are mostly in https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs. .IP \[bu] 2 -The JSON output from hledger commands is essentially the same as the -JSON served by hledger-web\[aq]s JSON API, but pretty printed, using -line breaks and indentation. -Our pretty printer has the ability to elide data in certain cases - -rendering non-strings as if they were strings, or displaying -\[dq]FOO..\[dq] instead of FOO\[aq]s full details. -This should never happen in hledger\[aq]s JSON output; if you see -otherwise, please report as a bug. -.IP \[bu] 2 hledger represents quantities as Decimal values storing up to 255 significant digits, eg for repeating decimals. Such numbers can arise in practice (from automatically-calculated @@ -1298,7 +1289,7 @@ Examples: .PP .TS tab(@); -lw(11.9n) lw(58.1n). +lw(12.4n) lw(57.6n). T{ \f[C]-b 2016/3/17\f[R] T}@T{ @@ -1321,16 +1312,17 @@ T}@T{ all transactions in the current month T} T{ -\f[C]date:2016/3/17-\f[R] +\f[C]date:2016/3/17..\f[R] T}@T{ -the above written as queries instead +the above written as queries instead (\f[C]..\f[R] can also be replaced +with \f[C]-\f[R]) T} T{ -\f[C]date:-12/1\f[R] +\f[C]date:..12/1\f[R] T}@T{ T} T{ -\f[C]date:thismonth-\f[R] +\f[C]date:thismonth..\f[R] T}@T{ T} T{ @@ -1362,7 +1354,7 @@ exclusive: .PP Keywords like \[dq]from\[dq] and \[dq]to\[dq] are optional, and so are the spaces, as long as you don\[aq]t run two dates together. -\[dq]to\[dq] can also be written as \[dq]-\[dq]. +\[dq]to\[dq] can also be written as \[dq]..\[dq] or \[dq]-\[dq]. These are equivalent to the above: .PP .TS @@ -1375,7 +1367,7 @@ T{ \f[C]-p2009/1/1to2009/4/1\f[R] T} T{ -\f[C]-p2009/1/1-2009/4/1\f[R] +\f[C]-p2009/1/1..2009/4/1\f[R] T} .TE .PP @@ -1602,8 +1594,7 @@ like account, balance and register will show only the uppermost accounts in the account tree, down to level N. Use this when you want a summary with less detail. This flag has the same effect as a \f[C]depth:\f[R] query argument (so -\f[C]-2\f[R], \f[C]--depth=2\f[R] or \f[C]depth:2\f[R] are basically -equivalent). +\f[C]-2\f[R], \f[C]--depth=2\f[R] or \f[C]depth:2\f[R] are equivalent). .SS Pivoting .PP Normally hledger sums amounts, and organizes them in a hierarchy, based diff --git a/hledger/hledger.info b/hledger/hledger.info index 855a8f26d..6d5a09f14 100644 --- a/hledger/hledger.info +++ b/hledger/hledger.info @@ -1021,14 +1021,6 @@ $ hledger balancesheet -o foo.txt -O html # write HTML to foo.txt JSON, read the Haskell type definitions, which are mostly in https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs. - * The JSON output from hledger commands is essentially the same as - the JSON served by hledger-web's JSON API, but pretty printed, - using line breaks and indentation. Our pretty printer has the - ability to elide data in certain cases - rendering non-strings as - if they were strings, or displaying "FOO.." instead of FOO's full - details. This should never happen in hledger's JSON output; if you - see otherwise, please report as a bug. - * hledger represents quantities as Decimal values storing up to 255 significant digits, eg for repeating decimals. Such numbers can arise in practice (from automatically-calculated transaction @@ -1151,17 +1143,18 @@ these accept the smart date syntax. Examples: -'-b begin on St. Patrick's day 2016 +'-b begin on St. Patrick's day 2016 2016/3/17' -'-e 12/1' end at the start of december 1st of the current year - (11/30 will be the last date included) -'-b all transactions on or after the 1st of the current month +'-e 12/1' end at the start of december 1st of the current year + (11/30 will be the last date included) +'-b all transactions on or after the 1st of the current month thismonth' -'-p all transactions in the current month +'-p all transactions in the current month thismonth' -'date:2016/3/17-'the above written as queries instead -'date:-12/1' -'date:thismonth-' +'date:2016/3/17..'the above written as queries instead ('..' can also be + replaced with '-') +'date:..12/1' +'date:thismonth..' 'date:thismonth'  @@ -1194,11 +1187,11 @@ dates as exclusive: Keywords like "from" and "to" are optional, and so are the spaces, as long as you don't run two dates together. "to" can also be written as -"-". These are equivalent to the above: +".." or "-". These are equivalent to the above: '-p "2009/1/1 2009/4/1"' '-p2009/1/1to2009/4/1' -'-p2009/1/1-2009/4/1' +'-p2009/1/1..2009/4/1' Dates are smart dates, so if the current year is 2009, the above can also be written as: @@ -1305,7 +1298,7 @@ With the '--depth N' option (short form: '-N'), commands like account, balance and register will show only the uppermost accounts in the account tree, down to level N. Use this when you want a summary with less detail. This flag has the same effect as a 'depth:' query argument -(so '-2', '--depth=2' or 'depth:2' are basically equivalent). +(so '-2', '--depth=2' or 'depth:2' are equivalent).  File: hledger.info, Node: Pivoting, Next: Valuation, Prev: Depth limiting, Up: OPTIONS @@ -3827,143 +3820,143 @@ Node: Output destination31999 Ref: #output-destination32151 Node: Output format32576 Ref: #output-format32726 -Node: Regular expressions34774 -Ref: #regular-expressions34931 -Node: Smart dates36667 -Ref: #smart-dates36818 -Node: Report start & end date38179 -Ref: #report-start-end-date38351 -Node: Report intervals39789 -Ref: #report-intervals39954 -Node: Period expressions40344 -Ref: #period-expressions40504 -Node: Depth limiting44630 -Ref: #depth-limiting44774 -Node: Pivoting45116 -Ref: #pivoting45239 -Node: Valuation46915 -Ref: #valuation47017 -Node: -B Cost47937 -Ref: #b-cost48041 -Node: -V Value48213 -Ref: #v-value48366 -Node: -X Market value in specified commodity49639 -Ref: #x-market-value-in-specified-commodity49858 -Node: Market prices50036 -Ref: #market-prices50221 -Node: --value Flexible valuation51146 -Ref: #value-flexible-valuation51347 -Node: Effect of --value on reports55852 -Ref: #effect-of---value-on-reports56033 -Node: COMMANDS61579 -Ref: #commands61687 -Node: accounts62771 -Ref: #accounts62869 -Node: activity63568 -Ref: #activity63678 -Node: add64061 -Ref: #add64160 -Node: balance66899 -Ref: #balance67010 -Node: Classic balance report68468 -Ref: #classic-balance-report68641 -Node: Customising the classic balance report70010 -Ref: #customising-the-classic-balance-report70238 -Node: Colour support72314 -Ref: #colour-support72481 -Node: Flat mode72654 -Ref: #flat-mode72802 -Node: Depth limited balance reports73215 -Ref: #depth-limited-balance-reports73400 -Node: Percentages73856 -Ref: #percentages74022 -Node: Multicolumn balance report75159 -Ref: #multicolumn-balance-report75339 -Node: Budget report80601 -Ref: #budget-report80744 -Node: Nested budgets86010 -Ref: #nested-budgets86122 -Ref: #output-format-189603 -Node: balancesheet89800 -Ref: #balancesheet89936 -Node: balancesheetequity91402 -Ref: #balancesheetequity91551 -Node: cashflow92274 -Ref: #cashflow92402 -Node: check-dates93581 -Ref: #check-dates93708 -Node: check-dupes93987 -Ref: #check-dupes94111 -Node: close94404 -Ref: #close94518 -Node: close usage96040 -Ref: #close-usage96133 -Node: commodities98946 -Ref: #commodities99073 -Node: descriptions99155 -Ref: #descriptions99283 -Node: diff99464 -Ref: #diff99570 -Node: files100617 -Ref: #files100717 -Node: help100864 -Ref: #help100964 -Node: import102045 -Ref: #import102159 -Node: Importing balance assignments103052 -Ref: #importing-balance-assignments103200 -Node: incomestatement103849 -Ref: #incomestatement103982 -Node: notes105469 -Ref: #notes105582 -Node: payees105708 -Ref: #payees105814 -Node: prices105972 -Ref: #prices106078 -Node: print106419 -Ref: #print106529 -Node: print-unique111315 -Ref: #print-unique111441 -Node: register111726 -Ref: #register111853 -Node: Custom register output116025 -Ref: #custom-register-output116154 -Node: register-match117491 -Ref: #register-match117625 -Node: rewrite117976 -Ref: #rewrite118091 -Node: Re-write rules in a file119946 -Ref: #re-write-rules-in-a-file120080 -Node: Diff output format121290 -Ref: #diff-output-format121459 -Node: rewrite vs print --auto122551 -Ref: #rewrite-vs.-print---auto122730 -Node: roi123286 -Ref: #roi123384 -Node: stats124396 -Ref: #stats124495 -Node: tags125283 -Ref: #tags125381 -Node: test125675 -Ref: #test125783 -Node: Add-on commands126530 -Ref: #add-on-commands126647 -Node: ui127990 -Ref: #ui128078 -Node: web128132 -Ref: #web128235 -Node: iadd128351 -Ref: #iadd128462 -Node: interest128544 -Ref: #interest128651 -Node: ENVIRONMENT128891 -Ref: #environment129003 -Node: FILES129832 -Ref: #files-1129935 -Node: LIMITATIONS130148 -Ref: #limitations130267 -Node: TROUBLESHOOTING131009 -Ref: #troubleshooting131122 +Node: Regular expressions34308 +Ref: #regular-expressions34465 +Node: Smart dates36201 +Ref: #smart-dates36352 +Node: Report start & end date37713 +Ref: #report-start-end-date37885 +Node: Report intervals39382 +Ref: #report-intervals39547 +Node: Period expressions39937 +Ref: #period-expressions40097 +Node: Depth limiting44233 +Ref: #depth-limiting44377 +Node: Pivoting44709 +Ref: #pivoting44832 +Node: Valuation46508 +Ref: #valuation46610 +Node: -B Cost47530 +Ref: #b-cost47634 +Node: -V Value47806 +Ref: #v-value47959 +Node: -X Market value in specified commodity49232 +Ref: #x-market-value-in-specified-commodity49451 +Node: Market prices49629 +Ref: #market-prices49814 +Node: --value Flexible valuation50739 +Ref: #value-flexible-valuation50940 +Node: Effect of --value on reports55445 +Ref: #effect-of---value-on-reports55626 +Node: COMMANDS61172 +Ref: #commands61280 +Node: accounts62364 +Ref: #accounts62462 +Node: activity63161 +Ref: #activity63271 +Node: add63654 +Ref: #add63753 +Node: balance66492 +Ref: #balance66603 +Node: Classic balance report68061 +Ref: #classic-balance-report68234 +Node: Customising the classic balance report69603 +Ref: #customising-the-classic-balance-report69831 +Node: Colour support71907 +Ref: #colour-support72074 +Node: Flat mode72247 +Ref: #flat-mode72395 +Node: Depth limited balance reports72808 +Ref: #depth-limited-balance-reports72993 +Node: Percentages73449 +Ref: #percentages73615 +Node: Multicolumn balance report74752 +Ref: #multicolumn-balance-report74932 +Node: Budget report80194 +Ref: #budget-report80337 +Node: Nested budgets85603 +Ref: #nested-budgets85715 +Ref: #output-format-189196 +Node: balancesheet89393 +Ref: #balancesheet89529 +Node: balancesheetequity90995 +Ref: #balancesheetequity91144 +Node: cashflow91867 +Ref: #cashflow91995 +Node: check-dates93174 +Ref: #check-dates93301 +Node: check-dupes93580 +Ref: #check-dupes93704 +Node: close93997 +Ref: #close94111 +Node: close usage95633 +Ref: #close-usage95726 +Node: commodities98539 +Ref: #commodities98666 +Node: descriptions98748 +Ref: #descriptions98876 +Node: diff99057 +Ref: #diff99163 +Node: files100210 +Ref: #files100310 +Node: help100457 +Ref: #help100557 +Node: import101638 +Ref: #import101752 +Node: Importing balance assignments102645 +Ref: #importing-balance-assignments102793 +Node: incomestatement103442 +Ref: #incomestatement103575 +Node: notes105062 +Ref: #notes105175 +Node: payees105301 +Ref: #payees105407 +Node: prices105565 +Ref: #prices105671 +Node: print106012 +Ref: #print106122 +Node: print-unique110908 +Ref: #print-unique111034 +Node: register111319 +Ref: #register111446 +Node: Custom register output115618 +Ref: #custom-register-output115747 +Node: register-match117084 +Ref: #register-match117218 +Node: rewrite117569 +Ref: #rewrite117684 +Node: Re-write rules in a file119539 +Ref: #re-write-rules-in-a-file119673 +Node: Diff output format120883 +Ref: #diff-output-format121052 +Node: rewrite vs print --auto122144 +Ref: #rewrite-vs.-print---auto122323 +Node: roi122879 +Ref: #roi122977 +Node: stats123989 +Ref: #stats124088 +Node: tags124876 +Ref: #tags124974 +Node: test125268 +Ref: #test125376 +Node: Add-on commands126123 +Ref: #add-on-commands126240 +Node: ui127583 +Ref: #ui127671 +Node: web127725 +Ref: #web127828 +Node: iadd127944 +Ref: #iadd128055 +Node: interest128137 +Ref: #interest128244 +Node: ENVIRONMENT128484 +Ref: #environment128596 +Node: FILES129425 +Ref: #files-1129528 +Node: LIMITATIONS129741 +Ref: #limitations129860 +Node: TROUBLESHOOTING130602 +Ref: #troubleshooting130715  End Tag Table diff --git a/hledger/hledger.txt b/hledger/hledger.txt index b969721c2..32a14dbcb 100644 --- a/hledger/hledger.txt +++ b/hledger/hledger.txt @@ -868,14 +868,6 @@ OPTIONS https://github.com/simonmichael/hledger/blob/master/hledger- lib/Hledger/Data/Types.hs. - o The JSON output from hledger commands is essentially the same as the - JSON served by hledger-web's JSON API, but pretty printed, using line - breaks and indentation. Our pretty printer has the ability to elide - data in certain cases - rendering non-strings as if they were - strings, or displaying "FOO.." instead of FOO's full details. This - should never happen in hledger's JSON output; if you see otherwise, - please report as a bug. - o hledger represents quantities as Decimal values storing up to 255 significant digits, eg for repeating decimals. Such numbers can arise in practice (from automatically-calculated transaction prices), @@ -942,6 +934,7 @@ OPTIONS 2004/10/1, 2004-01-01, exact date, several separators allowed. Year 2004.9.1 is 4+ digits, month is 1-12, day is 1-31 2004 start of year + 2004/10 start of month 10/1 month and day in current year 21 day in current month @@ -990,43 +983,44 @@ OPTIONS Examples: - -b 2016/3/17 begin on St. Patrick's day 2016 - -e 12/1 end at the start of december 1st of the current year - (11/30 will be the last date included) - -b thismonth all transactions on or after the 1st of the current month - -p thismonth all transactions in the current month - date:2016/3/17- the above written as queries instead - date:-12/1 - date:thismonth- + -b 2016/3/17 begin on St. Patrick's day 2016 + -e 12/1 end at the start of december 1st of the current year + (11/30 will be the last date included) + -b thismonth all transactions on or after the 1st of the current month + -p thismonth all transactions in the current month + date:2016/3/17.. the above written as queries instead (.. can also be re- + placed with -) + date:..12/1 + date:thismonth.. date:thismonth Report intervals A report interval can be specified so that commands like register, bal- - ance and activity will divide their reports into multiple subperiods. - The basic intervals can be selected with one of -D/--daily, - -W/--weekly, -M/--monthly, -Q/--quarterly, or -Y/--yearly. More com- - plex intervals may be specified with a period expression. Report in- + ance and activity will divide their reports into multiple subperiods. + The basic intervals can be selected with one of -D/--daily, + -W/--weekly, -M/--monthly, -Q/--quarterly, or -Y/--yearly. More com- + plex intervals may be specified with a period expression. Report in- tervals can not be specified with a query. Period expressions - The -p/--period option accepts period expressions, a shorthand way of + The -p/--period option accepts period expressions, a shorthand way of expressing a start date, end date, and/or report interval all at once. - Here's a basic period expression specifying the first quarter of 2009. - Note, hledger always treats start dates as inclusive and end dates as + Here's a basic period expression specifying the first quarter of 2009. + Note, hledger always treats start dates as inclusive and end dates as exclusive: -p "from 2009/1/1 to 2009/4/1" - Keywords like "from" and "to" are optional, and so are the spaces, as - long as you don't run two dates together. "to" can also be written as - "-". These are equivalent to the above: + Keywords like "from" and "to" are optional, and so are the spaces, as + long as you don't run two dates together. "to" can also be written as + ".." or "-". These are equivalent to the above: -p "2009/1/1 2009/4/1" -p2009/1/1to2009/4/1 - -p2009/1/1-2009/4/1 + -p2009/1/1..2009/4/1 - Dates are smart dates, so if the current year is 2009, the above can + Dates are smart dates, so if the current year is 2009, the above can also be written as: -p "1/1 4/1" @@ -1040,62 +1034,62 @@ OPTIONS 1, 2009 -p "from 2009/1" the same -p "from 2009" the same - -p "to 2009" everything before january + -p "to 2009" everything before january 1, 2009 - A single date with no "from" or "to" defines both the start and end + A single date with no "from" or "to" defines both the start and end date like so: - -p "2009" the year 2009; equivalent + -p "2009" the year 2009; equivalent to "2009/1/1 to 2010/1/1" - -p "2009/1" the month of jan; equiva- + -p "2009/1" the month of jan; equiva- lent to "2009/1/1 to 2009/2/1" - -p "2009/1/1" just that day; equivalent + -p "2009/1/1" just that day; equivalent to "2009/1/1 to 2009/1/2" - The argument of -p can also begin with, or be, a report interval ex- + The argument of -p can also begin with, or be, a report interval ex- pression. The basic report intervals are daily, weekly, monthly, quar- - terly, or yearly, which have the same effect as the -D,-W,-M,-Q, or -Y - flags. Between report interval and start/end dates (if any), the word + terly, or yearly, which have the same effect as the -D,-W,-M,-Q, or -Y + flags. Between report interval and start/end dates (if any), the word in is optional. Examples: -p "weekly from 2009/1/1 to 2009/4/1" -p "monthly in 2008" -p "quarterly" - Note that weekly, monthly, quarterly and yearly intervals will always + Note that weekly, monthly, quarterly and yearly intervals will always start on the first day on week, month, quarter or year accordingly, and - will end on the last day of same period, even if associated period ex- + will end on the last day of same period, even if associated period ex- pression specifies different explicit start and end date. For example: - -p "weekly from 2009/1/1 starts on 2008/12/29, closest preceding Mon- + -p "weekly from 2009/1/1 starts on 2008/12/29, closest preceding Mon- to 2009/4/1" day - -p "monthly in starts on 2018/11/01 + -p "monthly in starts on 2018/11/01 2008/11/25" - -p "quarterly from starts on 2009/04/01, ends on 2009/06/30, + -p "quarterly from starts on 2009/04/01, ends on 2009/06/30, 2009-05-05 to 2009-06-01" which are first and last days of Q2 2009 -p "yearly from starts on 2009/01/01, first day of 2009 2009-12-29" - The following more complex report intervals are also supported: bi- + The following more complex report intervals are also supported: bi- weekly, bimonthly, every day|week|month|quarter|year, every N days|weeks|months|quarters|years. - All of these will start on the first day of the requested period and + All of these will start on the first day of the requested period and end on the last one, as described above. Examples: - -p "bimonthly from 2008" periods will have boundaries on 2008/01/01, + -p "bimonthly from 2008" periods will have boundaries on 2008/01/01, 2008/03/01, ... -p "every 2 weeks" starts on closest preceding Monday - -p "every 5 month from periods will have boundaries on 2009/03/01, + -p "every 5 month from periods will have boundaries on 2009/03/01, 2009/03" 2009/08/01, ... - If you want intervals that start on arbitrary day of your choosing and + If you want intervals that start on arbitrary day of your choosing and span a week, month or year, you need to use any of the following: every Nth day of week, every , every Nth day [of month], every @@ -1107,42 +1101,42 @@ OPTIONS -p "every 2nd day of periods will go from Tue to Tue week" -p "every Tue" same - -p "every 15th day" period boundaries will be on 15th of each + -p "every 15th day" period boundaries will be on 15th of each month - -p "every 2nd Monday" period boundaries will be on second Monday of + -p "every 2nd Monday" period boundaries will be on second Monday of each month -p "every 11/05" yearly periods with boundaries on 5th of Nov -p "every 5th Nov" same -p "every Nov 5th" same - Show historical balances at end of 15th each month (N is exclusive end + Show historical balances at end of 15th each month (N is exclusive end date): hledger balance -H -p "every 16th day" - Group postings from start of wednesday to end of next tuesday (N is + Group postings from start of wednesday to end of next tuesday (N is start date and exclusive end date): hledger register checking -p "every 3rd day of week" Depth limiting With the --depth N option (short form: -N), commands like account, bal- - ance and register will show only the uppermost accounts in the account - tree, down to level N. Use this when you want a summary with less de- + ance and register will show only the uppermost accounts in the account + tree, down to level N. Use this when you want a summary with less de- tail. This flag has the same effect as a depth: query argument (so -2, - --depth=2 or depth:2 are basically equivalent). + --depth=2 or depth:2 are equivalent). Pivoting Normally hledger sums amounts, and organizes them in a hierarchy, based - on account name. The --pivot FIELD option causes it to sum and orga- - nize hierarchy based on the value of some other field instead. FIELD + on account name. The --pivot FIELD option causes it to sum and orga- + nize hierarchy based on the value of some other field instead. FIELD can be: code, description, payee, note, or the full name (case insensi- tive) of any tag. As with account names, values containing colon:sepa- rated:parts will be displayed hierarchically in reports. - --pivot is a general option affecting all reports; you can think of + --pivot is a general option affecting all reports; you can think of hledger transforming the journal before any other processing, replacing - every posting's account name with the value of the specified field on + every posting's account name with the value of the specified field on that posting, inheriting it from the transaction or using a blank value if it's not present. @@ -1168,7 +1162,7 @@ OPTIONS -------------------- 0 - One way to show only amounts with a member: value (using a query, de- + One way to show only amounts with a member: value (using a query, de- scribed below): $ hledger balance --pivot member tag:member=. @@ -1176,7 +1170,7 @@ OPTIONS -------------------- -2 EUR - Another way (the acct: query matches against the pivoted "account + Another way (the acct: query matches against the pivoted "account name"): $ hledger balance --pivot member acct:. @@ -1185,27 +1179,27 @@ OPTIONS -2 EUR Valuation - hledger can show cost reports, where amounts are converted to their - cost or sale amount at transaction time; or value reports, where + hledger can show cost reports, where amounts are converted to their + cost or sale amount at transaction time; or value reports, where amounts are converted to their market value in another currency/commod- - ity at a specified date (using market prices inferred from your trans- + ity at a specified date (using market prices inferred from your trans- actions, or declared with P directives). - We call this "valuation", and it is controlled by the --value=VALUA- + We call this "valuation", and it is controlled by the --value=VALUA- TIONTYPE[,COMMODITY] option. It can get a little involved, so we cover all the details below. But most of the time, all you need to do is use these simpler flags instead: o -B to convert to cost/sale amount, or - o -V to convert to market value in your base currency. Or occasion- + o -V to convert to market value in your base currency. Or occasion- ally, o -X COMMODITY to convert to market value in some other currency. -B: Cost - The -B/--cost flag converts amounts to their cost or sale amount at - transaction time, if they have a transaction price specified. (It is + The -B/--cost flag converts amounts to their cost or sale amount at + transaction time, if they have a transaction price specified. (It is equivalent to --value=cost.) -V: Value @@ -1215,10 +1209,10 @@ OPTIONS The default valuation commodity is the one referenced in the latest ap- plicable market price dated on or before the valuation date. Typically - your P declarations or currency exchange transactions reference a sin- + your P declarations or currency exchange transactions reference a sin- gle base currency, and -V will pick that. - The default valuation date is today for single period reports (equiva- + The default valuation date is today for single period reports (equiva- lent to --value=now), or the last day of each subperiod for multiperiod reports (equivalent to --value=end). @@ -1245,28 +1239,28 @@ OPTIONS $ hledger -f t.j bal -N euros -V -e 2016/11/4 $110.00 assets:euros - What are they worth after 2016/12/21 ? (no report end date specified, + What are they worth after 2016/12/21 ? (no report end date specified, defaults to today) $ hledger -f t.j bal -N euros -V $103.00 assets:euros -X: Market value in specified commodity - The -X/--exchange option is like -V, except it specifies the target + The -X/--exchange option is like -V, except it specifies the target commodity you would like to convert to. (It is equivalent to --value=now,COMM or --value=end,COMM.) Market prices - To convert a commodity A to commodity B, hledger looks for a suitable - market price (exchange rate) in the following ways, in this order of + To convert a commodity A to commodity B, hledger looks for a suitable + market price (exchange rate) in the following ways, in this order of preference: - 1. a declared market price - the latest P directive specifying the ex- + 1. a declared market price - the latest P directive specifying the ex- change rate from A to B, dated on or before the valuation date. - 2. a transaction-implied market price - a market price matching the - transaction price used in the latest transaction where A is con- - verted to B, dated on or before the valuation date. (since hledger + 2. a transaction-implied market price - a market price matching the + transaction price used in the latest transaction where A is con- + verted to B, dated on or before the valuation date. (since hledger 1.18; experimental) 3. a reverse declared market price - calculated by inverting a declared @@ -1275,7 +1269,7 @@ OPTIONS 4. a reverse transaction-implied market price - calculated by inverting a transaction-implied market price from B to A. - 5. an indirect market price - calculated by combining the shortest + 5. an indirect market price - calculated by combining the shortest chain of market prices (any of the above types) leading from A to B. --value: Flexible valuation @@ -1296,48 +1290,48 @@ OPTIONS valuation date: --value=cost - Convert amounts to cost, using the prices recorded in transac- + Convert amounts to cost, using the prices recorded in transac- tions. --value=then Convert amounts to their value in a default valuation commodity, - using market prices on each posting's date. This is currently + using market prices on each posting's date. This is currently supported only by the print and register commands. --value=end Convert amounts to their value in a default valuation commodity, - using market prices on the last day of the report period (or if + using market prices on the last day of the report period (or if unspecified, the journal's end date); or in multiperiod reports, market prices on the last day of each subperiod. --value=now - Convert amounts to their value in default valuation commodity + Convert amounts to their value in default valuation commodity using current market prices (as of when report is generated). --value=YYYY-MM-DD - Convert amounts to their value in default valuation commodity + Convert amounts to their value in default valuation commodity using market prices on this date. - The default valuation commodity is the commodity mentioned in the most + The default valuation commodity is the commodity mentioned in the most recent applicable market price declaration. When all your price decla- - rations lead to a single home currency, this will usually do what you + rations lead to a single home currency, this will usually do what you want. To select a different valuation commodity, add the optional ,COMM part: - a comma, then the target commodity's symbol. Eg: --value=now,EUR. + a comma, then the target commodity's symbol. Eg: --value=now,EUR. hledger will do its best to convert amounts to this commodity, using: o declared prices (from source commodity to valuation commodity) - o reverse prices (declared prices from valuation to source commodity, + o reverse prices (declared prices from valuation to source commodity, inverted) - o indirect prices (prices calculated from the shortest chain of de- + o indirect prices (prices calculated from the shortest chain of de- clared or reverse prices from source to valuation commodity) in that order. - Here are some examples showing the effect of --value as seen with + Here are some examples showing the effect of --value as seen with print: P 2000-01-01 A 1 B @@ -1375,7 +1369,7 @@ OPTIONS 2000-02-01 (a) 2 B - With no report period specified, that shows the value as of the last + With no report period specified, that shows the value as of the last day of the journal (2000-03-01): $ hledger -f- print --value=end @@ -1412,7 +1406,7 @@ OPTIONS 2000-03-01 (a) 1 B - You may need to explicitly set a commodity's display style, when re- + You may need to explicitly set a commodity's display style, when re- verse prices are used. Eg this output might be surprising: P 2000-01-01 A 2B @@ -1426,10 +1420,10 @@ OPTIONS a 0 b 0 - Explanation: because there's no amount or commodity directive specify- - ing a display style for A, 0.5A gets the default style, which shows no + Explanation: because there's no amount or commodity directive specify- + ing a display style for A, 0.5A gets the default style, which shows no decimal digits. Because the displayed amount looks like zero, the com- - modity symbol and minus sign are not displayed either. Adding a com- + modity symbol and minus sign are not displayed either. Adding a com- modity directive sets a more useful display style for A: P 2000-01-01 A 2B @@ -1445,10 +1439,10 @@ OPTIONS b -0.50A Effect of --value on reports - Here is a reference for how --value currently affects each part of - hledger's reports. It's work in progress, but may be useful for trou- - bleshooting or reporting bugs. See also the definitions and notes be- - low. If you find problems, please report them, ideally with a repro- + Here is a reference for how --value currently affects each part of + hledger's reports. It's work in progress, but may be useful for trou- + bleshooting or reporting bugs. See also the definitions and notes be- + low. If you find problems, please report them, ideally with a repro- ducible example. Related: #329, #1083. Report type -B, -V, -X --value=then --value=end --value=DATE, @@ -1456,7 +1450,7 @@ OPTIONS ------------------------------------------------------------------------------------------ print posting cost value at re- value at value at re- value at - amounts port end or posting date port or DATE/today + amounts port end or posting date port or DATE/today today journal end balance as- unchanged unchanged unchanged unchanged unchanged sertions / @@ -1469,16 +1463,14 @@ OPTIONS journal journal start start posting cost value at re- value at value at re- value at - amounts (no port end or posting date port or DATE/today + amounts (no port end or posting date port or DATE/today report in- today journal end terval) - summary summarised value at pe- sum of post- value at pe- value at + summary summarised value at pe- sum of post- value at pe- value at posting cost riod ends ings in in- riod ends DATE/today amounts terval, val- (with report ued at inter- interval) val start - - running to- sum/average sum/average sum/average sum/average sum/average tal/average of displayed of displayed of displayed of displayed of displayed values values values values values @@ -1487,7 +1479,7 @@ OPTIONS bse, cf, is..) balances (no sums of value at re- not supported value at re- value at - report in- costs port end or port or DATE/today of + report in- costs port end or port or DATE/today of terval) today of journal end sums of post- sums of of sums of ings postings postings @@ -1500,10 +1492,13 @@ OPTIONS (with report postings be- fore report fore report report start interval and fore report start start -H) start + + + budget like bal- like bal- not supported like bal- like balances amounts with ances ances ances --budget - grand total sum of dis- sum of dis- not supported sum of dis- sum of dis- + grand total sum of dis- sum of dis- not supported sum of dis- sum of dis- (no report played val- played val- played val- played values interval) ues ues ues row to- sums/aver- sums/aver- not supported sums/aver- sums/averages @@ -1511,7 +1506,7 @@ OPTIONS ages (with played val- played val- played val- values report in- ues ues ues terval) - column to- sums of dis- sums of dis- not supported sums of dis- sums of dis- + column to- sums of dis- sums of dis- not supported sums of dis- sums of dis- tals played val- played val- played val- played values ues ues ues grand to- sum/average sum/average not supported sum/average sum/average @@ -1523,60 +1518,60 @@ OPTIONS cost calculated using price(s) recorded in the transaction(s). - value market value using available market price declarations, or the + value market value using available market price declarations, or the unchanged amount if no conversion rate can be found. report start - the first day of the report period specified with -b or -p or + the first day of the report period specified with -b or -p or date:, otherwise today. report or journal start - the first day of the report period specified with -b or -p or - date:, otherwise the earliest transaction date in the journal, + the first day of the report period specified with -b or -p or + date:, otherwise the earliest transaction date in the journal, otherwise today. report end - the last day of the report period specified with -e or -p or + the last day of the report period specified with -e or -p or date:, otherwise today. report or journal end - the last day of the report period specified with -e or -p or - date:, otherwise the latest transaction date in the journal, + the last day of the report period specified with -e or -p or + date:, otherwise the latest transaction date in the journal, otherwise today. report interval - a flag (-D/-W/-M/-Q/-Y) or period expression that activates the + a flag (-D/-W/-M/-Q/-Y) or period expression that activates the report's multi-period mode (whether showing one or many subperi- ods). COMMANDS - hledger provides a number of subcommands; hledger with no arguments + hledger provides a number of subcommands; hledger with no arguments shows a list. If you install additional hledger-* packages, or if you put programs or - scripts named hledger-NAME in your PATH, these will also be listed as + scripts named hledger-NAME in your PATH, these will also be listed as subcommands. - Run a subcommand by writing its name as first argument (eg hledger in- - comestatement). You can also write one of the standard short aliases - displayed in parentheses in the command list (hledger b), or any any + Run a subcommand by writing its name as first argument (eg hledger in- + comestatement). You can also write one of the standard short aliases + displayed in parentheses in the command list (hledger b), or any any unambiguous prefix of a command name (hledger inc). - Here are all the builtin commands in alphabetical order. See also - hledger for a more organised command list, and hledger CMD -h for de- + Here are all the builtin commands in alphabetical order. See also + hledger for a more organised command list, and hledger CMD -h for de- tailed command help. accounts accounts, a Show account names. - This command lists account names, either declared with account direc- - tives (--declared), posted to (--used), or both (the default). With - query arguments, only matched account names and account names refer- - enced by matched postings are shown. It shows a flat list by default. - With --tree, it uses indentation to show the account hierarchy. In - flat mode you can add --drop N to omit the first few account name com- - ponents. Account names can be depth-clipped with depth:N or --depth N + This command lists account names, either declared with account direc- + tives (--declared), posted to (--used), or both (the default). With + query arguments, only matched account names and account names refer- + enced by matched postings are shown. It shows a flat list by default. + With --tree, it uses indentation to show the account hierarchy. In + flat mode you can add --drop N to omit the first few account name com- + ponents. Account names can be depth-clipped with depth:N or --depth N or -N. Examples: @@ -1595,8 +1590,8 @@ COMMANDS activity Show an ascii barchart of posting counts per interval. - The activity command displays an ascii histogram showing transaction - counts by day, week, month or other reporting interval (by day is the + The activity command displays an ascii histogram showing transaction + counts by day, week, month or other reporting interval (by day is the default). With query arguments, it counts only matched transactions. Examples: @@ -1611,22 +1606,22 @@ COMMANDS add Prompt for transactions and add them to the journal. - Many hledger users edit their journals directly with a text editor, or - generate them from CSV. For more interactive data entry, there is the - add command, which prompts interactively on the console for new trans- + Many hledger users edit their journals directly with a text editor, or + generate them from CSV. For more interactive data entry, there is the + add command, which prompts interactively on the console for new trans- actions, and appends them to the journal file (if there are multiple -f - FILE options, the first file is used.) Existing transactions are not - changed. This is the only hledger command that writes to the journal + FILE options, the first file is used.) Existing transactions are not + changed. This is the only hledger command that writes to the journal file. To use it, just run hledger add and follow the prompts. You can add as - many transactions as you like; when you are finished, enter . or press + many transactions as you like; when you are finished, enter . or press control-d or control-c to exit. Features: - o add tries to provide useful defaults, using the most similar (by de- - scription) recent transaction (filtered by the query, if any) as a + o add tries to provide useful defaults, using the most similar (by de- + scription) recent transaction (filtered by the query, if any) as a template. o You can also set the initial defaults with command line arguments. @@ -1634,10 +1629,10 @@ COMMANDS o Readline-style edit keys can be used during data entry. o The tab key will auto-complete whenever possible - accounts, descrip- - tions, dates (yesterday, today, tomorrow). If the input area is + tions, dates (yesterday, today, tomorrow). If the input area is empty, it will insert the default value. - o If the journal defines a default commodity, it will be added to any + o If the journal defines a default commodity, it will be added to any bare numbers entered. o A parenthesised transaction code may be entered following a date. @@ -1646,7 +1641,7 @@ COMMANDS o If you make a mistake, enter < at any prompt to go one step backward. - o Input prompts are displayed in a different colour when the terminal + o Input prompts are displayed in a different colour when the terminal supports it. Example (see the tutorial for a detailed explanation): @@ -1676,8 +1671,8 @@ COMMANDS Starting the next transaction (. or ctrl-D/ctrl-C to quit) Date [2015/05/22]: $ - On Microsoft Windows, the add command makes sure that no part of the - file path ends with a period, as it can cause data loss on that plat- + On Microsoft Windows, the add command makes sure that no part of the + file path ends with a period, as it can cause data loss on that plat- form (cf #1056). balance @@ -1685,29 +1680,29 @@ COMMANDS Show accounts and their balances. The balance command is hledger's most versatile command. Note, despite - the name, it is not always used for showing real-world account bal- - ances; the more accounting-aware balancesheet and incomestatement may + the name, it is not always used for showing real-world account bal- + ances; the more accounting-aware balancesheet and incomestatement may be more convenient for that. By default, it displays all accounts, and each account's change in bal- ance during the entire period of the journal. Balance changes are cal- - culated by adding up the postings in each account. You can limit the - postings matched, by a query, to see fewer accounts, changes over a + culated by adding up the postings in each account. You can limit the + postings matched, by a query, to see fewer accounts, changes over a different time period, changes from only cleared transactions, etc. If you include an account's complete history of postings in the report, - the balance change is equivalent to the account's current ending bal- - ance. For a real-world account, typically you won't have all transac- + the balance change is equivalent to the account's current ending bal- + ance. For a real-world account, typically you won't have all transac- tions in the journal; instead you'll have all transactions after a cer- - tain date, and an "opening balances" transaction setting the correct - starting balance on that date. Then the balance command will show + tain date, and an "opening balances" transaction setting the correct + starting balance on that date. Then the balance command will show real-world account balances. In some cases the -H/--historical flag is used to ensure this (more below). The balance command can produce several styles of report: Classic balance report - This is the original balance report, as found in Ledger. It usually + This is the original balance report, as found in Ledger. It usually looks like this: $ hledger balance @@ -1725,22 +1720,22 @@ COMMANDS 0 By default, accounts are displayed hierarchically, with subaccounts in- - dented below their parent. At each level of the tree, accounts are - sorted by account code if any, then by account name. Or with + dented below their parent. At each level of the tree, accounts are + sorted by account code if any, then by account name. Or with -S/--sort-amount, by their balance amount. "Boring" accounts, which contain a single interesting subaccount and no - balance of their own, are elided into the following line for more com- - pact output. (Eg above, the "liabilities" account.) Use --no-elide to + balance of their own, are elided into the following line for more com- + pact output. (Eg above, the "liabilities" account.) Use --no-elide to prevent this. - Account balances are "inclusive" - they include the balances of any + Account balances are "inclusive" - they include the balances of any subaccounts. - Accounts which have zero balance (and no non-zero subaccounts) are + Accounts which have zero balance (and no non-zero subaccounts) are omitted. Use -E/--empty to show them. - A final total is displayed by default; use -N/--no-total to suppress + A final total is displayed by default; use -N/--no-total to suppress it, eg: $ hledger balance -p 2008/6 expenses --no-total @@ -1749,7 +1744,7 @@ COMMANDS $1 supplies Customising the classic balance report - You can customise the layout of classic balance reports with --format + You can customise the layout of classic balance reports with --format FMT: $ hledger balance --format "%20(account) %12(total)" @@ -1767,7 +1762,7 @@ COMMANDS 0 The FMT format string (plus a newline) specifies the formatting applied - to each account/balance pair. It may contain any suitable text, with + to each account/balance pair. It may contain any suitable text, with data fields interpolated like so: %[MIN][.MAX](FIELDNAME) @@ -1778,14 +1773,14 @@ COMMANDS o FIELDNAME must be enclosed in parentheses, and can be one of: - o depth_spacer - a number of spaces equal to the account's depth, or + o depth_spacer - a number of spaces equal to the account's depth, or if MIN is specified, MIN * depth spaces. o account - the account's name o total - the account's balance/posted total, right justified - Also, FMT can begin with an optional prefix to control how multi-com- + Also, FMT can begin with an optional prefix to control how multi-com- modity amounts are rendered: o %_ - render on multiple lines, bottom-aligned (the default) @@ -1802,14 +1797,14 @@ COMMANDS o %(total) - the account's total - o %-20.20(account) - the account's name, left justified, padded to 20 + o %-20.20(account) - the account's name, left justified, padded to 20 characters and clipped at 20 characters - o %,%-50(account) %25(total) - account name padded to 50 characters, - total padded to 20 characters, with multiple commodities rendered on + o %,%-50(account) %25(total) - account name padded to 50 characters, + total padded to 20 characters, with multiple commodities rendered on one line - o %20(total) %2(depth_spacer)%-(account) - the default format for the + o %20(total) %2(depth_spacer)%-(account) - the default format for the single-column balance report Colour support @@ -1820,9 +1815,9 @@ COMMANDS o the output is not being redirected or piped anywhere Flat mode - To see a flat list instead of the default hierarchical display, use - --flat. In this mode, accounts (unless depth-clipped) show their full - names and "exclusive" balance, excluding any subaccount balances. In + To see a flat list instead of the default hierarchical display, use + --flat. In this mode, accounts (unless depth-clipped) show their full + names and "exclusive" balance, excluding any subaccount balances. In this mode, you can also use --drop N to omit the first few account name components. @@ -1831,8 +1826,8 @@ COMMANDS $1 supplies Depth limited balance reports - With --depth N or depth:N or just -N, balance reports show accounts - only to the specified numeric depth. This is very useful to summarise + With --depth N or depth:N or just -N, balance reports show accounts + only to the specified numeric depth. This is very useful to summarise a complex set of accounts and get an overview. $ hledger balance -N -1 @@ -1845,9 +1840,9 @@ COMMANDS inclusive balances at the depth limit. Percentages - With -% or --percent, balance reports show each account's value ex- - pressed as a percentage of the column's total. This is useful to get - an overview of the relative sizes of account balances. For example to + With -% or --percent, balance reports show each account's value ex- + pressed as a percentage of the column's total. This is useful to get + an overview of the relative sizes of account balances. For example to obtain an overview of expenses: $ hledger balance expenses -% @@ -1857,32 +1852,32 @@ COMMANDS -------------------- 100.0 % - Note that --tree does not have an effect on -%. The percentages are - always relative to the total sum of each column, they are never rela- + Note that --tree does not have an effect on -%. The percentages are + always relative to the total sum of each column, they are never rela- tive to the parent account. - Since the percentages are relative to the columns sum, it is usually - not useful to calculate percentages if the signs of the amounts are - mixed. Although the results are technically correct, they are most - likely useless. Especially in a balance report that sums up to zero + Since the percentages are relative to the columns sum, it is usually + not useful to calculate percentages if the signs of the amounts are + mixed. Although the results are technically correct, they are most + likely useless. Especially in a balance report that sums up to zero (eg hledger balance -B) all percentage values will be zero. - This flag does not work if the report contains any mixed commodity ac- + This flag does not work if the report contains any mixed commodity ac- counts. If there are mixed commodity accounts in the report be sure to use -V or -B to coerce the report into using a single commodity. Multicolumn balance report - Multicolumn or tabular balance reports are a very useful hledger fea- - ture, and usually the preferred style. They share many of the above - features, but they show the report as a table, with columns represent- - ing time periods. This mode is activated by providing a reporting in- + Multicolumn or tabular balance reports are a very useful hledger fea- + ture, and usually the preferred style. They share many of the above + features, but they show the report as a table, with columns represent- + ing time periods. This mode is activated by providing a reporting in- terval. - There are three types of multicolumn balance report, showing different + There are three types of multicolumn balance report, showing different information: 1. By default: each column shows the sum of postings in that period, ie - the account's change of balance in that period. This is useful eg + the account's change of balance in that period. This is useful eg for a monthly income statement: $ hledger balance --quarterly income expenses -E @@ -1898,7 +1893,7 @@ COMMANDS || $-1 $1 0 0 2. With --cumulative: each column shows the ending balance for that pe- - riod, accumulating the changes across periods, starting from 0 at + riod, accumulating the changes across periods, starting from 0 at the report start date: $ hledger balance --quarterly income expenses -E --cumulative @@ -1914,8 +1909,8 @@ COMMANDS || $-1 0 0 0 3. With --historical/-H: each column shows the actual historical ending - balance for that period, accumulating the changes across periods, - starting from the actual balance at the report start date. This is + balance for that period, accumulating the changes across periods, + starting from the actual balance at the report start date. This is useful eg for a multi-period balance sheet, and when you are showing only the data after a certain start date: @@ -1934,26 +1929,26 @@ COMMANDS Note that --cumulative or --historical/-H disable --row-total/-T, since summing end balances generally does not make sense. - Multicolumn balance reports display accounts in flat mode by default; + Multicolumn balance reports display accounts in flat mode by default; to see the hierarchy, use --tree. - With a reporting interval (like --quarterly above), the report - start/end dates will be adjusted if necessary so that they encompass + With a reporting interval (like --quarterly above), the report + start/end dates will be adjusted if necessary so that they encompass the displayed report periods. This is so that the first and last peri- ods will be "full" and comparable to the others. - The -E/--empty flag does two things in multicolumn balance reports: + The -E/--empty flag does two things in multicolumn balance reports: first, the report will show all columns within the specified report pe- - riod (without -E, leading and trailing columns with all zeroes are not - shown). Second, all accounts which existed at the report start date - will be considered, not just the ones with activity during the report - period (use -E to include low-activity accounts which would otherwise + riod (without -E, leading and trailing columns with all zeroes are not + shown). Second, all accounts which existed at the report start date + will be considered, not just the ones with activity during the report + period (use -E to include low-activity accounts which would otherwise would be omitted). The -T/--row-total flag adds an additional column showing the total for each row. - The -A/--average flag adds a column showing the average value in each + The -A/--average flag adds a column showing the average value in each row. Here's an example of all three: @@ -1974,21 +1969,21 @@ COMMANDS (Average is rounded to the dollar here since all journal amounts are) - A limitation of multicolumn balance reports: eliding of boring parent - accounts in tree mode, as in the classic balance report, is not yet + A limitation of multicolumn balance reports: eliding of boring parent + accounts in tree mode, as in the classic balance report, is not yet supported. - The --transpose flag can be used to exchange the rows and columns of a + The --transpose flag can be used to exchange the rows and columns of a multicolumn report. Budget report - With --budget, extra columns are displayed showing budget goals for - each account and period, if any. Budget goals are defined by periodic + With --budget, extra columns are displayed showing budget goals for + each account and period, if any. Budget goals are defined by periodic transactions. This is very useful for comparing planned and actual in- - come, expenses, time usage, etc. --budget is most often combined with + come, expenses, time usage, etc. --budget is most often combined with a report interval. - For example, you can take average monthly expenses in the common ex- + For example, you can take average monthly expenses in the common ex- pense categories to construct a minimal monthly budget: ;; Budget @@ -2035,26 +2030,26 @@ COMMANDS This is different from a normal balance report in several ways: - o Only accounts with budget goals during the report period are shown, + o Only accounts with budget goals during the report period are shown, by default. - o In each column, in square brackets after the actual amount, budget - goal amounts are shown, and the actual/goal percentage. (Note: bud- + o In each column, in square brackets after the actual amount, budget + goal amounts are shown, and the actual/goal percentage. (Note: bud- get goals should be in the same commodity as the actual amount.) - o All parent accounts are always shown, even in flat mode. Eg assets, + o All parent accounts are always shown, even in flat mode. Eg assets, assets:bank, and expenses above. - o Amounts always include all subaccounts, budgeted or unbudgeted, even + o Amounts always include all subaccounts, budgeted or unbudgeted, even in flat mode. This means that the numbers displayed will not always add up! Eg above, - the expenses actual amount includes the gifts and supplies transac- - tions, but the expenses:gifts and expenses:supplies accounts are not + the expenses actual amount includes the gifts and supplies transac- + tions, but the expenses:gifts and expenses:supplies accounts are not shown, as they have no budget amounts declared. - This can be confusing. When you need to make things clearer, use the - -E/--empty flag, which will reveal all accounts including unbudgeted + This can be confusing. When you need to make things clearer, use the + -E/--empty flag, which will reveal all accounts including unbudgeted ones, giving the full picture. Eg: $ hledger balance -M --budget --empty @@ -2096,12 +2091,12 @@ COMMANDS For more examples, see Budgeting and Forecasting. Nested budgets - You can add budgets to any account in your account hierarchy. If you + You can add budgets to any account in your account hierarchy. If you have budgets on both parent account and some of its children, then bud- - get(s) of the child account(s) would be added to the budget of their + get(s) of the child account(s) would be added to the budget of their parent, much like account balances behave. - In the most simple case this means that once you add a budget to any + In the most simple case this means that once you add a budget to any account, all its parents would have budget as well. To illustrate this, consider the following budget: @@ -2111,13 +2106,13 @@ COMMANDS expenses:personal:electronics $100.00 liabilities - With this, monthly budget for electronics is defined to be $100 and - budget for personal expenses is an additional $1000, which implicitly + With this, monthly budget for electronics is defined to be $100 and + budget for personal expenses is an additional $1000, which implicitly means that budget for both expenses:personal and expenses is $1100. - Transactions in expenses:personal:electronics will be counted both to- + Transactions in expenses:personal:electronics will be counted both to- wards its $100 budget and $1100 of expenses:personal , and transactions - in any other subaccount of expenses:personal would be counted towards + in any other subaccount of expenses:personal would be counted towards only towards the budget of expenses:personal. For example, let's consider these transactions: @@ -2143,9 +2138,9 @@ COMMANDS expenses:personal $30.00 liabilities - As you can see, we have transactions in expenses:personal:electron- - ics:upgrades and expenses:personal:train tickets, and since both of - these accounts are without explicitly defined budget, these transac- + As you can see, we have transactions in expenses:personal:electron- + ics:upgrades and expenses:personal:train tickets, and since both of + these accounts are without explicitly defined budget, these transac- tions would be counted towards budgets of expenses:personal:electronics and expenses:personal accordingly: @@ -2161,7 +2156,7 @@ COMMANDS -------------------------------++------------------------------- || 0 [ 0] - And with --empty, we can get a better picture of budget allocation and + And with --empty, we can get a better picture of budget allocation and consumption: $ hledger balance --budget -M --empty @@ -2180,17 +2175,17 @@ COMMANDS Output format This command also supports the output destination and output format op- - tions The output formats supported are txt, csv, (multicolumn non-bud- + tions The output formats supported are txt, csv, (multicolumn non-bud- get reports only) html, and (experimental) json. balancesheet balancesheet, bs This command displays a simple balance sheet, showing historical ending - balances of asset and liability accounts (ignoring any report begin - date). It assumes that these accounts are under a top-level asset or + balances of asset and liability accounts (ignoring any report begin + date). It assumes that these accounts are under a top-level asset or liability account (case insensitive, plural forms also allowed). - Note this report shows all account balances with normal positive sign + Note this report shows all account balances with normal positive sign (like conventional financial statements, unlike balance/print/register) (experimental). @@ -2216,21 +2211,21 @@ COMMANDS 0 With a reporting interval, multiple columns will be shown, one for each - report period. As with multicolumn balance reports, you can alter the - report mode with --change/--cumulative/--historical. Normally bal- - ancesheet shows historical ending balances, which is what you need for - a balance sheet; note this means it ignores report begin dates (and - -T/--row-total, since summing end balances generally does not make - sense). Instead of absolute values percentages can be displayed with + report period. As with multicolumn balance reports, you can alter the + report mode with --change/--cumulative/--historical. Normally bal- + ancesheet shows historical ending balances, which is what you need for + a balance sheet; note this means it ignores report begin dates (and + -T/--row-total, since summing end balances generally does not make + sense). Instead of absolute values percentages can be displayed with -%. This command also supports the output destination and output format op- - tions The output formats supported are txt, csv, html, and (experimen- + tions The output formats supported are txt, csv, html, and (experimen- tal) json. balancesheetequity balancesheetequity, bse - Just like balancesheet, but also reports Equity (which it assumes is + Just like balancesheet, but also reports Equity (which it assumes is under a top-level equity account). Example: @@ -2260,15 +2255,15 @@ COMMANDS 0 This command also supports the output destination and output format op- - tions The output formats supported are txt, csv, html, and (experimen- + tions The output formats supported are txt, csv, html, and (experimen- tal) json. cashflow cashflow, cf - This command displays a simple cashflow statement, showing changes in - "cash" accounts. It assumes that these accounts are under a top-level - asset account (case insensitive, plural forms also allowed) and do not - contain receivable or A/R in their name. Note this report shows all + This command displays a simple cashflow statement, showing changes in + "cash" accounts. It assumes that these accounts are under a top-level + asset account (case insensitive, plural forms also allowed) and do not + contain receivable or A/R in their name. Note this report shows all account balances with normal positive sign (like conventional financial statements, unlike balance/print/register) (experimental). @@ -2289,90 +2284,90 @@ COMMANDS $-1 With a reporting interval, multiple columns will be shown, one for each - report period. Normally cashflow shows changes in assets per period, - though as with multicolumn balance reports you can alter the report + report period. Normally cashflow shows changes in assets per period, + though as with multicolumn balance reports you can alter the report mode with --change/--cumulative/--historical. Instead of absolute val- ues percentages can be displayed with -%. This command also supports the output destination and output format op- - tions The output formats supported are txt, csv, html, and (experimen- + tions The output formats supported are txt, csv, html, and (experimen- tal) json. check-dates check-dates - Check that transactions are sorted by increasing date. With --date2, - checks secondary dates instead. With --strict, dates must also be - unique. With a query, only matched transactions' dates are checked. + Check that transactions are sorted by increasing date. With --date2, + checks secondary dates instead. With --strict, dates must also be + unique. With a query, only matched transactions' dates are checked. Reads the default journal file, or another specified with -f. check-dupes check-dupes - Reports account names having the same leaf but different prefixes. In - other words, two or more leaves that are categorized differently. + Reports account names having the same leaf but different prefixes. In + other words, two or more leaves that are categorized differently. Reads the default journal file, or another specified as an argument. An example: http://stefanorodighiero.net/software/hledger-dupes.html close close, equity - Prints a "closing balances" transaction and an "opening balances" + Prints a "closing balances" transaction and an "opening balances" transaction that bring account balances to and from zero, respectively. These can be added to your journal file(s), eg to bring asset/liability - balances forward into a new journal file, or to close out revenues/ex- + balances forward into a new journal file, or to close out revenues/ex- penses to retained earnings at the end of a period. - You can print just one of these transactions by using the --close or - --open flag. You can customise their descriptions with the --close- + You can print just one of these transactions by using the --close or + --open flag. You can customise their descriptions with the --close- desc and --open-desc options. One amountless posting to "equity:opening/closing balances" is added to - balance the transactions, by default. You can customise this account - name with --close-acct and --open-acct; if you specify only one of + balance the transactions, by default. You can customise this account + name with --close-acct and --open-acct; if you specify only one of these, it will be used for both. With --x/--explicit, the equity posting's amount will be shown. And if - it involves multiple commodities, a posting for each commodity will be + it involves multiple commodities, a posting for each commodity will be shown, as with the print command. - With --interleaved, the equity postings are shown next to the postings + With --interleaved, the equity postings are shown next to the postings they balance, which makes troubleshooting easier. By default, transaction prices in the journal are ignored when generat- ing the closing/opening transactions. With --show-costs, this cost in- - formation is preserved (balance -B reports will be unchanged after the - transition). Separate postings are generated for each cost in each - commodity. Note this can generate very large journal entries, if you + formation is preserved (balance -B reports will be unchanged after the + transition). Separate postings are generated for each cost in each + commodity. Note this can generate very large journal entries, if you have many foreign currency or investment transactions. close usage If you split your journal files by time (eg yearly), you will typically - run this command at the end of the year, and save the closing transac- - tion as last entry of the old file, and the opening transaction as the - first entry of the new file. This makes the files self contained, so - that correct balances are reported no matter which of them are loaded. - Ie, if you load just one file, the balances are initialised correctly; - or if you load several files, the redundant closing/opening transac- - tions cancel each other out. (They will show up in print or register - reports; you can exclude them with a query like not:desc:'(open- + run this command at the end of the year, and save the closing transac- + tion as last entry of the old file, and the opening transaction as the + first entry of the new file. This makes the files self contained, so + that correct balances are reported no matter which of them are loaded. + Ie, if you load just one file, the balances are initialised correctly; + or if you load several files, the redundant closing/opening transac- + tions cancel each other out. (They will show up in print or register + reports; you can exclude them with a query like not:desc:'(open- ing|closing) balances'.) If you're running a business, you might also use this command to "close - the books" at the end of an accounting period, transferring income - statement account balances to retained earnings. (You may want to + the books" at the end of an accounting period, transferring income + statement account balances to retained earnings. (You may want to change the equity account name to something like "equity:retained earn- ings".) - By default, the closing transaction is dated yesterday, the balances - are calculated as of end of yesterday, and the opening transaction is - dated today. To close on some other date, use: hledger close -e OPEN- - INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019. + By default, the closing transaction is dated yesterday, the balances + are calculated as of end of yesterday, and the opening transaction is + dated today. To close on some other date, use: hledger close -e OPEN- + INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019. You can also use -p or date:PERIOD (any starting date is ignored). - Both transactions will include balance assertions for the closed/re- + Both transactions will include balance assertions for the closed/re- opened accounts. You probably shouldn't use status or realness filters - (like -C or -R or status:) with this command, or the generated balance - assertions will depend on these flags. Likewise, if you run this com- - mand with --auto, the balance assertions will probably always require + (like -C or -R or status:) with this command, or the generated balance + assertions will depend on these flags. Likewise, if you run this com- + mand with --auto, the balance assertions will probably always require --auto. Examples: @@ -2427,18 +2422,18 @@ COMMANDS diff diff - Compares a particular account's transactions in two input files. It + Compares a particular account's transactions in two input files. It shows any transactions to this account which are in one file but not in the other. More precisely, for each posting affecting this account in either file, - it looks for a corresponding posting in the other file which posts the - same amount to the same account (ignoring date, description, etc.) + it looks for a corresponding posting in the other file which posts the + same amount to the same account (ignoring date, description, etc.) Since postings not transactions are compared, this also works when mul- tiple bank transactions have been combined into a single journal entry. This is useful eg if you have downloaded an account's transactions from - your bank (eg as CSV data). When hledger and your bank disagree about + your bank (eg as CSV data). When hledger and your bank disagree about the account balance, you can compare the bank data with your journal to find out the cause. @@ -2456,20 +2451,20 @@ COMMANDS files files - List all files included in the journal. With a REGEX argument, only + List all files included in the journal. With a REGEX argument, only file names matching the regular expression (case sensitive) are shown. help help Show any of the hledger manuals. - The help command displays any of the main hledger manuals, in one of - several ways. Run it with no argument to list the manuals, or provide + The help command displays any of the main hledger manuals, in one of + several ways. Run it with no argument to list the manuals, or provide a full or partial manual name to select one. - hledger manuals are available in several formats. hledger help will - use the first of these display methods that it finds: info, man, - $PAGER, less, stdout (or when non-interactive, just stdout). You can + hledger manuals are available in several formats. hledger help will + use the first of these display methods that it finds: info, man, + $PAGER, less, stdout (or when non-interactive, just stdout). You can force a particular viewer with the --info, --man, --pager, --cat flags. Examples: @@ -2496,9 +2491,9 @@ COMMANDS import import - Read new transactions added to each FILE since last run, and add them - to the main journal file. Or with --dry-run, just print the transac- - tions that would be added. Or with --catchup, just mark all of the + Read new transactions added to each FILE since last run, and add them + to the main journal file. Or with --dry-run, just print the transac- + tions that would be added. Or with --catchup, just mark all of the FILEs' transactions as imported, without actually importing any. The input files are specified as arguments - no need to write -f before @@ -2509,36 +2504,36 @@ COMMANDS ing transactions are always added to the input files in increasing date order, and by saving .latest.FILE state files. - The --dry-run output is in journal format, so you can filter it, eg to + The --dry-run output is in journal format, so you can filter it, eg to see only uncategorised transactions: $ hledger import --dry ... | hledger -f- print unknown --ignore-assertions Importing balance assignments - Entries added by import will have their posting amounts made explicit - (like hledger print -x). This means that any balance assignments in - imported files must be evaluated; but, imported files don't get to see - the main file's account balances. As a result, importing entries with + Entries added by import will have their posting amounts made explicit + (like hledger print -x). This means that any balance assignments in + imported files must be evaluated; but, imported files don't get to see + the main file's account balances. As a result, importing entries with balance assignments (eg from an institution that provides only balances - and not posting amounts) will probably generate incorrect posting + and not posting amounts) will probably generate incorrect posting amounts. To avoid this problem, use print instead of import: $ hledger print IMPORTFILE [--new] >> $LEDGER_FILE - (If you think import should leave amounts implicit like print does, + (If you think import should leave amounts implicit like print does, please test it and send a pull request.) incomestatement incomestatement, is - This command displays a simple income statement, showing revenues and - expenses during a period. It assumes that these accounts are under a - top-level revenue or income or expense account (case insensitive, plu- - ral forms also allowed). Note this report shows all account balances - with normal positive sign (like conventional financial statements, un- + This command displays a simple income statement, showing revenues and + expenses during a period. It assumes that these accounts are under a + top-level revenue or income or expense account (case insensitive, plu- + ral forms also allowed). Note this report shows all account balances + with normal positive sign (like conventional financial statements, un- like balance/print/register) (experimental). - This command displays a simple income statement. It currently assumes - that you have top-level accounts named income (or revenue) and expense + This command displays a simple income statement. It currently assumes + that you have top-level accounts named income (or revenue) and expense (plural forms also allowed.) $ hledger incomestatement @@ -2563,13 +2558,13 @@ COMMANDS 0 With a reporting interval, multiple columns will be shown, one for each - report period. Normally incomestatement shows revenues/expenses per - period, though as with multicolumn balance reports you can alter the - report mode with --change/--cumulative/--historical. Instead of abso- + report period. Normally incomestatement shows revenues/expenses per + period, though as with multicolumn balance reports you can alter the + report mode with --change/--cumulative/--historical. Instead of abso- lute values percentages can be displayed with -%. This command also supports the output destination and output format op- - tions The output formats supported are txt, csv, html, and (experimen- + tions The output formats supported are txt, csv, html, and (experimen- tal) json. notes @@ -2597,10 +2592,10 @@ COMMANDS prices prices - Print market price directives from the journal. With --costs, also - print synthetic market prices based on transaction prices. With --in- - verted-costs, also print inverse prices based on transaction prices. - Prices (and postings providing prices) can be filtered by a query. + Print market price directives from the journal. With --costs, also + print synthetic market prices based on transaction prices. With --in- + verted-costs, also print inverse prices based on transaction prices. + Prices (and postings providing prices) can be filtered by a query. Price amounts are always displayed with their full precision. print @@ -2608,11 +2603,11 @@ COMMANDS Show transaction journal entries, sorted by date. The print command displays full journal entries (transactions) from the - journal file in date order, tidily formatted. With --date2, transac- + journal file in date order, tidily formatted. With --date2, transac- tions are sorted by secondary date instead. print's output is always a valid hledger journal. - It preserves all transaction information, but it does not preserve di- + It preserves all transaction information, but it does not preserve di- rectives or inter-transaction comments $ hledger print @@ -2639,43 +2634,43 @@ COMMANDS Normally, the journal entry's explicit or implicit amount style is pre- served. For example, when an amount is omitted in the journal, it will - not appear in the output. Similarly, when a transaction price is im- - plied but not written, it will not appear in the output. You can use - the -x/--explicit flag to make all amounts and transaction prices ex- - plicit, which can be useful for troubleshooting or for making your + not appear in the output. Similarly, when a transaction price is im- + plied but not written, it will not appear in the output. You can use + the -x/--explicit flag to make all amounts and transaction prices ex- + plicit, which can be useful for troubleshooting or for making your journal more readable and robust against data entry errors. -x is also implied by using any of -B,-V,-X,--value. - Note, -x/--explicit will cause postings with a multi-commodity amount - (these can arise when a multi-commodity transaction has an implicit - amount) to be split into multiple single-commodity postings, keeping + Note, -x/--explicit will cause postings with a multi-commodity amount + (these can arise when a multi-commodity transaction has an implicit + amount) to be split into multiple single-commodity postings, keeping the output parseable. - With -B/--cost, amounts with transaction prices are converted to cost + With -B/--cost, amounts with transaction prices are converted to cost using that price. This can be used for troubleshooting. - With -m/--match and a STR argument, print will show at most one trans- - action: the one one whose description is most similar to STR, and is - most recent. STR should contain at least two characters. If there is + With -m/--match and a STR argument, print will show at most one trans- + action: the one one whose description is most similar to STR, and is + most recent. STR should contain at least two characters. If there is no similar-enough match, no transaction will be shown. With --new, for each FILE being read, hledger reads (and writes) a spe- - cial state file (.latest.FILE in the same directory), containing the - latest transaction date(s) that were seen last time FILE was read. - When this file is found, only transactions with newer dates (and new - transactions on the latest date) are printed. This is useful for ig- - noring already-seen entries in import data, such as downloaded CSV + cial state file (.latest.FILE in the same directory), containing the + latest transaction date(s) that were seen last time FILE was read. + When this file is found, only transactions with newer dates (and new + transactions on the latest date) are printed. This is useful for ig- + noring already-seen entries in import data, such as downloaded CSV files. Eg: $ hledger -f bank1.csv print --new (shows transactions added since last print --new on this file) - This assumes that transactions added to FILE always have same or in- - creasing dates, and that transactions on the same day do not get re- + This assumes that transactions added to FILE always have same or in- + creasing dates, and that transactions on the same day do not get re- ordered. See also the import command. This command also supports the output destination and output format op- - tions The output formats supported are txt, csv, and (experimental) + tions The output formats supported are txt, csv, and (experimental) json. Here's an example of print's CSV output: @@ -2694,20 +2689,20 @@ COMMANDS "5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","","" "5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","","" - o There is one CSV record per posting, with the parent transaction's + o There is one CSV record per posting, with the parent transaction's fields repeated. o The "txnidx" (transaction index) field shows which postings belong to - the same transaction. (This number might change if transactions are - reordered within the file, files are parsed/included in a different + the same transaction. (This number might change if transactions are + reordered within the file, files are parsed/included in a different order, etc.) - o The amount is separated into "commodity" (the symbol) and "amount" + o The amount is separated into "commodity" (the symbol) and "amount" (numeric quantity) fields. o The numeric amount is repeated in either the "credit" or "debit" col- - umn, for convenience. (Those names are not accurate in the account- - ing sense; it just puts negative amounts under credit and zero or + umn, for convenience. (Those names are not accurate in the account- + ing sense; it just puts negative amounts under credit and zero or greater amounts under debit.) print-unique @@ -2731,7 +2726,7 @@ COMMANDS Show postings and their running total. The register command displays postings in date order, one per line, and - their running total. This is typically used with a query selecting a + their running total. This is typically used with a query selecting a particular account, to see that account's activity: $ hledger register checking @@ -2742,8 +2737,8 @@ COMMANDS With --date2, it shows and sorts by secondary date instead. - The --historical/-H flag adds the balance from any undisplayed prior - postings to the running total. This is useful when you want to see + The --historical/-H flag adds the balance from any undisplayed prior + postings to the running total. This is useful when you want to see only recent activity, with a historically accurate running balance: $ hledger register checking -b 2008/6 --historical @@ -2753,18 +2748,18 @@ COMMANDS The --depth option limits the amount of sub-account detail displayed. - The --average/-A flag shows the running average posting amount instead + The --average/-A flag shows the running average posting amount instead of the running total (so, the final number displayed is the average for - the whole report period). This flag implies --empty (see below). It - is affected by --historical. It works best when showing just one ac- + the whole report period). This flag implies --empty (see below). It + is affected by --historical. It works best when showing just one ac- count and one commodity. - The --related/-r flag shows the other postings in the transactions of + The --related/-r flag shows the other postings in the transactions of the postings which would normally be shown. - The --invert flag negates all amounts. For example, it can be used on + The --invert flag negates all amounts. For example, it can be used on an income account where amounts are normally displayed as negative num- - bers. It's also useful to show postings on the checking account to- + bers. It's also useful to show postings on the checking account to- gether with the related account: $ hledger register --related --invert assets:checking @@ -2776,7 +2771,7 @@ COMMANDS 2008/01 income:salary $-1 $-1 2008/06 income:gifts $-1 $-2 - Periods with no activity, and summary postings with a zero amount, are + Periods with no activity, and summary postings with a zero amount, are not shown by default; use the --empty/-E flag to see them: $ hledger register --monthly income -E @@ -2793,7 +2788,7 @@ COMMANDS 2008/11 0 $-2 2008/12 0 $-2 - Often, you'll want to see just one line per interval. The --depth op- + Often, you'll want to see just one line per interval. The --depth op- tion helps with this, causing subaccounts to be aggregated: $ hledger register --monthly assets --depth 1h @@ -2801,17 +2796,17 @@ COMMANDS 2008/06 assets $-1 0 2008/12 assets $-1 $-1 - Note when using report intervals, if you specify start/end dates these - will be adjusted outward if necessary to contain a whole number of in- - tervals. This ensures that the first and last intervals are full + Note when using report intervals, if you specify start/end dates these + will be adjusted outward if necessary to contain a whole number of in- + tervals. This ensures that the first and last intervals are full length and comparable to the others in the report. Custom register output - register uses the full terminal width by default, except on windows. - You can override this by setting the COLUMNS environment variable (not + register uses the full terminal width by default, except on windows. + You can override this by setting the COLUMNS environment variable (not a bash shell variable) or by using the --width/-w option. - The description and account columns normally share the space equally + The description and account columns normally share the space equally (about half of (width - 40) each). You can adjust this by adding a de- scription width as part of --width's argument, comma-separated: --width W,D . Here's a diagram (won't display correctly in --help): @@ -2830,27 +2825,27 @@ COMMANDS $ hledger reg -w $COLUMNS,40 # use terminal width, & description width 40 This command also supports the output destination and output format op- - tions The output formats supported are txt, csv, and (experimental) + tions The output formats supported are txt, csv, and (experimental) json. register-match register-match Print the one posting whose transaction description is closest to DESC, - in the style of the register command. If there are multiple equally - good matches, it shows the most recent. Query options (options, not - arguments) can be used to restrict the search space. Helps ledger-au- + in the style of the register command. If there are multiple equally + good matches, it shows the most recent. Query options (options, not + arguments) can be used to restrict the search space. Helps ledger-au- tosync detect already-seen transactions when importing. rewrite rewrite Print all transactions, rewriting the postings of matched transactions. - For now the only rewrite available is adding new postings, like print + For now the only rewrite available is adding new postings, like print --auto. This is a start at a generic rewriter of transaction entries. It reads - the default journal and prints the transactions, like print, but adds + the default journal and prints the transactions, like print, but adds one or more specified postings to any transactions matching QUERY. The - posting amounts can be fixed, or a multiplier of the existing transac- + posting amounts can be fixed, or a multiplier of the existing transac- tion's first posting amount. Examples: @@ -2866,7 +2861,7 @@ COMMANDS (reserve:grocery) *0.25 ; reserve 25% for grocery (reserve:) *0.25 ; reserve 25% for grocery - Note the single quotes to protect the dollar sign from bash, and the + Note the single quotes to protect the dollar sign from bash, and the two spaces between account and amount. More: @@ -2876,16 +2871,16 @@ COMMANDS $ hledger rewrite -- expenses:gifts --add-posting '(budget:gifts) *-1"' $ hledger rewrite -- ^income --add-posting '(budget:foreign currency) *0.25 JPY; diversify' - Argument for --add-posting option is a usual posting of transaction - with an exception for amount specification. More precisely, you can + Argument for --add-posting option is a usual posting of transaction + with an exception for amount specification. More precisely, you can use '*' (star symbol) before the amount to indicate that that this is a - factor for an amount of original matched posting. If the amount in- + factor for an amount of original matched posting. If the amount in- cludes a commodity name, the new posting amount will be in the new com- - modity; otherwise, it will be in the matched posting amount's commod- + modity; otherwise, it will be in the matched posting amount's commod- ity. Re-write rules in a file - During the run this tool will execute so called "Automated Transac- + During the run this tool will execute so called "Automated Transac- tions" found in any journal it process. I.e instead of specifying this operations in command line you can put them in a journal file. @@ -2900,7 +2895,7 @@ COMMANDS budget:gifts *-1 assets:budget *1 - Note that '=' (equality symbol) that is used instead of date in trans- + Note that '=' (equality symbol) that is used instead of date in trans- actions you usually write. It indicates the query by which you want to match the posting to add new ones. @@ -2913,12 +2908,12 @@ COMMANDS --add-posting 'assets:budget *1' \ > rewritten-tidy-output.journal - It is important to understand that relative order of such entries in - journal is important. You can re-use result of previously added post- + It is important to understand that relative order of such entries in + journal is important. You can re-use result of previously added post- ings. Diff output format - To use this tool for batch modification of your journal files you may + To use this tool for batch modification of your journal files you may find useful output in form of unified diff. $ hledger rewrite -- --diff -f examples/sample.journal '^income' --add-posting '(liabilities:tax) *.33' @@ -2942,10 +2937,10 @@ COMMANDS If you'll pass this through patch tool you'll get transactions contain- ing the posting that matches your query be updated. Note that multiple - files might be update according to list of input files specified via + files might be update according to list of input files specified via --file options and include directives inside of these files. - Be careful. Whole transaction being re-formatted in a style of output + Be careful. Whole transaction being re-formatted in a style of output from hledger print. See also: @@ -2953,48 +2948,48 @@ COMMANDS https://github.com/simonmichael/hledger/issues/99 rewrite vs. print --auto - This command predates print --auto, and currently does much the same + This command predates print --auto, and currently does much the same thing, but with these differences: - o with multiple files, rewrite lets rules in any file affect all other - files. print --auto uses standard directive scoping; rules affect + o with multiple files, rewrite lets rules in any file affect all other + files. print --auto uses standard directive scoping; rules affect only child files. - o rewrite's query limits which transactions can be rewritten; all are + o rewrite's query limits which transactions can be rewritten; all are printed. print --auto's query limits which transactions are printed. - o rewrite applies rules specified on command line or in the journal. + o rewrite applies rules specified on command line or in the journal. print --auto applies rules specified in the journal. roi roi - Shows the time-weighted (TWR) and money-weighted (IRR) rate of return + Shows the time-weighted (TWR) and money-weighted (IRR) rate of return on your investments. - This command assumes that you have account(s) that hold nothing but + This command assumes that you have account(s) that hold nothing but your investments and whenever you record current appraisal/valuation of these investments you offset unrealized profit and loss into account(s) that, again, hold nothing but unrealized profit and loss. - Any transactions affecting balance of investment account(s) and not - originating from unrealized profit and loss account(s) are assumed to + Any transactions affecting balance of investment account(s) and not + originating from unrealized profit and loss account(s) are assumed to be your investments or withdrawals. - At a minimum, you need to supply a query (which could be just an ac- + At a minimum, you need to supply a query (which could be just an ac- count name) to select your investments with --inv, and another query to identify your profit and loss transactions with --pnl. - It will compute and display the internalized rate of return (IRR) and - time-weighted rate of return (TWR) for your investments for the time - period requested. Both rates of return are annualized before display, + It will compute and display the internalized rate of return (IRR) and + time-weighted rate of return (TWR) for your investments for the time + period requested. Both rates of return are annualized before display, regardless of the length of reporting interval. stats stats Show some journal statistics. - The stats command displays summary information for the whole journal, - or a matched part of it. With a reporting interval, it shows a report + The stats command displays summary information for the whole journal, + or a matched part of it. With a reporting interval, it shows a report for each report period. Example: @@ -3012,14 +3007,14 @@ COMMANDS Commodities : 1 ($) Market prices : 12 ($) - This command also supports output destination and output format selec- + This command also supports output destination and output format selec- tion. tags tags - List all the tag names used in the journal. With a TAGREGEX argument, - only tag names matching the regular expression (case insensitive) are - shown. With QUERY arguments, only transactions matching the query are + List all the tag names used in the journal. With a TAGREGEX argument, + only tag names matching the regular expression (case insensitive) are + shown. With QUERY arguments, only transactions matching the query are considered. With --values flag, the tags' unique values are listed in- stead. @@ -3027,13 +3022,13 @@ COMMANDS test Run built-in unit tests. - This command runs the unit tests built in to hledger and hledger-lib, - printing the results on stdout. If any test fails, the exit code will + This command runs the unit tests built in to hledger and hledger-lib, + printing the results on stdout. If any test fails, the exit code will be non-zero. - This is mainly used by hledger developers, but you can also use it to - sanity-check the installed hledger executable on your platform. All - tests are expected to pass - if you ever see a failure, please report + This is mainly used by hledger developers, but you can also use it to + sanity-check the installed hledger executable on your platform. All + tests are expected to pass - if you ever see a failure, please report as a bug! This command also accepts tasty test runner options, written after a -- @@ -3042,35 +3037,35 @@ COMMANDS $ hledger test -- -pData.Amount --color=never - For help on these, see https://github.com/feuerbach/tasty#options (-- + For help on these, see https://github.com/feuerbach/tasty#options (-- --help currently doesn't show them). Add-on commands - hledger also searches for external add-on commands, and will include + hledger also searches for external add-on commands, and will include these in the commands list. These are programs or scripts in your PATH - whose name starts with hledger- and ends with a recognised file exten- + whose name starts with hledger- and ends with a recognised file exten- sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh). - Add-ons can be invoked like any hledger command, but there are a few + Add-ons can be invoked like any hledger command, but there are a few things to be aware of. Eg if the hledger-web add-on is installed, - o hledger -h web shows hledger's help, while hledger web -h shows + o hledger -h web shows hledger's help, while hledger web -h shows hledger-web's help. - o Flags specific to the add-on must have a preceding -- to hide them - from hledger. So hledger web --serve --port 9000 will be rejected; + o Flags specific to the add-on must have a preceding -- to hide them + from hledger. So hledger web --serve --port 9000 will be rejected; you must use hledger web -- --serve --port 9000. o You can always run add-ons directly if preferred: hledger-web --serve --port 9000. - Add-ons are a relatively easy way to add local features or experiment - with new ideas. They can be written in any language, but haskell - scripts have a big advantage: they can use the same hledger (and - haskell) library functions that built-in commands do, for command-line + Add-ons are a relatively easy way to add local features or experiment + with new ideas. They can be written in any language, but haskell + scripts have a big advantage: they can use the same hledger (and + haskell) library functions that built-in commands do, for command-line options, journal parsing, reporting, etc. - Two important add-ons are the hledger-ui and hledger-web user inter- + Two important add-ons are the hledger-ui and hledger-web user inter- faces. These are maintained and released along with hledger: ui @@ -3089,23 +3084,23 @@ COMMANDS hledger-interest generates interest transactions for an account accord- ing to various schemes. - A few more experimental or old add-ons can be found in hledger's bin/ + A few more experimental or old add-ons can be found in hledger's bin/ directory. These are typically prototypes and not guaranteed to work. ENVIRONMENT - COLUMNS The screen width used by the register command. Default: the + COLUMNS The screen width used by the register command. Default: the full terminal width. LEDGER_FILE The journal file path when not specified with -f. Default: - ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- + ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour- nal). - A typical value is ~/DIR/YYYY.journal, where DIR is a version-con- - trolled finance directory and YYYY is the current year. Or ~/DIR/cur- + A typical value is ~/DIR/YYYY.journal, where DIR is a version-con- + trolled finance directory and YYYY is the current year. Or ~/DIR/cur- rent.journal, where current.journal is a symbolic link to YYYY.journal. On Mac computers, you can set this and other environment variables in a - more thorough way that also affects applications started from the GUI + more thorough way that also affects applications started from the GUI (say, an Emacs dock icon). Eg on MacOS Catalina I have a ~/.MacOSX/en- vironment.plist file containing @@ -3116,13 +3111,13 @@ ENVIRONMENT To see the effect you may need to killall Dock, or reboot. FILES - Reads data from one or more files in hledger journal, timeclock, time- - dot, or CSV format specified with -f, or $LEDGER_FILE, or - $HOME/.hledger.journal (on windows, perhaps + Reads data from one or more files in hledger journal, timeclock, time- + dot, or CSV format specified with -f, or $LEDGER_FILE, or + $HOME/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.journal). LIMITATIONS - The need to precede addon command options with -- when invoked from + The need to precede addon command options with -- when invoked from hledger is awkward. When input data contains non-ascii characters, a suitable system locale @@ -3138,36 +3133,36 @@ LIMITATIONS In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger add. - Not all of Ledger's journal file syntax is supported. See file format + Not all of Ledger's journal file syntax is supported. See file format differences. - On large data files, hledger is slower and uses more memory than + On large data files, hledger is slower and uses more memory than Ledger. TROUBLESHOOTING - Here are some issues you might encounter when you run hledger (and re- - member you can also seek help from the IRC channel, mail list or bug + Here are some issues you might encounter when you run hledger (and re- + member you can also seek help from the IRC channel, mail list or bug tracker): Successfully installed, but "No command 'hledger' found" stack and cabal install binaries into a special directory, which should - be added to your PATH environment variable. Eg on unix-like systems, + be added to your PATH environment variable. Eg on unix-like systems, that is ~/.local/bin and ~/.cabal/bin respectively. I set a custom LEDGER_FILE, but hledger is still using the default file - LEDGER_FILE should be a real environment variable, not just a shell - variable. The command env | grep LEDGER_FILE should show it. You may + LEDGER_FILE should be a real environment variable, not just a shell + variable. The command env | grep LEDGER_FILE should show it. You may need to use export. Here's an explanation. - Getting errors like "Illegal byte sequence" or "Invalid or incomplete - multibyte or wide character" or "commitAndReleaseBuffer: invalid argu- + Getting errors like "Illegal byte sequence" or "Invalid or incomplete + multibyte or wide character" or "commitAndReleaseBuffer: invalid argu- ment (invalid character)" Programs compiled with GHC (hledger, haskell build tools, etc.) need to have a UTF-8-aware locale configured in the environment, otherwise they - will fail with these kinds of errors when they encounter non-ascii + will fail with these kinds of errors when they encounter non-ascii characters. - To fix it, set the LANG environment variable to some locale which sup- + To fix it, set the LANG environment variable to some locale which sup- ports UTF-8. The locale you choose must be installed on your system. Here's an example of setting LANG temporarily, on Ubuntu GNU/Linux: @@ -3182,8 +3177,8 @@ TROUBLESHOOTING POSIX $ LANG=en_US.utf8 hledger -f my.journal print # ensure it is used for this command - If available, C.UTF-8 will also work. If your preferred locale isn't - listed by locale -a, you might need to install it. Eg on Ubuntu/De- + If available, C.UTF-8 will also work. If your preferred locale isn't + listed by locale -a, you might need to install it. Eg on Ubuntu/De- bian: $ apt-get install language-pack-fr @@ -3203,8 +3198,8 @@ TROUBLESHOOTING $ echo "export LANG=en_US.utf8" >>~/.bash_profile $ bash --login - Exact spelling and capitalisation may be important. Note the differ- - ence on MacOS (UTF-8, not utf8). Some platforms (eg ubuntu) allow + Exact spelling and capitalisation may be important. Note the differ- + ence on MacOS (UTF-8, not utf8). Some platforms (eg ubuntu) allow variant spellings, but others (eg macos) require it to be exact: $ locale -a | grep -iE en_us.*utf @@ -3214,7 +3209,7 @@ TROUBLESHOOTING REPORTING BUGS - Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel + Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list) @@ -3228,7 +3223,7 @@ COPYRIGHT SEE ALSO - hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), + hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time- dot(5), ledger(1) @@ -3236,4 +3231,4 @@ SEE ALSO -hledger 1.17.99 May 2020 hledger(1) +hledger 1.17.99 June 2020 hledger(1)