From ce4de7aeb9bc38c128078fabcec293ad9228a991 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 21 Jun 2020 10:36:21 -0700 Subject: [PATCH] ;doc: regen manuals [ci skip] --- hledger-lib/hledger_csv.5 | 2 +- hledger-lib/hledger_csv.info | 140 ++--- hledger-lib/hledger_csv.txt | 2 +- hledger-lib/hledger_journal.5 | 19 +- hledger-lib/hledger_journal.info | 257 ++++----- hledger-lib/hledger_journal.txt | 303 +++++------ hledger-lib/hledger_timeclock.5 | 2 +- hledger-lib/hledger_timeclock.info | 4 +- hledger-lib/hledger_timeclock.txt | 2 +- hledger-lib/hledger_timedot.5 | 2 +- hledger-lib/hledger_timedot.info | 4 +- hledger-lib/hledger_timedot.txt | 2 +- hledger-ui/hledger-ui.1 | 2 +- hledger-ui/hledger-ui.info | 44 +- hledger-ui/hledger-ui.txt | 2 +- hledger-web/hledger-web.1 | 2 +- hledger-web/hledger-web.info | 36 +- hledger-web/hledger-web.txt | 2 +- hledger/hledger.1 | 50 +- hledger/hledger.info | 437 ++++++++------- hledger/hledger.txt | 816 ++++++++++++++--------------- 21 files changed, 1066 insertions(+), 1064 deletions(-) diff --git a/hledger-lib/hledger_csv.5 b/hledger-lib/hledger_csv.5 index 836d8becb..d1d6f00e7 100644 --- a/hledger-lib/hledger_csv.5 +++ b/hledger-lib/hledger_csv.5 @@ -1,6 +1,6 @@ .\"t -.TH "hledger_csv" "5" "June 2020" "hledger 1.18" "hledger User Manuals" +.TH "hledger_csv" "5" "June 2020" "hledger 1.18.99" "hledger User Manuals" diff --git a/hledger-lib/hledger_csv.info b/hledger-lib/hledger_csv.info index 5cbb9903f..8efccb90f 100644 --- a/hledger-lib/hledger_csv.info +++ b/hledger-lib/hledger_csv.info @@ -3,8 +3,8 @@ This is hledger_csv.info, produced by makeinfo version 6.7 from stdin.  File: hledger_csv.info, Node: Top, Next: EXAMPLES, Up: (dir) -hledger_csv(5) hledger 1.18 -*************************** +hledger_csv(5) hledger 1.18.99 +****************************** CSV - how hledger reads CSV data, and the CSV rules file format @@ -1036,74 +1036,74 @@ command the user specified.  Tag Table: Node: Top72 -Node: EXAMPLES2174 -Ref: #examples2280 -Node: Basic2488 -Ref: #basic2588 -Node: Bank of Ireland3130 -Ref: #bank-of-ireland3265 -Node: Amazon4727 -Ref: #amazon4845 -Node: Paypal6564 -Ref: #paypal6658 -Node: CSV RULES14302 -Ref: #csv-rules14411 -Node: skip14687 -Ref: #skip14780 -Node: fields15155 -Ref: #fields15277 -Node: Transaction field names16442 -Ref: #transaction-field-names16602 -Node: Posting field names16713 -Ref: #posting-field-names16865 -Node: account16935 -Ref: #account17051 -Node: amount17588 -Ref: #amount17719 -Node: currency18826 -Ref: #currency18961 -Node: balance19167 -Ref: #balance19301 -Node: comment19618 -Ref: #comment19735 -Node: field assignment19898 -Ref: #field-assignment20041 -Node: separator20859 -Ref: #separator20988 -Node: if21399 -Ref: #if21501 -Node: end23657 -Ref: #end23763 -Node: date-format23987 -Ref: #date-format24119 -Node: newest-first24868 -Ref: #newest-first25006 -Node: include25689 -Ref: #include25818 -Node: balance-type26262 -Ref: #balance-type26382 -Node: TIPS27082 -Ref: #tips27164 -Node: Rapid feedback27420 -Ref: #rapid-feedback27537 -Node: Valid CSV27997 -Ref: #valid-csv28127 -Node: File Extension28319 -Ref: #file-extension28471 -Node: Reading multiple CSV files28881 -Ref: #reading-multiple-csv-files29066 -Node: Valid transactions29307 -Ref: #valid-transactions29485 -Node: Deduplicating importing30113 -Ref: #deduplicating-importing30292 -Node: Setting amounts31325 -Ref: #setting-amounts31494 -Node: Setting currency/commodity32481 -Ref: #setting-currencycommodity32673 -Node: Referencing other fields33476 -Ref: #referencing-other-fields33676 -Node: How CSV rules are evaluated34573 -Ref: #how-csv-rules-are-evaluated34746 +Node: EXAMPLES2180 +Ref: #examples2286 +Node: Basic2494 +Ref: #basic2594 +Node: Bank of Ireland3136 +Ref: #bank-of-ireland3271 +Node: Amazon4733 +Ref: #amazon4851 +Node: Paypal6570 +Ref: #paypal6664 +Node: CSV RULES14308 +Ref: #csv-rules14417 +Node: skip14693 +Ref: #skip14786 +Node: fields15161 +Ref: #fields15283 +Node: Transaction field names16448 +Ref: #transaction-field-names16608 +Node: Posting field names16719 +Ref: #posting-field-names16871 +Node: account16941 +Ref: #account17057 +Node: amount17594 +Ref: #amount17725 +Node: currency18832 +Ref: #currency18967 +Node: balance19173 +Ref: #balance19307 +Node: comment19624 +Ref: #comment19741 +Node: field assignment19904 +Ref: #field-assignment20047 +Node: separator20865 +Ref: #separator20994 +Node: if21405 +Ref: #if21507 +Node: end23663 +Ref: #end23769 +Node: date-format23993 +Ref: #date-format24125 +Node: newest-first24874 +Ref: #newest-first25012 +Node: include25695 +Ref: #include25824 +Node: balance-type26268 +Ref: #balance-type26388 +Node: TIPS27088 +Ref: #tips27170 +Node: Rapid feedback27426 +Ref: #rapid-feedback27543 +Node: Valid CSV28003 +Ref: #valid-csv28133 +Node: File Extension28325 +Ref: #file-extension28477 +Node: Reading multiple CSV files28887 +Ref: #reading-multiple-csv-files29072 +Node: Valid transactions29313 +Ref: #valid-transactions29491 +Node: Deduplicating importing30119 +Ref: #deduplicating-importing30298 +Node: Setting amounts31331 +Ref: #setting-amounts31500 +Node: Setting currency/commodity32487 +Ref: #setting-currencycommodity32679 +Node: Referencing other fields33482 +Ref: #referencing-other-fields33682 +Node: How CSV rules are evaluated34579 +Ref: #how-csv-rules-are-evaluated34752  End Tag Table diff --git a/hledger-lib/hledger_csv.txt b/hledger-lib/hledger_csv.txt index a6b0ab548..54ea3c77c 100644 --- a/hledger-lib/hledger_csv.txt +++ b/hledger-lib/hledger_csv.txt @@ -852,4 +852,4 @@ SEE ALSO -hledger 1.18 June 2020 hledger_csv(5) +hledger 1.18.99 June 2020 hledger_csv(5) diff --git a/hledger-lib/hledger_journal.5 b/hledger-lib/hledger_journal.5 index 246d3c9bc..ba00766b2 100644 --- a/hledger-lib/hledger_journal.5 +++ b/hledger-lib/hledger_journal.5 @@ -1,6 +1,6 @@ .\"t -.TH "hledger_journal" "5" "June 2020" "hledger 1.18" "hledger User Manuals" +.TH "hledger_journal" "5" "June 2020" "hledger 1.18.99" "hledger User Manuals" @@ -1143,15 +1143,20 @@ files can be included (not CSV files, currently). 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: +A tilde means home directory, eg: \f[C]include \[ti]/main.journal\f[R]. +.PP +The path 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]. +There is limited support for recursive wildcards: \f[C]**/\f[R] (the +slash is required) matches 0 or more subdirectories. +It\[aq]s not super convenient since you have to avoid include cycles and +including directories, but this can be done, eg: +\f[C]include */**/*.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]. +The path 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 diff --git a/hledger-lib/hledger_journal.info b/hledger-lib/hledger_journal.info index 8bc3045bc..0e1edd280 100644 --- a/hledger-lib/hledger_journal.info +++ b/hledger-lib/hledger_journal.info @@ -4,8 +4,8 @@ stdin.  File: hledger_journal.info, Node: Top, Up: (dir) -hledger_journal(5) hledger 1.18 -******************************* +hledger_journal(5) hledger 1.18.99 +********************************** Journal - hledger's default file format, representing a General Journal @@ -1023,14 +1023,19 @@ timedot files can be included (not CSV files, currently). 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'. + A tilde means home directory, eg: 'include ~/main.journal'. - Or a tilde, meaning home directory: 'include ~/main.journal'. + The path may contain glob patterns to match multiple files, eg: +'include *.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'. + There is limited support for recursive wildcards: '**/' (the slash is +required) matches 0 or more subdirectories. It's not super convenient +since you have to avoid include cycles and including directories, but +this can be done, eg: 'include */**/*.journal'. + + The path 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 @@ -1823,124 +1828,124 @@ will have these tags added:  Tag Table: Node: Top76 -Node: Transactions1869 -Ref: #transactions1961 -Node: Dates3245 -Ref: #dates3344 -Node: Simple dates3409 -Ref: #simple-dates3535 -Node: Secondary dates4044 -Ref: #secondary-dates4198 -Node: Posting dates5534 -Ref: #posting-dates5663 -Node: Status7035 -Ref: #status7156 -Node: Description8864 -Ref: #description8998 -Node: Payee and note9318 -Ref: #payee-and-note9432 -Node: Comments9767 -Ref: #comments9893 -Node: Tags11087 -Ref: #tags11202 -Node: Postings12595 -Ref: #postings12723 -Node: Virtual postings13749 -Ref: #virtual-postings13866 -Node: Account names15171 -Ref: #account-names15312 -Node: Amounts15799 -Ref: #amounts15938 -Node: Digit group marks17046 -Ref: #digit-group-marks17194 -Node: Amount display style18132 -Ref: #amount-display-style18286 -Node: Transaction prices19723 -Ref: #transaction-prices19895 -Node: Lot prices and lot dates22227 -Ref: #lot-prices-and-lot-dates22424 -Node: Balance assertions22912 -Ref: #balance-assertions23098 -Node: Assertions and ordering24131 -Ref: #assertions-and-ordering24319 -Node: Assertions and included files25019 -Ref: #assertions-and-included-files25262 -Node: Assertions and multiple -f options25595 -Ref: #assertions-and-multiple--f-options25851 -Node: Assertions and commodities25983 -Ref: #assertions-and-commodities26215 -Node: Assertions and prices27372 -Ref: #assertions-and-prices27586 -Node: Assertions and subaccounts28026 -Ref: #assertions-and-subaccounts28255 -Node: Assertions and virtual postings28579 -Ref: #assertions-and-virtual-postings28821 -Node: Assertions and precision28963 -Ref: #assertions-and-precision29156 -Node: Balance assignments29423 -Ref: #balance-assignments29597 -Node: Balance assignments and prices30761 -Ref: #balance-assignments-and-prices30933 -Node: Directives31157 -Ref: #directives31316 -Node: Directives and multiple files37007 -Ref: #directives-and-multiple-files37190 -Node: Comment blocks37854 -Ref: #comment-blocks38037 -Node: Including other files38213 -Ref: #including-other-files38393 -Node: Default year39044 -Ref: #default-year39213 -Node: Declaring commodities39620 -Ref: #declaring-commodities39803 -Node: Default commodity41609 -Ref: #default-commodity41795 -Node: Declaring market prices42684 -Ref: #declaring-market-prices42879 -Node: Declaring accounts43736 -Ref: #declaring-accounts43922 -Node: Account comments44847 -Ref: #account-comments45010 -Node: Account subdirectives45434 -Ref: #account-subdirectives45629 -Node: Account types45942 -Ref: #account-types46126 -Node: Account display order47765 -Ref: #account-display-order47935 -Node: Rewriting accounts49086 -Ref: #rewriting-accounts49271 -Node: Basic aliases50028 -Ref: #basic-aliases50174 -Node: Regex aliases50878 -Ref: #regex-aliases51050 -Node: Combining aliases51768 -Ref: #combining-aliases51961 -Node: Aliases and multiple files53237 -Ref: #aliases-and-multiple-files53446 -Node: end aliases54025 -Ref: #end-aliases54182 -Node: Default parent account54283 -Ref: #default-parent-account54451 -Node: Periodic transactions55335 -Ref: #periodic-transactions55510 -Node: Periodic rule syntax57382 -Ref: #periodic-rule-syntax57588 -Node: Two spaces between period expression and description!58292 -Ref: #two-spaces-between-period-expression-and-description58611 -Node: Forecasting with periodic transactions59295 -Ref: #forecasting-with-periodic-transactions59600 -Node: Budgeting with periodic transactions61655 -Ref: #budgeting-with-periodic-transactions61894 -Node: Auto postings62343 -Ref: #auto-postings62483 -Node: Auto postings and multiple files64662 -Ref: #auto-postings-and-multiple-files64866 -Node: Auto postings and dates65075 -Ref: #auto-postings-and-dates65349 -Node: Auto postings and transaction balancing / inferred amounts / balance assertions65524 -Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions65875 -Node: Auto posting tags66217 -Ref: #auto-posting-tags66432 +Node: Transactions1875 +Ref: #transactions1967 +Node: Dates3251 +Ref: #dates3350 +Node: Simple dates3415 +Ref: #simple-dates3541 +Node: Secondary dates4050 +Ref: #secondary-dates4204 +Node: Posting dates5540 +Ref: #posting-dates5669 +Node: Status7041 +Ref: #status7162 +Node: Description8870 +Ref: #description9004 +Node: Payee and note9324 +Ref: #payee-and-note9438 +Node: Comments9773 +Ref: #comments9899 +Node: Tags11093 +Ref: #tags11208 +Node: Postings12601 +Ref: #postings12729 +Node: Virtual postings13755 +Ref: #virtual-postings13872 +Node: Account names15177 +Ref: #account-names15318 +Node: Amounts15805 +Ref: #amounts15944 +Node: Digit group marks17052 +Ref: #digit-group-marks17200 +Node: Amount display style18138 +Ref: #amount-display-style18292 +Node: Transaction prices19729 +Ref: #transaction-prices19901 +Node: Lot prices and lot dates22233 +Ref: #lot-prices-and-lot-dates22430 +Node: Balance assertions22918 +Ref: #balance-assertions23104 +Node: Assertions and ordering24137 +Ref: #assertions-and-ordering24325 +Node: Assertions and included files25025 +Ref: #assertions-and-included-files25268 +Node: Assertions and multiple -f options25601 +Ref: #assertions-and-multiple--f-options25857 +Node: Assertions and commodities25989 +Ref: #assertions-and-commodities26221 +Node: Assertions and prices27378 +Ref: #assertions-and-prices27592 +Node: Assertions and subaccounts28032 +Ref: #assertions-and-subaccounts28261 +Node: Assertions and virtual postings28585 +Ref: #assertions-and-virtual-postings28827 +Node: Assertions and precision28969 +Ref: #assertions-and-precision29162 +Node: Balance assignments29429 +Ref: #balance-assignments29603 +Node: Balance assignments and prices30767 +Ref: #balance-assignments-and-prices30939 +Node: Directives31163 +Ref: #directives31322 +Node: Directives and multiple files37013 +Ref: #directives-and-multiple-files37196 +Node: Comment blocks37860 +Ref: #comment-blocks38043 +Node: Including other files38219 +Ref: #including-other-files38399 +Node: Default year39323 +Ref: #default-year39492 +Node: Declaring commodities39899 +Ref: #declaring-commodities40082 +Node: Default commodity41888 +Ref: #default-commodity42074 +Node: Declaring market prices42963 +Ref: #declaring-market-prices43158 +Node: Declaring accounts44015 +Ref: #declaring-accounts44201 +Node: Account comments45126 +Ref: #account-comments45289 +Node: Account subdirectives45713 +Ref: #account-subdirectives45908 +Node: Account types46221 +Ref: #account-types46405 +Node: Account display order48044 +Ref: #account-display-order48214 +Node: Rewriting accounts49365 +Ref: #rewriting-accounts49550 +Node: Basic aliases50307 +Ref: #basic-aliases50453 +Node: Regex aliases51157 +Ref: #regex-aliases51329 +Node: Combining aliases52047 +Ref: #combining-aliases52240 +Node: Aliases and multiple files53516 +Ref: #aliases-and-multiple-files53725 +Node: end aliases54304 +Ref: #end-aliases54461 +Node: Default parent account54562 +Ref: #default-parent-account54730 +Node: Periodic transactions55614 +Ref: #periodic-transactions55789 +Node: Periodic rule syntax57661 +Ref: #periodic-rule-syntax57867 +Node: Two spaces between period expression and description!58571 +Ref: #two-spaces-between-period-expression-and-description58890 +Node: Forecasting with periodic transactions59574 +Ref: #forecasting-with-periodic-transactions59879 +Node: Budgeting with periodic transactions61934 +Ref: #budgeting-with-periodic-transactions62173 +Node: Auto postings62622 +Ref: #auto-postings62762 +Node: Auto postings and multiple files64941 +Ref: #auto-postings-and-multiple-files65145 +Node: Auto postings and dates65354 +Ref: #auto-postings-and-dates65628 +Node: Auto postings and transaction balancing / inferred amounts / balance assertions65803 +Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions66154 +Node: Auto posting tags66496 +Ref: #auto-posting-tags66711  End Tag Table diff --git a/hledger-lib/hledger_journal.txt b/hledger-lib/hledger_journal.txt index 6324e0a13..5613eb225 100644 --- a/hledger-lib/hledger_journal.txt +++ b/hledger-lib/hledger_journal.txt @@ -792,18 +792,23 @@ FILE FORMAT 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 + A tilde means home directory, eg: include ~/main.journal. + + The path may contain glob patterns to match multiple files, eg: include *.journal. - Or a tilde, meaning home directory: include ~/main.journal. + There is limited support for recursive wildcards: **/ (the slash is re- + quired) matches 0 or more subdirectories. It's not super convenient + since you have to avoid include cycles and including directories, but + this can be done, eg: include */**/*.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. + The path may also be prefixed to force a specific file format, overrid- + ing the file extension (as described in hledger.1 -> Input files): in- + clude timedot:~/notes/2020*.md. Default year - You can set a default year to be used for subsequent dates which don't - specify a year. This is a line beginning with Y followed by the year. + You can set a default year to be used for subsequent dates which don't + specify a year. This is a line beginning with Y followed by the year. Eg: Y2009 ; set default year to 2009 @@ -825,19 +830,19 @@ FILE FORMAT Declaring commodities The commodity directive has several functions: - 1. It declares commodities which may be used in the journal. This is + 1. It declares commodities which may be used in the journal. This is currently not enforced, but can serve as documentation. - 2. It declares what decimal mark character (period or comma) to expect - when parsing input - useful to disambiguate international number - formats in your data. (Without this, hledger will parse both 1,000 + 2. It declares what decimal mark character (period or comma) to expect + when parsing input - useful to disambiguate international number + formats in your data. (Without this, hledger will parse both 1,000 and 1.000 as 1). - 3. It declares the amount display style to use in output - decimal and + 3. It declares the amount display style to use in output - decimal and digit group marks, number of decimal places, symbol placement etc. - You are likely to run into one of the problems solved by commodity di- - rectives, sooner or later, so it's a good idea to just always use them + You are likely to run into one of the problems solved by commodity di- + rectives, sooner or later, so it's a good idea to just always use them to declare your commodities. A commodity directive is just the word commodity followed by an amount. @@ -850,8 +855,8 @@ FILE FORMAT ; separating thousands with comma. commodity 1,000.0000 AAAA - or on multiple lines, using the "format" subdirective. (In this case - the commodity symbol appears twice and should be the same in both + or on multiple lines, using the "format" subdirective. (In this case + the commodity symbol appears twice and should be the same in both places.): ; commodity SYMBOL @@ -864,22 +869,22 @@ FILE FORMAT format INR 1,00,00,000.00 The quantity of the amount does not matter; only the format is signifi- - cant. The number must include a decimal mark: either a period or a + cant. The number must include a decimal mark: either a period or a comma, followed by 0 or more decimal digits. - Note hledger normally uses banker's rounding, so 0.5 displayed with + Note hledger normally uses banker's rounding, so 0.5 displayed with zero decimal digits is "0". (More at Amount display style.) Default commodity - The D directive sets a default commodity, to be used for amounts with- + The D directive sets a default commodity, to be used for amounts with- out a commodity symbol (ie, plain numbers). This commodity will be ap- plied to all subsequent commodity-less amounts, or until the next D di- rective. (Note, this is different from Ledger's D.) - For compatibility/historical reasons, D also acts like a commodity di- + For compatibility/historical reasons, D also acts like a commodity di- rective, setting the commodity's display style (for output) and decimal mark (for parsing input). As with commodity, the amount must always be - written with a decimal mark (period or comma). If both directives are + written with a decimal mark (period or comma). If both directives are used, commodity's style takes precedence. The syntax is D AMOUNT. Eg: @@ -893,9 +898,9 @@ FILE FORMAT b Declaring market prices - The P directive declares a market price, which is an exchange rate be- - tween two commodities on a certain date. (In Ledger, they are called - "historical prices".) These are often obtained from a stock exchange, + The P directive declares a market price, which is an exchange rate be- + tween two commodities on a certain date. (In Ledger, they are called + "historical prices".) These are often obtained from a stock exchange, cryptocurrency exchange, or the foreign exchange market. Here is the format: @@ -906,16 +911,16 @@ FILE FORMAT o COMMODITYA is the symbol of the commodity being priced - o COMMODITYBAMOUNT is an amount (symbol and quantity) in a second com- + o COMMODITYBAMOUNT is an amount (symbol and quantity) in a second com- modity, giving the price in commodity B of one unit of commodity A. - These two market price directives say that one euro was worth 1.35 US + These two market price directives say that one euro was worth 1.35 US dollars during 2009, and $1.40 from 2010 onward: P 2009/1/1 EUR $1.35 P 2010/1/1 EUR $1.40 - The -V, -X and --value flags use these market prices to show amount + The -V, -X and --value flags use these market prices to show amount values in another commodity. See Valuation. Declaring accounts @@ -925,20 +930,20 @@ FILE FORMAT o They can document your intended chart of accounts, providing a refer- ence. - o They can store extra information about accounts (account numbers, + o They can store extra information about accounts (account numbers, notes, etc.) - o They can help hledger know your accounts' types (asset, liability, - equity, revenue, expense), useful for reports like balancesheet and + o They can help hledger know your accounts' types (asset, liability, + equity, revenue, expense), useful for reports like balancesheet and incomestatement. - o They control account display order in reports, allowing non-alpha- + o They control account display order in reports, allowing non-alpha- betic sorting (eg Revenues to appear above Expenses). - o They help with account name completion in the add command, hledger- + o They help with account name completion in the add command, hledger- iadd, hledger-web, ledger-mode etc. - The simplest form is just the word account followed by a hledger-style + The simplest form is just the word account followed by a hledger-style account name, eg: account assets:bank:checking @@ -946,7 +951,7 @@ FILE FORMAT Account comments Comments, beginning with a semicolon, can be added: - o on the same line, after two or more spaces (because ; is allowed in + o on the same line, after two or more spaces (because ; is allowed in account names) o on the next lines, indented @@ -960,7 +965,7 @@ FILE FORMAT Same-line comments are not supported by Ledger, or hledger <1.13. Account subdirectives - We also allow (and ignore) Ledger-style indented subdirectives, just + We also allow (and ignore) Ledger-style indented subdirectives, just for compatibility.: account assets:bank:checking @@ -973,18 +978,18 @@ FILE FORMAT [LEDGER-STYLE SUBDIRECTIVES, IGNORED] Account types - hledger recognises five types (or classes) of account: Asset, Liabil- - ity, Equity, Revenue, Expense. This is used by a few accounting-aware + hledger recognises five types (or classes) of account: Asset, Liabil- + ity, Equity, Revenue, Expense. This is used by a few accounting-aware reports such as balancesheet, incomestatement and cashflow. Auto-detected account types If you name your top-level accounts with some variation of assets, lia- - bilities/debts, equity, revenues/income, or expenses, their types are + bilities/debts, equity, revenues/income, or expenses, their types are detected automatically. Account types declared with tags - More generally, you can declare an account's type with an account di- - rective, by writing a type: tag in a comment, followed by one of the + More generally, you can declare an account's type with an account di- + rective, by writing a type: tag in a comment, followed by one of the words Asset, Liability, Equity, Revenue, Expense, or one of the letters ALERX (case insensitive): @@ -995,8 +1000,8 @@ FILE FORMAT account expenses ; type:Expense Account types declared with account type codes - Or, you can write one of those letters separated from the account name - by two or more spaces, but this should probably be considered depre- + Or, you can write one of those letters separated from the account name + by two or more spaces, but this should probably be considered depre- cated as of hledger 1.13: account assets A @@ -1006,7 +1011,7 @@ FILE FORMAT account expenses X Overriding auto-detected types - If you ever override the types of those auto-detected english account + If you ever override the types of those auto-detected english account names mentioned above, you might need to help the reports a bit. Eg: ; make "liabilities" not have the liability type - who knows why @@ -1017,8 +1022,8 @@ FILE FORMAT account - ; type:L Account display order - Account directives also set the order in which accounts are displayed, - eg in reports, the hledger-ui accounts screen, and the hledger-web + Account directives also set the order in which accounts are displayed, + eg in reports, the hledger-ui accounts screen, and the hledger-web sidebar. By default accounts are listed in alphabetical order. But if you have these account directives in the journal: @@ -1040,20 +1045,20 @@ FILE FORMAT Undeclared accounts, if any, are displayed last, in alphabetical order. - Note that sorting is done at each level of the account tree (within - each group of sibling accounts under the same parent). And currently, + Note that sorting is done at each level of the account tree (within + each group of sibling accounts under the same parent). And currently, this directive: account other:zoo - would influence the position of zoo among other's subaccounts, but not + would influence the position of zoo among other's subaccounts, but not the position of other among the top-level accounts. This means: - o you will sometimes declare parent accounts (eg account other above) + o you will sometimes declare parent accounts (eg account other above) that you don't intend to post to, just to customize their display or- der - o sibling accounts stay together (you couldn't display x:y in between + o sibling accounts stay together (you couldn't display x:y in between a:b and a:c). Rewriting accounts @@ -1071,14 +1076,14 @@ FILE FORMAT o customising reports Account aliases also rewrite account names in account directives. They - do not affect account names being entered via hledger add or hledger- + do not affect account names being entered via hledger add or hledger- web. See also Rewrite account names. Basic aliases - To set an account alias, use the alias directive in your journal file. - This affects all subsequent journal entries in the current file or its + To set an account alias, use the alias directive in your journal file. + This affects all subsequent journal entries in the current file or its included files. The spaces around the = are optional: alias OLD = NEW @@ -1086,49 +1091,49 @@ FILE FORMAT Or, you can use the --alias 'OLD=NEW' option on the command line. This affects all entries. It's useful for trying out aliases interactively. - OLD and NEW are case sensitive full account names. hledger will re- - place any occurrence of the old account name with the new one. Subac- + OLD and NEW are case sensitive full account names. hledger will re- + place any occurrence of the old account name with the new one. Subac- counts are also affected. Eg: alias checking = assets:bank:wells fargo:checking ; rewrites "checking" to "assets:bank:wells fargo:checking", or "checking:a" to "assets:bank:wells fargo:checking:a" Regex aliases - There is also a more powerful variant that uses a regular expression, + There is also a more powerful variant that uses a regular expression, indicated by the forward slashes: alias /REGEX/ = REPLACEMENT or --alias '/REGEX/=REPLACEMENT'. - REGEX is a case-insensitive regular expression. Anywhere it matches - inside an account name, the matched part will be replaced by REPLACE- - MENT. If REGEX contains parenthesised match groups, these can be ref- + REGEX is a case-insensitive regular expression. Anywhere it matches + inside an account name, the matched part will be replaced by REPLACE- + MENT. If REGEX contains parenthesised match groups, these can be ref- erenced by the usual numeric backreferences in REPLACEMENT. Eg: alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3 ; rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking" - Also note that REPLACEMENT continues to the end of line (or on command - line, to end of option argument), so it can contain trailing white- + Also note that REPLACEMENT continues to the end of line (or on command + line, to end of option argument), so it can contain trailing white- space. Combining aliases - You can define as many aliases as you like, using journal directives + You can define as many aliases as you like, using journal directives and/or command line options. - Recursive aliases - where an account name is rewritten by one alias, - then by another alias, and so on - are allowed. Each alias sees the + Recursive aliases - where an account name is rewritten by one alias, + then by another alias, and so on - are allowed. Each alias sees the effect of previously applied aliases. - In such cases it can be important to understand which aliases will be - applied and in which order. For (each account name in) each journal + In such cases it can be important to understand which aliases will be + applied and in which order. For (each account name in) each journal entry, we apply: - 1. alias directives preceding the journal entry, most recently parsed + 1. alias directives preceding the journal entry, most recently parsed first (ie, reading upward from the journal entry, bottom to top) - 2. --alias options, in the order they appeared on the command line + 2. --alias options, in the order they appeared on the command line (left to right). In other words, for (an account name in) a given journal entry: @@ -1139,20 +1144,20 @@ FILE FORMAT o aliases defined after/below the entry do not affect it. - This gives nearby aliases precedence over distant ones, and helps pro- - vide semantic stability - aliases will keep working the same way inde- + This gives nearby aliases precedence over distant ones, and helps pro- + vide semantic stability - aliases will keep working the same way inde- pendent of which files are being read and in which order. - In case of trouble, adding --debug=6 to the command line will show + In case of trouble, adding --debug=6 to the command line will show which aliases are being applied when. Aliases and multiple files - As explained at Directives and multiple files, alias directives do not + As explained at Directives and multiple files, alias directives do not affect parent or sibling files. Eg in this command, hledger -f a.aliases -f b.journal - account aliases defined in a.aliases will not affect b.journal. In- + account aliases defined in a.aliases will not affect b.journal. In- cluding the aliases doesn't work either: include a.aliases @@ -1174,14 +1179,14 @@ FILE FORMAT include c.journal ; also affected end aliases - You can clear (forget) all currently defined aliases with the end + You can clear (forget) all currently defined aliases with the end aliases directive: end aliases Default parent account - You can specify a parent account which will be prepended to all ac- - counts within a section of the journal. Use the apply account and end + You can specify a parent account which will be prepended to all ac- + counts within a section of the journal. Use the apply account and end apply account directives like so: apply account home @@ -1198,7 +1203,7 @@ FILE FORMAT home:food $10 home:cash $-10 - If end apply account is omitted, the effect lasts to the end of the + If end apply account is omitted, the effect lasts to the end of the file. Included files are also affected, eg: apply account business @@ -1207,50 +1212,50 @@ FILE FORMAT apply account personal include personal.journal - Prior to hledger 1.0, legacy account and end spellings were also sup- + Prior to hledger 1.0, legacy account and end spellings were also sup- ported. - A default parent account also affects account directives. It does not - affect account names being entered via hledger add or hledger-web. If - account aliases are present, they are applied after the default parent + A default parent account also affects account directives. It does not + affect account names being entered via hledger add or hledger-web. If + account aliases are present, they are applied after the default parent account. Periodic transactions - Periodic transaction rules describe transactions that recur. They al- - low hledger to generate temporary future transactions to help with - forecasting, so you don't have to write out each one in the journal, - and it's easy to try out different forecasts. Secondly, they are also + Periodic transaction rules describe transactions that recur. They al- + low hledger to generate temporary future transactions to help with + forecasting, so you don't have to write out each one in the journal, + and it's easy to try out different forecasts. Secondly, they are also used to define the budgets shown in budget reports. - Periodic transactions can be a little tricky, so before you use them, + Periodic transactions can be a little tricky, so before you use them, read this whole section - or at least these tips: - 1. Two spaces accidentally added or omitted will cause you trouble - + 1. Two spaces accidentally added or omitted will cause you trouble - read about this below. - 2. For troubleshooting, show the generated transactions with hledger - print --forecast tag:generated or hledger register --forecast + 2. For troubleshooting, show the generated transactions with hledger + print --forecast tag:generated or hledger register --forecast tag:generated. - 3. Forecasted transactions will begin only after the last non-fore- + 3. Forecasted transactions will begin only after the last non-fore- casted transaction's date. - 4. Forecasted transactions will end 6 months from today, by default. + 4. Forecasted transactions will end 6 months from today, by default. See below for the exact start/end rules. - 5. period expressions can be tricky. Their documentation needs im- + 5. period expressions can be tricky. Their documentation needs im- provement, but is worth studying. - 6. Some period expressions with a repeating interval must begin on a - natural boundary of that interval. Eg in weekly from DATE, DATE - must be a monday. ~ weekly from 2019/10/1 (a tuesday) will give an + 6. Some period expressions with a repeating interval must begin on a + natural boundary of that interval. Eg in weekly from DATE, DATE + must be a monday. ~ weekly from 2019/10/1 (a tuesday) will give an error. 7. Other period expressions with an interval are automatically expanded - to cover a whole number of that interval. (This is done to improve + to cover a whole number of that interval. (This is done to improve reports, but it also affects periodic transactions. Yes, it's a bit - inconsistent with the above.) Eg: ~ every 10th day of month from - 2020/01, which is equivalent to ~ every 10th day of month from + inconsistent with the above.) Eg: ~ every 10th day of month from + 2020/01, which is equivalent to ~ every 10th day of month from 2020/01/01, will be adjusted to start on 2019/12/10. Periodic rule syntax @@ -1262,17 +1267,17 @@ FILE FORMAT expenses:rent $2000 assets:bank:checking - There is an additional constraint on the period expression: the start - date must fall on a natural boundary of the interval. Eg monthly from + There is an additional constraint on the period expression: the start + date must fall on a natural boundary of the interval. Eg monthly from 2018/1/1 is valid, but monthly from 2018/1/15 is not. - Partial or relative dates (M/D, D, tomorrow, last week) in the period - expression can work (useful or not). They will be relative to today's - date, unless a Y default year directive is in effect, in which case + Partial or relative dates (M/D, D, tomorrow, last week) in the period + expression can work (useful or not). They will be relative to today's + date, unless a Y default year directive is in effect, in which case they will be relative to Y/1/1. Two spaces between period expression and description! - If the period expression is followed by a transaction description, + If the period expression is followed by a transaction description, these must be separated by two or more spaces. This helps hledger know where the period expression ends, so that descriptions can not acciden- tally alter their meaning, as in this example: @@ -1286,68 +1291,68 @@ FILE FORMAT So, - o Do write two spaces between your period expression and your transac- + o Do write two spaces between your period expression and your transac- tion description, if any. - o Don't accidentally write two spaces in the middle of your period ex- + o Don't accidentally write two spaces in the middle of your period ex- pression. Forecasting with periodic transactions - 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 + 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 + 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. - These transactions will have an extra tag indicating which periodic + 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 + 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. - Periodic transactions are generated within some forecast period. By + 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 6 + o ends on the report end date if specified with -e/-p/date:, or 6 months (180 days) from today. - 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 + 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 ...). 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 + 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: + 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: @@ -1357,27 +1362,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' @@ -1416,24 +1421,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. @@ -1443,11 +1448,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 @@ -1458,7 +1463,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) @@ -1472,7 +1477,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) @@ -1480,4 +1485,4 @@ SEE ALSO -hledger 1.18 June 2020 hledger_journal(5) +hledger 1.18.99 June 2020 hledger_journal(5) diff --git a/hledger-lib/hledger_timeclock.5 b/hledger-lib/hledger_timeclock.5 index 3dd5ce619..8008d4117 100644 --- a/hledger-lib/hledger_timeclock.5 +++ b/hledger-lib/hledger_timeclock.5 @@ -1,5 +1,5 @@ -.TH "hledger_timeclock" "5" "June 2020" "hledger 1.18" "hledger User Manuals" +.TH "hledger_timeclock" "5" "June 2020" "hledger 1.18.99" "hledger User Manuals" diff --git a/hledger-lib/hledger_timeclock.info b/hledger-lib/hledger_timeclock.info index 100e9563d..4d31eaa47 100644 --- a/hledger-lib/hledger_timeclock.info +++ b/hledger-lib/hledger_timeclock.info @@ -4,8 +4,8 @@ stdin.  File: hledger_timeclock.info, Node: Top, Up: (dir) -hledger_timeclock(5) hledger 1.18 -********************************* +hledger_timeclock(5) hledger 1.18.99 +************************************ Timeclock - the time logging format of timeclock.el, as read by hledger diff --git a/hledger-lib/hledger_timeclock.txt b/hledger-lib/hledger_timeclock.txt index 8963eaf18..33e1aded4 100644 --- a/hledger-lib/hledger_timeclock.txt +++ b/hledger-lib/hledger_timeclock.txt @@ -78,4 +78,4 @@ SEE ALSO -hledger 1.18 June 2020 hledger_timeclock(5) +hledger 1.18.99 June 2020 hledger_timeclock(5) diff --git a/hledger-lib/hledger_timedot.5 b/hledger-lib/hledger_timedot.5 index e2508f024..2eec9365c 100644 --- a/hledger-lib/hledger_timedot.5 +++ b/hledger-lib/hledger_timedot.5 @@ -1,5 +1,5 @@ -.TH "hledger_timedot" "5" "June 2020" "hledger 1.18" "hledger User Manuals" +.TH "hledger_timedot" "5" "June 2020" "hledger 1.18.99" "hledger User Manuals" diff --git a/hledger-lib/hledger_timedot.info b/hledger-lib/hledger_timedot.info index 636fe8746..b74ef0514 100644 --- a/hledger-lib/hledger_timedot.info +++ b/hledger-lib/hledger_timedot.info @@ -4,8 +4,8 @@ stdin.  File: hledger_timedot.info, Node: Top, Up: (dir) -hledger_timedot(5) hledger 1.18 -******************************* +hledger_timedot(5) hledger 1.18.99 +********************************** Timedot - hledger's human-friendly time logging format diff --git a/hledger-lib/hledger_timedot.txt b/hledger-lib/hledger_timedot.txt index 45e34aee4..03d5d8ea7 100644 --- a/hledger-lib/hledger_timedot.txt +++ b/hledger-lib/hledger_timedot.txt @@ -161,4 +161,4 @@ SEE ALSO -hledger 1.18 June 2020 hledger_timedot(5) +hledger 1.18.99 June 2020 hledger_timedot(5) diff --git a/hledger-ui/hledger-ui.1 b/hledger-ui/hledger-ui.1 index 59459bfc7..b330ac746 100644 --- a/hledger-ui/hledger-ui.1 +++ b/hledger-ui/hledger-ui.1 @@ -1,5 +1,5 @@ -.TH "hledger-ui" "1" "June 2020" "hledger-ui 1.18" "hledger User Manuals" +.TH "hledger-ui" "1" "June 2020" "hledger-ui 1.18.99" "hledger User Manuals" diff --git a/hledger-ui/hledger-ui.info b/hledger-ui/hledger-ui.info index 2634b51b4..d4d361bb9 100644 --- a/hledger-ui/hledger-ui.info +++ b/hledger-ui/hledger-ui.info @@ -3,8 +3,8 @@ This is hledger-ui.info, produced by makeinfo version 6.7 from stdin.  File: hledger-ui.info, Node: Top, Next: OPTIONS, Up: (dir) -hledger-ui(1) hledger-ui 1.18 -***************************** +hledger-ui(1) hledger-ui 1.18.99 +******************************** hledger-ui - terminal interface for the hledger accounting tool @@ -508,26 +508,26 @@ program is restarted.  Tag Table: Node: Top71 -Node: OPTIONS1470 -Ref: #options1567 -Node: KEYS5182 -Ref: #keys5277 -Node: SCREENS9553 -Ref: #screens9658 -Node: Accounts screen9748 -Ref: #accounts-screen9876 -Node: Register screen12092 -Ref: #register-screen12247 -Node: Transaction screen14244 -Ref: #transaction-screen14402 -Node: Error screen15272 -Ref: #error-screen15394 -Node: ENVIRONMENT15638 -Ref: #environment15752 -Node: FILES16559 -Ref: #files16658 -Node: BUGS16871 -Ref: #bugs16948 +Node: OPTIONS1476 +Ref: #options1573 +Node: KEYS5188 +Ref: #keys5283 +Node: SCREENS9559 +Ref: #screens9664 +Node: Accounts screen9754 +Ref: #accounts-screen9882 +Node: Register screen12098 +Ref: #register-screen12253 +Node: Transaction screen14250 +Ref: #transaction-screen14408 +Node: Error screen15278 +Ref: #error-screen15400 +Node: ENVIRONMENT15644 +Ref: #environment15758 +Node: FILES16565 +Ref: #files16664 +Node: BUGS16877 +Ref: #bugs16954  End Tag Table diff --git a/hledger-ui/hledger-ui.txt b/hledger-ui/hledger-ui.txt index b399aa488..276a41858 100644 --- a/hledger-ui/hledger-ui.txt +++ b/hledger-ui/hledger-ui.txt @@ -450,4 +450,4 @@ SEE ALSO -hledger-ui 1.18 June 2020 hledger-ui(1) +hledger-ui 1.18.99 June 2020 hledger-ui(1) diff --git a/hledger-web/hledger-web.1 b/hledger-web/hledger-web.1 index 2e6c3646d..ae15216c0 100644 --- a/hledger-web/hledger-web.1 +++ b/hledger-web/hledger-web.1 @@ -1,5 +1,5 @@ -.TH "hledger-web" "1" "June 2020" "hledger-web 1.18" "hledger User Manuals" +.TH "hledger-web" "1" "June 2020" "hledger-web 1.18.99" "hledger User Manuals" diff --git a/hledger-web/hledger-web.info b/hledger-web/hledger-web.info index ecc5059d1..223987dd6 100644 --- a/hledger-web/hledger-web.info +++ b/hledger-web/hledger-web.info @@ -3,8 +3,8 @@ This is hledger-web.info, produced by makeinfo version 6.7 from stdin.  File: hledger-web.info, Node: Top, Next: OPTIONS, Up: (dir) -hledger-web(1) hledger-web 1.18 -******************************* +hledger-web(1) hledger-web 1.18.99 +********************************** hledger-web - web interface for the hledger accounting tool @@ -573,22 +573,22 @@ awkward.  Tag Table: Node: Top72 -Node: OPTIONS1746 -Ref: #options1851 -Node: PERMISSIONS8379 -Ref: #permissions8518 -Node: EDITING UPLOADING DOWNLOADING9730 -Ref: #editing-uploading-downloading9911 -Node: RELOADING10745 -Ref: #reloading10879 -Node: JSON API11312 -Ref: #json-api11426 -Node: ENVIRONMENT16907 -Ref: #environment17023 -Node: FILES17756 -Ref: #files17856 -Node: BUGS18069 -Ref: #bugs18147 +Node: OPTIONS1752 +Ref: #options1857 +Node: PERMISSIONS8385 +Ref: #permissions8524 +Node: EDITING UPLOADING DOWNLOADING9736 +Ref: #editing-uploading-downloading9917 +Node: RELOADING10751 +Ref: #reloading10885 +Node: JSON API11318 +Ref: #json-api11432 +Node: ENVIRONMENT16913 +Ref: #environment17029 +Node: FILES17762 +Ref: #files17862 +Node: BUGS18075 +Ref: #bugs18153  End Tag Table diff --git a/hledger-web/hledger-web.txt b/hledger-web/hledger-web.txt index f9dfd4294..84440e924 100644 --- a/hledger-web/hledger-web.txt +++ b/hledger-web/hledger-web.txt @@ -538,4 +538,4 @@ SEE ALSO -hledger-web 1.18 June 2020 hledger-web(1) +hledger-web 1.18.99 June 2020 hledger-web(1) diff --git a/hledger/hledger.1 b/hledger/hledger.1 index 726d3dc52..5b82219a2 100644 --- a/hledger/hledger.1 +++ b/hledger/hledger.1 @@ -1,6 +1,6 @@ .\"t -.TH "hledger" "1" "June 2020" "hledger 1.18" "hledger User Manuals" +.TH "hledger" "1" "June 2020" "hledger 1.18.99" "hledger User Manuals" @@ -1679,18 +1679,12 @@ $ hledger balance --pivot member acct:. .SS Valuation .PP Instead of reporting amounts in their original commodity, hledger can -convert them to: -.IP \[bu] 2 -cost (or sale amount), using the conversion rate recorded as part of the -transaction (transaction price). -.IP \[bu] 2 -value, using the market prices in effect on certain date(s). -.PP -We call this \[dq]valuation\[dq], and it is controlled in full by the -\f[C]--value=VALUATIONTYPE[,COMMODITY]\f[R] option. -But we also provide simpler, Ledger-compatible -\f[C]-B\f[R]/\f[C]-V\f[R]/\f[C]-X\f[R] flags, and usually one of these -is all you need: +convert them to cost/sale amount (using the conversion rate recorded in +the transaction), or to market value (using some market price on a +certain date). +This is controlled by the \f[C]--value=TYPE[,COMMODITY]\f[R] option, but +we also provide the simpler \f[C]-B\f[R]/\f[C]-V\f[R]/\f[C]-X\f[R] +flags, and usually one of those is all you need. .SS -B: Cost .PP The \f[C]-B/--cost\f[R] flag converts amounts to their cost or sale @@ -1700,13 +1694,18 @@ amount at transaction time, if they have a transaction price specified. The \f[C]-V/--market\f[R] flag converts amounts to market value in their default \f[I]valuation commodity\f[R], using the market prices in effect on the \f[I]valuation date(s)\f[R], if any. -More on these things in a minute. +More on these in a minute. .SS -X: Value in specified commodity .PP -The \f[C]-X/--exchange\f[R] option is like \f[C]-V\f[R] except the -desired valuation currency is specified explicitly. +The \f[C]-X/--exchange=COMM\f[R] option is like \f[C]-V\f[R], except you +tell it which currency you want to convert to, and it tries to convert +everything to that. .SS Valuation date .PP +Since market prices can change from day to day, market value reports +have a valuation date (or more than one), which determines which market +prices will be used. +.PP For single period reports, if an explicit report end date is specified, that will be used as the valuation date; otherwise the valuation date is \[dq]today\[dq]. @@ -1751,11 +1750,10 @@ Adding the \f[C]--infer-value\f[R] flag to \f[C]-V\f[R], \f[C]-X\f[R] or So for example, \f[C]hledger bs -V --infer-value\f[R] will get market prices both from P directives and from transactions. .PP -There is a downside to this: value reports can be affected in +There is a downside: value reports can sometimes be affected in confusing/undesired ways by your journal entries. If this happens to you, read all of this Valuation section carefully, -and try adding \f[C]--debug\f[R] or \f[C]--debug=2\f[R] to troubleshoot -the reason. +and try adding \f[C]--debug\f[R] or \f[C]--debug=2\f[R] to troubleshoot. .PP \f[C]--infer-value\f[R] can infer market prices from: .IP \[bu] 2 @@ -1801,17 +1799,15 @@ If there are no P directives at all (any commodity or date) and the \f[C]--infer-value\f[R] flag is used: the price commodity from the latest transaction-inferred price for A on or before valuation date. .PP -Amounts for which no valuation commodity can be found are not converted. -.PP This means: .IP \[bu] 2 -If you have any P directives, they alone determine which commodities -\f[C]-V\f[R] will convert, and to what. +If you have P directives, they determine which commodities \f[C]-V\f[R] +will convert, and to what. .IP \[bu] 2 -If you have no P directives, and you add the \f[C]--infer-value\f[R] -flag, transaction prices determine what \f[C]-V\f[R] converts. -.IP \[bu] 2 -\f[C]-X\f[R] tries harder to convert everything to just one commodity. +If you have no P directives, and use the \f[C]--infer-value\f[R] flag, +transaction prices determine it. +.PP +Amounts for which no valuation commodity can be found are not converted. .SS Simple valuation examples .PP Here are some quick examples of \f[C]-V\f[R]: diff --git a/hledger/hledger.info b/hledger/hledger.info index 7db9b9758..188adfc93 100644 --- a/hledger/hledger.info +++ b/hledger/hledger.info @@ -3,8 +3,8 @@ This is hledger.info, produced by makeinfo version 6.7 from stdin.  File: hledger.info, Node: Top, Next: COMMON TASKS, Up: (dir) -hledger(1) hledger 1.18 -*********************** +hledger(1) hledger 1.18.99 +************************** hledger - a command-line accounting tool @@ -1373,17 +1373,11 @@ File: hledger.info, Node: Valuation, Prev: Pivoting, Up: OPTIONS ============== Instead of reporting amounts in their original commodity, hledger can -convert them to: - - * cost (or sale amount), using the conversion rate recorded as part - of the transaction (transaction price). - - * value, using the market prices in effect on certain date(s). - - We call this "valuation", and it is controlled in full by the -'--value=VALUATIONTYPE[,COMMODITY]' option. But we also provide -simpler, Ledger-compatible '-B'/'-V'/'-X' flags, and usually one of -these is all you need: +convert them to cost/sale amount (using the conversion rate recorded in +the transaction), or to market value (using some market price on a +certain date). This is controlled by the '--value=TYPE[,COMMODITY]' +option, but we also provide the simpler '-B'/'-V'/'-X' flags, and +usually one of those is all you need. * Menu: @@ -1416,7 +1410,7 @@ File: hledger.info, Node: -V Value, Next: -X Value in specified commodity, Pr The '-V/--market' flag converts amounts to market value in their default _valuation commodity_, using the market prices in effect on the -_valuation date(s)_, if any. More on these things in a minute. +_valuation date(s)_, if any. More on these in a minute.  File: hledger.info, Node: -X Value in specified commodity, Next: Valuation date, Prev: -V Value, Up: Valuation @@ -1424,8 +1418,9 @@ File: hledger.info, Node: -X Value in specified commodity, Next: Valuation dat 2.17.3 -X: Value in specified commodity --------------------------------------- -The '-X/--exchange' option is like '-V' except the desired valuation -currency is specified explicitly. +The '-X/--exchange=COMM' option is like '-V', except you tell it which +currency you want to convert to, and it tries to convert everything to +that.  File: hledger.info, Node: Valuation date, Next: Market prices, Prev: -X Value in specified commodity, Up: Valuation @@ -1433,9 +1428,13 @@ File: hledger.info, Node: Valuation date, Next: Market prices, Prev: -X Value 2.17.4 Valuation date --------------------- -For single period reports, if an explicit report end date is specified, -that will be used as the valuation date; otherwise the valuation date is -"today". +Since market prices can change from day to day, market value reports +have a valuation date (or more than one), which determines which market +prices will be used. + + For single period reports, if an explicit report end date is +specified, that will be used as the valuation date; otherwise the +valuation date is "today". For multiperiod reports, each column/period is valued on the last day of the period. @@ -1486,10 +1485,10 @@ needing P directives at all. this. So for example, 'hledger bs -V --infer-value' will get market prices both from P directives and from transactions. - There is a downside to this: value reports can be affected in + There is a downside: value reports can sometimes be affected in confusing/undesired ways by your journal entries. If this happens to you, read all of this Valuation section carefully, and try adding -'--debug' or '--debug=2' to troubleshoot the reason. +'--debug' or '--debug=2' to troubleshoot. '--infer-value' can infer market prices from: @@ -1531,18 +1530,16 @@ follows, in this order of preference: '--infer-value' flag is used: the price commodity from the latest transaction-inferred price for A on or before valuation date. - Amounts for which no valuation commodity can be found are not -converted. - This means: - * If you have any P directives, they alone determine which - commodities '-V' will convert, and to what. + * If you have P directives, they determine which commodities '-V' + will convert, and to what. - * If you have no P directives, and you add the '--infer-value' flag, - transaction prices determine what '-V' converts. + * If you have no P directives, and use the '--infer-value' flag, + transaction prices determine it. - * '-X' tries harder to convert everything to just one commodity. + Amounts for which no valuation commodity can be found are not +converted.  File: hledger.info, Node: Simple valuation examples, Next: --value Flexible valuation, Prev: Valuation commodity, Up: Valuation @@ -3861,197 +3858,197 @@ $ LANG=en_US.UTF-8 hledger -f my.journal print  Tag Table: Node: Top68 -Node: COMMON TASKS2315 -Ref: #common-tasks2427 -Node: Getting help2834 -Ref: #getting-help2966 -Node: Constructing command lines3519 -Ref: #constructing-command-lines3711 -Node: Starting a journal file4408 -Ref: #starting-a-journal-file4606 -Node: Setting opening balances5794 -Ref: #setting-opening-balances5990 -Node: Recording transactions9131 -Ref: #recording-transactions9311 -Node: Reconciling9867 -Ref: #reconciling10010 -Node: Reporting12267 -Ref: #reporting12407 -Node: Migrating to a new file16406 -Ref: #migrating-to-a-new-file16554 -Node: OPTIONS16853 -Ref: #options16960 -Node: General options17330 -Ref: #general-options17455 -Node: Command options20409 -Ref: #command-options20560 -Node: Command arguments20958 -Ref: #command-arguments21105 -Node: Queries21985 -Ref: #queries22140 -Node: Special characters in arguments and queries26102 -Ref: #special-characters-in-arguments-and-queries26330 -Node: More escaping26781 -Ref: #more-escaping26943 -Node: Even more escaping27239 -Ref: #even-more-escaping27433 -Node: Less escaping28104 -Ref: #less-escaping28266 -Node: Unicode characters28511 -Ref: #unicode-characters28693 -Node: Input files30105 -Ref: #input-files30248 -Node: Output destination32177 -Ref: #output-destination32329 -Node: Output format32754 -Ref: #output-format32904 -Node: Regular expressions34486 -Ref: #regular-expressions34643 -Node: Smart dates36379 -Ref: #smart-dates36530 -Node: Report start & end date37891 -Ref: #report-start-end-date38063 -Node: Report intervals39560 -Ref: #report-intervals39725 -Node: Period expressions40115 -Ref: #period-expressions40275 -Node: Depth limiting44411 -Ref: #depth-limiting44555 -Node: Pivoting44887 -Ref: #pivoting45010 -Node: Valuation46686 -Ref: #valuation46788 -Node: -B Cost47588 -Ref: #b-cost47692 -Node: -V Value47825 -Ref: #v-value47971 -Node: -X Value in specified commodity48173 -Ref: #x-value-in-specified-commodity48372 -Node: Valuation date48476 -Ref: #valuation-date48644 -Node: Market prices48888 -Ref: #market-prices49068 -Node: --infer-value market prices from transactions49845 -Ref: #infer-value-market-prices-from-transactions50094 -Node: Valuation commodity51385 -Ref: #valuation-commodity51594 -Node: Simple valuation examples52919 -Ref: #simple-valuation-examples53121 -Node: --value Flexible valuation53780 -Ref: #value-flexible-valuation53988 -Node: More valuation examples55935 -Ref: #more-valuation-examples56144 -Node: Effect of valuation on reports58149 -Ref: #effect-of-valuation-on-reports58337 -Node: COMMANDS63858 -Ref: #commands63966 -Node: accounts65050 -Ref: #accounts65148 -Node: activity65847 -Ref: #activity65957 -Node: add66340 -Ref: #add66439 -Node: balance69178 -Ref: #balance69289 -Node: Classic balance report70747 -Ref: #classic-balance-report70920 -Node: Customising the classic balance report72289 -Ref: #customising-the-classic-balance-report72517 -Node: Colour support74593 -Ref: #colour-support74760 -Node: Flat mode74933 -Ref: #flat-mode75081 -Node: Depth limited balance reports75494 -Ref: #depth-limited-balance-reports75679 -Node: Percentages76135 -Ref: #percentages76301 -Node: Multicolumn balance report77438 -Ref: #multicolumn-balance-report77618 -Node: Budget report82880 -Ref: #budget-report83023 -Node: Nested budgets88289 -Ref: #nested-budgets88401 -Ref: #output-format-191882 -Node: balancesheet92079 -Ref: #balancesheet92215 -Node: balancesheetequity93681 -Ref: #balancesheetequity93830 -Node: cashflow94553 -Ref: #cashflow94681 -Node: check-dates95860 -Ref: #check-dates95987 -Node: check-dupes96266 -Ref: #check-dupes96390 -Node: close96683 -Ref: #close96797 -Node: close usage98319 -Ref: #close-usage98412 -Node: commodities101225 -Ref: #commodities101352 -Node: descriptions101434 -Ref: #descriptions101562 -Node: diff101743 -Ref: #diff101849 -Node: files102896 -Ref: #files102996 -Node: help103143 -Ref: #help103243 -Node: import104324 -Ref: #import104438 -Node: Importing balance assignments105331 -Ref: #importing-balance-assignments105479 -Node: incomestatement106128 -Ref: #incomestatement106261 -Node: notes107748 -Ref: #notes107861 -Node: payees107987 -Ref: #payees108093 -Node: prices108251 -Ref: #prices108357 -Node: print108698 -Ref: #print108808 -Node: print-unique113594 -Ref: #print-unique113720 -Node: register114005 -Ref: #register114132 -Node: Custom register output118304 -Ref: #custom-register-output118433 -Node: register-match119770 -Ref: #register-match119904 -Node: rewrite120255 -Ref: #rewrite120370 -Node: Re-write rules in a file122225 -Ref: #re-write-rules-in-a-file122359 -Node: Diff output format123569 -Ref: #diff-output-format123738 -Node: rewrite vs print --auto124830 -Ref: #rewrite-vs.-print---auto125009 -Node: roi125565 -Ref: #roi125663 -Node: stats126675 -Ref: #stats126774 -Node: tags127562 -Ref: #tags127660 -Node: test127954 -Ref: #test128062 -Node: Add-on commands128809 -Ref: #add-on-commands128926 -Node: ui130269 -Ref: #ui130357 -Node: web130411 -Ref: #web130514 -Node: iadd130630 -Ref: #iadd130741 -Node: interest130823 -Ref: #interest130930 -Node: ENVIRONMENT131170 -Ref: #environment131282 -Node: FILES132111 -Ref: #files-1132214 -Node: LIMITATIONS132427 -Ref: #limitations132546 -Node: TROUBLESHOOTING133288 -Ref: #troubleshooting133401 +Node: COMMON TASKS2321 +Ref: #common-tasks2433 +Node: Getting help2840 +Ref: #getting-help2972 +Node: Constructing command lines3525 +Ref: #constructing-command-lines3717 +Node: Starting a journal file4414 +Ref: #starting-a-journal-file4612 +Node: Setting opening balances5800 +Ref: #setting-opening-balances5996 +Node: Recording transactions9137 +Ref: #recording-transactions9317 +Node: Reconciling9873 +Ref: #reconciling10016 +Node: Reporting12273 +Ref: #reporting12413 +Node: Migrating to a new file16412 +Ref: #migrating-to-a-new-file16560 +Node: OPTIONS16859 +Ref: #options16966 +Node: General options17336 +Ref: #general-options17461 +Node: Command options20415 +Ref: #command-options20566 +Node: Command arguments20964 +Ref: #command-arguments21111 +Node: Queries21991 +Ref: #queries22146 +Node: Special characters in arguments and queries26108 +Ref: #special-characters-in-arguments-and-queries26336 +Node: More escaping26787 +Ref: #more-escaping26949 +Node: Even more escaping27245 +Ref: #even-more-escaping27439 +Node: Less escaping28110 +Ref: #less-escaping28272 +Node: Unicode characters28517 +Ref: #unicode-characters28699 +Node: Input files30111 +Ref: #input-files30254 +Node: Output destination32183 +Ref: #output-destination32335 +Node: Output format32760 +Ref: #output-format32910 +Node: Regular expressions34492 +Ref: #regular-expressions34649 +Node: Smart dates36385 +Ref: #smart-dates36536 +Node: Report start & end date37897 +Ref: #report-start-end-date38069 +Node: Report intervals39566 +Ref: #report-intervals39731 +Node: Period expressions40121 +Ref: #period-expressions40281 +Node: Depth limiting44417 +Ref: #depth-limiting44561 +Node: Pivoting44893 +Ref: #pivoting45016 +Node: Valuation46692 +Ref: #valuation46794 +Node: -B Cost47483 +Ref: #b-cost47587 +Node: -V Value47720 +Ref: #v-value47866 +Node: -X Value in specified commodity48061 +Ref: #x-value-in-specified-commodity48260 +Node: Valuation date48409 +Ref: #valuation-date48577 +Node: Market prices48987 +Ref: #market-prices49167 +Node: --infer-value market prices from transactions49944 +Ref: #infer-value-market-prices-from-transactions50193 +Node: Valuation commodity51475 +Ref: #valuation-commodity51684 +Node: Simple valuation examples52910 +Ref: #simple-valuation-examples53112 +Node: --value Flexible valuation53771 +Ref: #value-flexible-valuation53979 +Node: More valuation examples55926 +Ref: #more-valuation-examples56135 +Node: Effect of valuation on reports58140 +Ref: #effect-of-valuation-on-reports58328 +Node: COMMANDS63849 +Ref: #commands63957 +Node: accounts65041 +Ref: #accounts65139 +Node: activity65838 +Ref: #activity65948 +Node: add66331 +Ref: #add66430 +Node: balance69169 +Ref: #balance69280 +Node: Classic balance report70738 +Ref: #classic-balance-report70911 +Node: Customising the classic balance report72280 +Ref: #customising-the-classic-balance-report72508 +Node: Colour support74584 +Ref: #colour-support74751 +Node: Flat mode74924 +Ref: #flat-mode75072 +Node: Depth limited balance reports75485 +Ref: #depth-limited-balance-reports75670 +Node: Percentages76126 +Ref: #percentages76292 +Node: Multicolumn balance report77429 +Ref: #multicolumn-balance-report77609 +Node: Budget report82871 +Ref: #budget-report83014 +Node: Nested budgets88280 +Ref: #nested-budgets88392 +Ref: #output-format-191873 +Node: balancesheet92070 +Ref: #balancesheet92206 +Node: balancesheetequity93672 +Ref: #balancesheetequity93821 +Node: cashflow94544 +Ref: #cashflow94672 +Node: check-dates95851 +Ref: #check-dates95978 +Node: check-dupes96257 +Ref: #check-dupes96381 +Node: close96674 +Ref: #close96788 +Node: close usage98310 +Ref: #close-usage98403 +Node: commodities101216 +Ref: #commodities101343 +Node: descriptions101425 +Ref: #descriptions101553 +Node: diff101734 +Ref: #diff101840 +Node: files102887 +Ref: #files102987 +Node: help103134 +Ref: #help103234 +Node: import104315 +Ref: #import104429 +Node: Importing balance assignments105322 +Ref: #importing-balance-assignments105470 +Node: incomestatement106119 +Ref: #incomestatement106252 +Node: notes107739 +Ref: #notes107852 +Node: payees107978 +Ref: #payees108084 +Node: prices108242 +Ref: #prices108348 +Node: print108689 +Ref: #print108799 +Node: print-unique113585 +Ref: #print-unique113711 +Node: register113996 +Ref: #register114123 +Node: Custom register output118295 +Ref: #custom-register-output118424 +Node: register-match119761 +Ref: #register-match119895 +Node: rewrite120246 +Ref: #rewrite120361 +Node: Re-write rules in a file122216 +Ref: #re-write-rules-in-a-file122350 +Node: Diff output format123560 +Ref: #diff-output-format123729 +Node: rewrite vs print --auto124821 +Ref: #rewrite-vs.-print---auto125000 +Node: roi125556 +Ref: #roi125654 +Node: stats126666 +Ref: #stats126765 +Node: tags127553 +Ref: #tags127651 +Node: test127945 +Ref: #test128053 +Node: Add-on commands128800 +Ref: #add-on-commands128917 +Node: ui130260 +Ref: #ui130348 +Node: web130402 +Ref: #web130505 +Node: iadd130621 +Ref: #iadd130732 +Node: interest130814 +Ref: #interest130921 +Node: ENVIRONMENT131161 +Ref: #environment131273 +Node: FILES132102 +Ref: #files-1132205 +Node: LIMITATIONS132418 +Ref: #limitations132537 +Node: TROUBLESHOOTING133279 +Ref: #troubleshooting133392  End Tag Table diff --git a/hledger/hledger.txt b/hledger/hledger.txt index 7b822017e..eaf70da4d 100644 --- a/hledger/hledger.txt +++ b/hledger/hledger.txt @@ -1190,17 +1190,11 @@ OPTIONS Valuation Instead of reporting amounts in their original commodity, hledger can - convert them to: - - o cost (or sale amount), using the conversion rate recorded as part of - the transaction (transaction price). - - o value, using the market prices in effect on certain date(s). - - We call this "valuation", and it is controlled in full by the - --value=VALUATIONTYPE[,COMMODITY] option. But we also provide simpler, - Ledger-compatible -B/-V/-X flags, and usually one of these is all you - need: + convert them to cost/sale amount (using the conversion rate recorded in + the transaction), or to market value (using some market price on a cer- + tain date). This is controlled by the --value=TYPE[,COMMODITY] option, + but we also provide the simpler -B/-V/-X flags, and usually one of + those is all you need. -B: Cost The -B/--cost flag converts amounts to their cost or sale amount at @@ -1209,37 +1203,42 @@ OPTIONS -V: Value The -V/--market flag converts amounts to market value in their default valuation commodity, using the market prices in effect on the valuation - date(s), if any. More on these things in a minute. + date(s), if any. More on these in a minute. -X: Value in specified commodity - The -X/--exchange option is like -V except the desired valuation cur- - rency is specified explicitly. + The -X/--exchange=COMM option is like -V, except you tell it which cur- + rency you want to convert to, and it tries to convert everything to + that. Valuation date + Since market prices can change from day to day, market value reports + have a valuation date (or more than one), which determines which market + prices will be used. + For single period reports, if an explicit report end date is specified, - that will be used as the valuation date; otherwise the valuation date + that will be used as the valuation date; otherwise the valuation date is "today". - For multiperiod reports, each column/period is valued on the last day + For multiperiod reports, each column/period is valued on the last day of the period. Market prices (experimental) - To convert a commodity A to its market value in another commodity B, - hledger looks for a suitable market price (exchange rate) as follows, + To convert a commodity A to its market value in another commodity B, + hledger looks for a suitable market price (exchange rate) as follows, in this order of preference : - 1. A declared market price or inferred market price: A's latest market + 1. A declared market price or inferred market price: A's latest market price in B on or before the valuation date as declared by a P direc- - tive, or (if the --infer-value flag is used) inferred from transac- + tive, or (if the --infer-value flag is used) inferred from transac- tion prices. 2. A reverse market price: the inverse of a declared or inferred market price from B to A. - 3. A chained market price: a synthetic price formed by combining the - shortest chain of market prices (any of the above types) leading + 3. A chained market price: a synthetic price formed by combining the + shortest chain of market prices (any of the above types) leading from A to B. Amounts for which no applicable market price can be found, are not con- @@ -1250,66 +1249,64 @@ OPTIONS Normally, market value in hledger is fully controlled by, and requires, P directives in your journal. Since adding and updating those can be a - chore, and since transactions usually take place at close to market + chore, and since transactions usually take place at close to market value, why not use the recorded transaction prices as additional market prices (as Ledger does) ? We could produce value reports without need- ing P directives at all. - Adding the --infer-value flag to -V, -X or --value enables this. So - for example, hledger bs -V --infer-value will get market prices both + Adding the --infer-value flag to -V, -X or --value enables this. So + for example, hledger bs -V --infer-value will get market prices both from P directives and from transactions. - There is a downside to this: value reports can be affected in confus- - ing/undesired ways by your journal entries. If this happens to you, + There is a downside: value reports can sometimes be affected in confus- + ing/undesired ways by your journal entries. If this happens to you, read all of this Valuation section carefully, and try adding --debug or - --debug=2 to troubleshoot the reason. + --debug=2 to troubleshoot. --infer-value can infer market prices from: o multicommodity transactions with explicit prices (@/@@) - o multicommodity transactions with implicit prices (no @, two commodi- - ties, unbalanced). (With these, the order of postings matters. + o multicommodity transactions with implicit prices (no @, two commodi- + ties, unbalanced). (With these, the order of postings matters. hledger print -x can be useful for troubleshooting.) - o but not, currently, from "more correct" multicommodity transactions + o but not, currently, from "more correct" multicommodity transactions (no @, multiple commodities, balanced). Valuation commodity (experimental) When you specify a valuation commodity (-X COMM or --value TYPE,COMM): - hledger will convert all amounts to COMM, wherever it can find a suit- + hledger will convert all amounts to COMM, wherever it can find a suit- able market price (including by reversing or chaining prices). - When you leave the valuation commodity unspecified (-V or --value + When you leave the valuation commodity unspecified (-V or --value TYPE): - For each commodity A, hledger picks a default valuation commodity as + For each commodity A, hledger picks a default valuation commodity as follows, in this order of preference: 1. The price commodity from the latest P-declared market price for A on or before valuation date. 2. The price commodity from the latest P-declared market price for A on - any date. (Allows conversion to proceed when there are inferred + any date. (Allows conversion to proceed when there are inferred prices before the valuation date.) - 3. If there are no P directives at all (any commodity or date) and the - --infer-value flag is used: the price commodity from the latest + 3. If there are no P directives at all (any commodity or date) and the + --infer-value flag is used: the price commodity from the latest transaction-inferred price for A on or before valuation date. - Amounts for which no valuation commodity can be found are not con- - verted. - This means: - o If you have any P directives, they alone determine which commodities - -V will convert, and to what. + o If you have P directives, they determine which commodities -V will + convert, and to what. - o If you have no P directives, and you add the --infer-value flag, - transaction prices determine what -V converts. + o If you have no P directives, and use the --infer-value flag, transac- + tion prices determine it. - o -X tries harder to convert everything to just one commodity. + Amounts for which no valuation commodity can be found are not con- + verted. Simple valuation examples Here are some quick examples of -V: @@ -1335,7 +1332,7 @@ 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 @@ -1356,36 +1353,36 @@ OPTIONS The TYPE part selects cost or value and 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 the default valuation commod- - ity, using market prices on each posting's date. This is cur- + Convert amounts to their value in the default valuation commod- + ity, using market prices on each posting's date. This is cur- rently supported only by the print and register commands. --value=end - Convert amounts to their value in the default valuation commod- - ity, using market prices on the last day of the report period - (or if unspecified, the journal's end date); or in multiperiod + Convert amounts to their value in the default valuation commod- + ity, 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 the default valuation commod- - ity using current market prices (as of when report is gener- + Convert amounts to their value in the default valuation commod- + ity using current market prices (as of when report is gener- ated). --value=YYYY-MM-DD - Convert amounts to their value in the default valuation commod- + Convert amounts to their value in the default valuation commod- ity using market prices on this date. 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, deducing market prices as described above. More valuation examples - 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 @@ -1423,7 +1420,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 @@ -1460,7 +1457,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 @@ -1474,10 +1471,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 @@ -1493,9 +1490,9 @@ OPTIONS b -0.50A Effect of valuation on reports - Here is a reference for how valuation is supposed to affect each part - of hledger's reports (and a glossary). (It's wide, you'll have to - scroll sideways.) It may be useful when troubleshooting. If you find + Here is a reference for how valuation is supposed to affect each part + of hledger's reports (and a glossary). (It's wide, you'll have to + scroll sideways.) It may be useful when troubleshooting. If you find problems, please report them, ideally with a reproducible example. Re- lated: #329, #1083. @@ -1504,7 +1501,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 / @@ -1517,10 +1514,10 @@ 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- @@ -1533,7 +1530,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 @@ -1549,7 +1546,7 @@ OPTIONS 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 @@ -1557,10 +1554,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 @@ -1572,60 +1566,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: @@ -1644,8 +1638,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: @@ -1660,22 +1654,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. @@ -1683,10 +1677,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. @@ -1695,7 +1689,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): @@ -1725,8 +1719,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 @@ -1734,29 +1728,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 @@ -1774,22 +1768,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 @@ -1798,7 +1792,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)" @@ -1816,7 +1810,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) @@ -1827,14 +1821,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) @@ -1851,14 +1845,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 @@ -1869,9 +1863,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. @@ -1880,8 +1874,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 @@ -1894,9 +1888,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 -% @@ -1906,32 +1900,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 @@ -1947,7 +1941,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 @@ -1963,8 +1957,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: @@ -1983,26 +1977,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: @@ -2023,21 +2017,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 @@ -2084,26 +2078,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 @@ -2145,12 +2139,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: @@ -2160,13 +2154,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: @@ -2192,9 +2186,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: @@ -2210,7 +2204,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 @@ -2229,17 +2223,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). @@ -2265,21 +2259,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: @@ -2309,15 +2303,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). @@ -2338,90 +2332,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: @@ -2476,18 +2470,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. @@ -2505,20 +2499,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: @@ -2545,9 +2539,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 @@ -2558,36 +2552,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 @@ -2612,13 +2606,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 @@ -2646,10 +2640,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 @@ -2657,11 +2651,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 @@ -2688,43 +2682,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: @@ -2743,20 +2737,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 @@ -2780,7 +2774,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 @@ -2791,8 +2785,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 @@ -2802,18 +2796,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 @@ -2825,7 +2819,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 @@ -2842,7 +2836,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 @@ -2850,17 +2844,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): @@ -2879,27 +2873,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: @@ -2915,7 +2909,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: @@ -2925,16 +2919,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. @@ -2949,7 +2943,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. @@ -2962,12 +2956,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' @@ -2991,10 +2985,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: @@ -3002,48 +2996,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: @@ -3061,14 +3055,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. @@ -3076,13 +3070,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 -- @@ -3091,35 +3085,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 @@ -3138,23 +3132,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 @@ -3165,13 +3159,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 @@ -3187,36 +3181,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: @@ -3231,8 +3225,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 @@ -3252,8 +3246,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 @@ -3263,7 +3257,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) @@ -3277,7 +3271,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) @@ -3285,4 +3279,4 @@ SEE ALSO -hledger 1.18 June 2020 hledger(1) +hledger 1.18.99 June 2020 hledger(1)