From 1bd7e1bf485ac4ad32e34a28fea516ac8c2bc117 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 7 Dec 2023 11:33:14 -1000 Subject: [PATCH] ;doc: update manuals --- hledger/hledger.1 | 27 +- hledger/hledger.info | 984 ++++++++++++++++++++++--------------------- hledger/hledger.txt | 23 +- 3 files changed, 544 insertions(+), 490 deletions(-) diff --git a/hledger/hledger.1 b/hledger/hledger.1 index 943682100..2de797bbf 100644 --- a/hledger/hledger.1 +++ b/hledger/hledger.1 @@ -2797,6 +2797,8 @@ commodity 1.000,00 EUR commodity 1 000 000.0000 ; the no-symbol commodity .EE .PP +Commodities do not have tags (tags in the comment will be ignored). +.PP A commodity directive\[aq]s sample amount must always include a period or comma decimal mark (this rule helps disambiguate decimal marks and digit group marks). @@ -2932,10 +2934,18 @@ refers to a payee that has not been declared. Eg: .IP .EX -payee Whole Foods +payee Whole Foods ; a comment .EE .PP -Any indented subdirectives are currently ignored. +Payees do not have tags (tags in the comment will be ignored). +.PP +To declare the empty payee name, use \f[CR]\[dq]\[dq]\f[R]. +.IP +.EX +payee \[dq]\[dq] +.EE +.PP +Ledger-style indented subdirectives, if any, are currently ignored. .SS \f[CR]tag\f[R] directive \f[CR]tag TAGNAME\f[R] .PP @@ -4154,7 +4164,7 @@ expression, that also supports GNU word boundaries (\f[CR]\[rs]b\f[R], else. If you have trouble, see \[dq]Regular expressions\[dq] in the hledger manual (https://hledger.org/hledger.html#regular-expressions). -.PP +.SS What matchers match With record matchers, it\[aq]s important to know that the record matched is not the original CSV record, but a modified one: separators will be converted to commas, and enclosing double quotes (but not enclosing @@ -4170,16 +4180,19 @@ the regex would see, and try to match, this modified record text: .EX 2023-01-01,Acme, Inc., 1,000 .EE -.PP +.SS Combining matchers When an if block has multiple matchers, they are combined as follows: .IP \[bu] 2 By default they are OR\[aq]d (any one of them can match) .IP \[bu] 2 When a matcher is preceded by ampersand (\f[CR]&\f[R]) it will be -AND\[aq]ed with the previous matcher (both of them must match). +AND\[aq]ed with the previous matcher (both of them must match) +.IP \[bu] 2 +When a matcher is preceded by an exclamation mark (\f[CR]!\f[R]), the +matcher is negated (it may not match). .PP -When a matcher is preceded by an exclamation mark (!), the matcher will -be negated, ie it will exclude CSV records that match. +Currently there is a limitation: you can\[aq]t use both \f[CR]&\f[R] and +\f[CR]!\f[R] on the same line (you can\[aq]t AND a negated matcher). .SS Match groups Matchers can define match groups: parenthesised portions of the regular expression which are available for reference in field assignments. diff --git a/hledger/hledger.info b/hledger/hledger.info index 71c2173b5..9d7f85251 100644 --- a/hledger/hledger.info +++ b/hledger/hledger.info @@ -2736,6 +2736,8 @@ commodity $1000.00 commodity 1.000,00 EUR commodity 1 000 000.0000 ; the no-symbol commodity + Commodities do not have tags (tags in the comment will be ignored). + A commodity directive's sample amount must always include a period or comma decimal mark (this rule helps disambiguate decimal marks and digit group marks). If you don't want to show any decimal digits, write the @@ -2873,9 +2875,15 @@ may appear in transaction descriptions. The "payees" check will report an error if any transaction refers to a payee that has not been declared. Eg: -payee Whole Foods +payee Whole Foods ; a comment - Any indented subdirectives are currently ignored. + Payees do not have tags (tags in the comment will be ignored). + + To declare the empty payee name, use '""'. + +payee "" + + Ledger-style indented subdirectives, if any, are currently ignored.  File: hledger.info, Node: tag directive, Next: Periodic transactions, Prev: payee directive, Up: Journal @@ -4185,8 +4193,20 @@ regular expression, that also supports GNU word boundaries ('\b', '\B', expressions" in the hledger manual (https://hledger.org/hledger.html#regular-expressions). - With record matchers, it's important to know that the record matched -is not the original CSV record, but a modified one: separators will be +* Menu: + +* What matchers match:: +* Combining matchers:: +* Match groups:: + + +File: hledger.info, Node: What matchers match, Next: Combining matchers, Up: Matchers + +10.14.1 What matchers match +--------------------------- + +With record matchers, it's important to know that the record matched is +not the original CSV record, but a modified one: separators will be converted to commas, and enclosing double quotes (but not enclosing whitespace) are removed. So for example, when reading an SSV file, if the original record was: @@ -4197,23 +4217,27 @@ the original record was: 2023-01-01,Acme, Inc., 1,000 - When an if block has multiple matchers, they are combined as follows: + +File: hledger.info, Node: Combining matchers, Next: Match groups, Prev: What matchers match, Up: Matchers + +10.14.2 Combining matchers +-------------------------- + +When an if block has multiple matchers, they are combined as follows: * By default they are OR'd (any one of them can match) * When a matcher is preceded by ampersand ('&') it will be AND'ed - with the previous matcher (both of them must match). + with the previous matcher (both of them must match) + * When a matcher is preceded by an exclamation mark ('!'), the + matcher is negated (it may not match). - When a matcher is preceded by an exclamation mark (!), the matcher -will be negated, ie it will exclude CSV records that match. - -* Menu: - -* Match groups:: + Currently there is a limitation: you can't use both '&' and '!' on +the same line (you can't AND a negated matcher).  -File: hledger.info, Node: Match groups, Up: Matchers +File: hledger.info, Node: Match groups, Prev: Combining matchers, Up: Matchers -10.14.1 Match groups +10.14.3 Match groups -------------------- Matchers can define match groups: parenthesised portions of the regular @@ -11044,470 +11068,474 @@ Node: commodity directive97199 Ref: #commodity-directive97373 Node: Commodity directive syntax98558 Ref: #commodity-directive-syntax98743 -Node: Commodity error checking100122 -Ref: #commodity-error-checking100303 -Node: decimal-mark directive100597 -Ref: #decimal-mark-directive100779 -Node: include directive101176 -Ref: #include-directive101340 -Node: P directive102252 -Ref: #p-directive102397 -Node: payee directive103286 -Ref: #payee-directive103435 -Node: tag directive103751 -Ref: #tag-directive103906 -Node: Periodic transactions104374 -Ref: #periodic-transactions104539 -Node: Periodic rule syntax106245 -Ref: #periodic-rule-syntax106423 -Node: Periodic rules and relative dates107068 -Ref: #periodic-rules-and-relative-dates107334 -Node: Two spaces between period expression and description!107845 -Ref: #two-spaces-between-period-expression-and-description108122 -Node: Auto postings108806 -Ref: #auto-postings108954 -Node: Auto postings and multiple files111391 -Ref: #auto-postings-and-multiple-files111555 -Node: Auto postings and dates111956 -Ref: #auto-postings-and-dates112204 -Node: Auto postings and transaction balancing / inferred amounts / balance assertions112379 -Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions112735 -Node: Auto posting tags113238 -Ref: #auto-posting-tags113520 -Node: Auto postings on forecast transactions only114156 -Ref: #auto-postings-on-forecast-transactions-only114402 -Node: Other syntax114649 -Ref: #other-syntax114765 -Node: Balance assignments115392 -Ref: #balance-assignments115548 -Node: Balance assignments and prices116921 -Ref: #balance-assignments-and-prices117136 -Node: Balance assignments and multiple files117347 -Ref: #balance-assignments-and-multiple-files117578 -Node: Bracketed posting dates117771 -Ref: #bracketed-posting-dates117955 -Node: D directive118469 -Ref: #d-directive118637 -Node: apply account directive120237 -Ref: #apply-account-directive120417 -Node: Y directive121104 -Ref: #y-directive121264 -Node: Secondary dates122092 -Ref: #secondary-dates122246 -Node: Star comments123060 -Ref: #star-comments123220 -Node: Valuation expressions123752 -Ref: #valuation-expressions123929 -Node: Virtual postings124051 -Ref: #virtual-postings124228 -Node: Other Ledger directives125665 -Ref: #other-ledger-directives125828 -Node: CSV126394 -Ref: #csv126487 -Node: CSV rules cheatsheet128567 -Ref: #csv-rules-cheatsheet128696 -Node: source130494 -Ref: #source130617 -Node: separator131497 -Ref: #separator131610 -Node: skip132150 -Ref: #skip132258 -Node: date-format132802 -Ref: #date-format132923 -Node: timezone133647 -Ref: #timezone133770 -Node: newest-first134775 -Ref: #newest-first134913 -Node: intra-day-reversed135490 -Ref: #intra-day-reversed135644 -Node: decimal-mark136092 -Ref: #decimal-mark136233 -Node: fields list136572 -Ref: #fields-list136711 -Node: Field assignment138382 -Ref: #field-assignment138526 -Node: Field names139603 -Ref: #field-names139734 -Node: date field140937 -Ref: #date-field141055 -Node: date2 field141103 -Ref: #date2-field141244 -Node: status field141300 -Ref: #status-field141443 -Node: code field141492 -Ref: #code-field141637 -Node: description field141682 -Ref: #description-field141842 -Node: comment field141901 -Ref: #comment-field142056 -Node: account field142349 -Ref: #account-field142499 -Node: amount field143069 -Ref: #amount-field143218 -Node: currency field145910 -Ref: #currency-field146063 -Node: balance field146320 -Ref: #balance-field146452 -Node: if block146824 -Ref: #if-block146945 -Node: Matchers148353 -Ref: #matchers148467 -Node: Match groups150051 -Ref: #match-groups150152 -Node: if table150899 -Ref: #if-table151021 -Node: balance-type152583 -Ref: #balance-type152712 -Node: include153412 -Ref: #include153539 -Node: Working with CSV153983 -Ref: #working-with-csv154130 -Node: Rapid feedback154537 -Ref: #rapid-feedback154670 -Node: Valid CSV155122 -Ref: #valid-csv155268 -Node: File Extension156000 -Ref: #file-extension156173 -Node: Reading CSV from standard input156737 -Ref: #reading-csv-from-standard-input156961 -Node: Reading multiple CSV files157125 -Ref: #reading-multiple-csv-files157356 -Node: Reading files specified by rule157597 -Ref: #reading-files-specified-by-rule157825 -Node: Valid transactions158996 -Ref: #valid-transactions159195 -Node: Deduplicating importing159823 -Ref: #deduplicating-importing160018 -Node: Setting amounts161054 -Ref: #setting-amounts161225 -Node: Amount signs163583 -Ref: #amount-signs163753 -Node: Setting currency/commodity164650 -Ref: #setting-currencycommodity164854 -Node: Amount decimal places166028 -Ref: #amount-decimal-places166234 -Node: Referencing other fields166546 -Ref: #referencing-other-fields166759 -Node: How CSV rules are evaluated167656 -Ref: #how-csv-rules-are-evaluated167873 -Node: Well factored rules169326 -Ref: #well-factored-rules169494 -Node: CSV rules examples169818 -Ref: #csv-rules-examples169953 -Node: Bank of Ireland170018 -Ref: #bank-of-ireland170155 -Node: Coinbase171617 -Ref: #coinbase171755 -Node: Amazon172802 -Ref: #amazon172927 -Node: Paypal174646 -Ref: #paypal174754 -Node: Timeclock182398 -Ref: #timeclock182503 -Node: Timedot184681 -Ref: #timedot184804 -Node: Timedot examples187909 -Ref: #timedot-examples188015 -Node: PART 3 REPORTING CONCEPTS190186 -Ref: #part-3-reporting-concepts190368 -Node: Amount formatting parseability190368 -Ref: #amount-formatting-parseability190565 -Node: Time periods192770 -Ref: #time-periods192909 -Node: Report start & end date193027 -Ref: #report-start-end-date193179 -Node: Smart dates194838 -Ref: #smart-dates194991 -Node: Report intervals196859 -Ref: #report-intervals197014 -Node: Date adjustment197432 -Ref: #date-adjustment197592 -Node: Period expressions198443 -Ref: #period-expressions198584 -Node: Period expressions with a report interval200348 -Ref: #period-expressions-with-a-report-interval200582 -Node: More complex report intervals200796 -Ref: #more-complex-report-intervals201041 -Node: Multiple weekday intervals202842 -Ref: #multiple-weekday-intervals203031 -Node: Depth203853 -Ref: #depth203955 -Node: Queries204251 -Ref: #queries204353 -Node: Query types205478 -Ref: #query-types205599 -Node: Combining query terms208935 -Ref: #combining-query-terms209112 -Node: Queries and command options210380 -Ref: #queries-and-command-options210579 -Node: Queries and valuation210828 -Ref: #queries-and-valuation211023 -Node: Querying with account aliases211252 -Ref: #querying-with-account-aliases211463 -Node: Querying with cost or value211593 -Ref: #querying-with-cost-or-value211770 -Node: Pivoting212071 -Ref: #pivoting212185 -Node: Generating data213962 -Ref: #generating-data214094 -Node: Forecasting215677 -Ref: #forecasting215802 -Node: --forecast216333 -Ref: #forecast216464 -Node: Inspecting forecast transactions217510 -Ref: #inspecting-forecast-transactions217712 -Node: Forecast reports218842 -Ref: #forecast-reports219015 -Node: Forecast tags219951 -Ref: #forecast-tags220111 -Node: Forecast period in detail220571 -Ref: #forecast-period-in-detail220765 -Node: Forecast troubleshooting221659 -Ref: #forecast-troubleshooting221827 -Node: Budgeting222730 -Ref: #budgeting222850 -Node: Cost reporting223287 -Ref: #cost-reporting223421 -Node: Recording costs224082 -Ref: #recording-costs224218 -Node: Reporting at cost225809 -Ref: #reporting-at-cost225984 -Node: Equity conversion postings226574 -Ref: #equity-conversion-postings226788 -Node: Inferring equity conversion postings229219 -Ref: #inferring-equity-conversion-postings229482 -Node: Combining costs and equity conversion postings230234 -Ref: #combining-costs-and-equity-conversion-postings230544 -Node: Requirements for detecting equity conversion postings231532 -Ref: #requirements-for-detecting-equity-conversion-postings231854 -Node: Infer cost and equity by default ?233054 -Ref: #infer-cost-and-equity-by-default233283 -Node: Value reporting233491 -Ref: #value-reporting233633 -Node: -V Value234407 -Ref: #v-value234539 -Node: -X Value in specified commodity234734 -Ref: #x-value-in-specified-commodity234935 -Node: Valuation date235084 -Ref: #valuation-date235261 -Node: Finding market price236044 -Ref: #finding-market-price236255 -Node: --infer-market-prices market prices from transactions237424 -Ref: #infer-market-prices-market-prices-from-transactions237706 -Node: Valuation commodity240468 -Ref: #valuation-commodity240687 -Node: Simple valuation examples241900 -Ref: #simple-valuation-examples242104 -Node: --value Flexible valuation242763 -Ref: #value-flexible-valuation242973 -Node: More valuation examples244617 -Ref: #more-valuation-examples244832 -Node: Interaction of valuation and queries246102 -Ref: #interaction-of-valuation-and-queries246349 -Node: Effect of valuation on reports246821 -Ref: #effect-of-valuation-on-reports247024 -Node: PART 4 COMMANDS254721 -Ref: #part-4-commands254870 -Node: Commands overview255249 -Ref: #commands-overview255383 -Node: DATA ENTRY255562 -Ref: #data-entry255686 -Node: DATA CREATION255885 -Ref: #data-creation256039 -Node: DATA MANAGEMENT256157 -Ref: #data-management256322 -Node: REPORTS FINANCIAL256443 -Ref: #reports-financial256618 -Node: REPORTS VERSATILE256923 -Ref: #reports-versatile257096 -Node: REPORTS BASIC257349 -Ref: #reports-basic257501 -Node: HELP258010 -Ref: #help258132 -Node: ADD-ONS258242 -Ref: #add-ons258348 -Node: accounts258927 -Ref: #accounts259060 -Node: activity260947 -Ref: #activity261066 -Node: add261440 -Ref: #add261550 -Node: aregister264361 -Ref: #aregister264482 -Node: aregister and posting dates267370 -Ref: #aregister-and-posting-dates267515 -Node: balance268271 -Ref: #balance268397 -Node: balance features269382 -Ref: #balance-features269522 -Node: Simple balance report271488 -Ref: #simple-balance-report271673 -Node: Balance report line format273298 -Ref: #balance-report-line-format273500 -Node: Filtered balance report275658 -Ref: #filtered-balance-report275850 -Node: List or tree mode276177 -Ref: #list-or-tree-mode276345 -Node: Depth limiting277690 -Ref: #depth-limiting277856 -Node: Dropping top-level accounts278457 -Ref: #dropping-top-level-accounts278657 -Node: Showing declared accounts278967 -Ref: #showing-declared-accounts279166 -Node: Sorting by amount279697 -Ref: #sorting-by-amount279864 -Node: Percentages280534 -Ref: #percentages280693 -Node: Multi-period balance report281241 -Ref: #multi-period-balance-report281441 -Node: Balance change end balance283716 -Ref: #balance-change-end-balance283925 -Node: Balance report types285353 -Ref: #balance-report-types285534 -Node: Calculation type286032 -Ref: #calculation-type286187 -Node: Accumulation type286736 -Ref: #accumulation-type286916 -Node: Valuation type287818 -Ref: #valuation-type288006 -Node: Combining balance report types289007 -Ref: #combining-balance-report-types289201 -Node: Budget report291039 -Ref: #budget-report291201 -Node: Budget report start date296855 -Ref: #budget-report-start-date297033 -Node: Budgets and subaccounts298365 -Ref: #budgets-and-subaccounts298572 -Node: Selecting budget goals302012 -Ref: #selecting-budget-goals302211 -Node: Budget vs forecast303246 -Ref: #budget-vs-forecast303405 -Node: Balance report layout305035 -Ref: #balance-report-layout305215 -Node: Useful balance reports313400 -Ref: #useful-balance-reports313560 -Node: balancesheet314645 -Ref: #balancesheet314790 -Node: balancesheetequity316117 -Ref: #balancesheetequity316275 -Node: cashflow317671 -Ref: #cashflow317802 -Node: check319237 -Ref: #check319351 -Node: Default checks320155 -Ref: #default-checks320281 -Node: Strict checks320778 -Ref: #strict-checks320923 -Node: Other checks321403 -Ref: #other-checks321545 -Node: Custom checks322078 -Ref: #custom-checks322235 -Node: More about specific checks322652 -Ref: #more-about-specific-checks322814 -Node: close323520 -Ref: #close323631 -Node: close and balance assertions327096 -Ref: #close-and-balance-assertions327274 -Node: Example retain earnings328425 -Ref: #example-retain-earnings328642 -Node: Example migrate balances to a new file329074 -Ref: #example-migrate-balances-to-a-new-file329339 -Node: Example excluding closing/opening transactions329915 -Ref: #example-excluding-closingopening-transactions330164 -Node: codes331382 -Ref: #codes331499 -Node: commodities332363 -Ref: #commodities332491 -Node: demo332561 -Ref: #demo332682 -Node: descriptions333598 -Ref: #descriptions333728 -Node: diff334019 -Ref: #diff334134 -Node: files335176 -Ref: #files335285 -Node: help335426 -Ref: #help-1335535 -Node: import336908 -Ref: #import337031 -Node: Deduplication338139 -Ref: #deduplication338264 -Node: Import testing340283 -Ref: #import-testing340448 -Node: Importing balance assignments341291 -Ref: #importing-balance-assignments341497 -Node: Commodity display styles342146 -Ref: #commodity-display-styles342319 -Node: incomestatement342448 -Ref: #incomestatement342590 -Node: notes343918 -Ref: #notes344040 -Node: payees344402 -Ref: #payees344517 -Node: prices345036 -Ref: #prices345151 -Node: print345804 -Ref: #print345919 -Node: print explicitness346895 -Ref: #print-explicitness347038 -Node: print amount style347817 -Ref: #print-amount-style347987 -Node: print parseability349039 -Ref: #print-parseability349211 -Node: print other features349960 -Ref: #print-other-features350139 -Node: print output format350660 -Ref: #print-output-format350808 -Node: register353927 -Ref: #register354049 -Node: Custom register output359080 -Ref: #custom-register-output359211 -Node: rewrite360555 -Ref: #rewrite360673 -Node: Re-write rules in a file362571 -Ref: #re-write-rules-in-a-file362734 -Node: Diff output format363883 -Ref: #diff-output-format364066 -Node: rewrite vs print --auto365158 -Ref: #rewrite-vs.-print---auto365318 -Node: roi365874 -Ref: #roi365981 -Node: Spaces and special characters in --inv and --pnl367793 -Ref: #spaces-and-special-characters-in---inv-and---pnl368033 -Node: Semantics of --inv and --pnl368521 -Ref: #semantics-of---inv-and---pnl368760 -Node: IRR and TWR explained370610 -Ref: #irr-and-twr-explained370770 -Node: stats374023 -Ref: #stats374131 -Node: tags375518 -Ref: #tags-1375625 -Node: test376634 -Ref: #test376727 -Node: PART 5 COMMON TASKS377469 -Ref: #part-5-common-tasks377615 -Node: Getting help377913 -Ref: #getting-help378054 -Node: Constructing command lines378814 -Ref: #constructing-command-lines379015 -Node: Starting a journal file379672 -Ref: #starting-a-journal-file379874 -Node: Setting LEDGER_FILE381076 -Ref: #setting-ledger_file381268 -Node: Setting opening balances382225 -Ref: #setting-opening-balances382426 -Node: Recording transactions385567 -Ref: #recording-transactions385756 -Node: Reconciling386312 -Ref: #reconciling386464 -Node: Reporting388721 -Ref: #reporting388870 -Node: Migrating to a new file392855 -Ref: #migrating-to-a-new-file393012 -Node: BUGS393311 -Ref: #bugs393401 -Node: Troubleshooting394280 -Ref: #troubleshooting394380 +Node: Commodity error checking100194 +Ref: #commodity-error-checking100375 +Node: decimal-mark directive100669 +Ref: #decimal-mark-directive100851 +Node: include directive101248 +Ref: #include-directive101412 +Node: P directive102324 +Ref: #p-directive102469 +Node: payee directive103358 +Ref: #payee-directive103507 +Node: tag directive103980 +Ref: #tag-directive104135 +Node: Periodic transactions104603 +Ref: #periodic-transactions104768 +Node: Periodic rule syntax106474 +Ref: #periodic-rule-syntax106652 +Node: Periodic rules and relative dates107297 +Ref: #periodic-rules-and-relative-dates107563 +Node: Two spaces between period expression and description!108074 +Ref: #two-spaces-between-period-expression-and-description108351 +Node: Auto postings109035 +Ref: #auto-postings109183 +Node: Auto postings and multiple files111620 +Ref: #auto-postings-and-multiple-files111784 +Node: Auto postings and dates112185 +Ref: #auto-postings-and-dates112433 +Node: Auto postings and transaction balancing / inferred amounts / balance assertions112608 +Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions112964 +Node: Auto posting tags113467 +Ref: #auto-posting-tags113749 +Node: Auto postings on forecast transactions only114385 +Ref: #auto-postings-on-forecast-transactions-only114631 +Node: Other syntax114878 +Ref: #other-syntax114994 +Node: Balance assignments115621 +Ref: #balance-assignments115777 +Node: Balance assignments and prices117150 +Ref: #balance-assignments-and-prices117365 +Node: Balance assignments and multiple files117576 +Ref: #balance-assignments-and-multiple-files117807 +Node: Bracketed posting dates118000 +Ref: #bracketed-posting-dates118184 +Node: D directive118698 +Ref: #d-directive118866 +Node: apply account directive120466 +Ref: #apply-account-directive120646 +Node: Y directive121333 +Ref: #y-directive121493 +Node: Secondary dates122321 +Ref: #secondary-dates122475 +Node: Star comments123289 +Ref: #star-comments123449 +Node: Valuation expressions123981 +Ref: #valuation-expressions124158 +Node: Virtual postings124280 +Ref: #virtual-postings124457 +Node: Other Ledger directives125894 +Ref: #other-ledger-directives126057 +Node: CSV126623 +Ref: #csv126716 +Node: CSV rules cheatsheet128796 +Ref: #csv-rules-cheatsheet128925 +Node: source130723 +Ref: #source130846 +Node: separator131726 +Ref: #separator131839 +Node: skip132379 +Ref: #skip132487 +Node: date-format133031 +Ref: #date-format133152 +Node: timezone133876 +Ref: #timezone133999 +Node: newest-first135004 +Ref: #newest-first135142 +Node: intra-day-reversed135719 +Ref: #intra-day-reversed135873 +Node: decimal-mark136321 +Ref: #decimal-mark136462 +Node: fields list136801 +Ref: #fields-list136940 +Node: Field assignment138611 +Ref: #field-assignment138755 +Node: Field names139832 +Ref: #field-names139963 +Node: date field141166 +Ref: #date-field141284 +Node: date2 field141332 +Ref: #date2-field141473 +Node: status field141529 +Ref: #status-field141672 +Node: code field141721 +Ref: #code-field141866 +Node: description field141911 +Ref: #description-field142071 +Node: comment field142130 +Ref: #comment-field142285 +Node: account field142578 +Ref: #account-field142728 +Node: amount field143298 +Ref: #amount-field143447 +Node: currency field146139 +Ref: #currency-field146292 +Node: balance field146549 +Ref: #balance-field146681 +Node: if block147053 +Ref: #if-block147174 +Node: Matchers148582 +Ref: #matchers148696 +Node: What matchers match149493 +Ref: #what-matchers-match149642 +Node: Combining matchers150082 +Ref: #combining-matchers150250 +Node: Match groups150736 +Ref: #match-groups150864 +Node: if table151611 +Ref: #if-table151733 +Node: balance-type153295 +Ref: #balance-type153424 +Node: include154124 +Ref: #include154251 +Node: Working with CSV154695 +Ref: #working-with-csv154842 +Node: Rapid feedback155249 +Ref: #rapid-feedback155382 +Node: Valid CSV155834 +Ref: #valid-csv155980 +Node: File Extension156712 +Ref: #file-extension156885 +Node: Reading CSV from standard input157449 +Ref: #reading-csv-from-standard-input157673 +Node: Reading multiple CSV files157837 +Ref: #reading-multiple-csv-files158068 +Node: Reading files specified by rule158309 +Ref: #reading-files-specified-by-rule158537 +Node: Valid transactions159708 +Ref: #valid-transactions159907 +Node: Deduplicating importing160535 +Ref: #deduplicating-importing160730 +Node: Setting amounts161766 +Ref: #setting-amounts161937 +Node: Amount signs164295 +Ref: #amount-signs164465 +Node: Setting currency/commodity165362 +Ref: #setting-currencycommodity165566 +Node: Amount decimal places166740 +Ref: #amount-decimal-places166946 +Node: Referencing other fields167258 +Ref: #referencing-other-fields167471 +Node: How CSV rules are evaluated168368 +Ref: #how-csv-rules-are-evaluated168585 +Node: Well factored rules170038 +Ref: #well-factored-rules170206 +Node: CSV rules examples170530 +Ref: #csv-rules-examples170665 +Node: Bank of Ireland170730 +Ref: #bank-of-ireland170867 +Node: Coinbase172329 +Ref: #coinbase172467 +Node: Amazon173514 +Ref: #amazon173639 +Node: Paypal175358 +Ref: #paypal175466 +Node: Timeclock183110 +Ref: #timeclock183215 +Node: Timedot185393 +Ref: #timedot185516 +Node: Timedot examples188621 +Ref: #timedot-examples188727 +Node: PART 3 REPORTING CONCEPTS190898 +Ref: #part-3-reporting-concepts191080 +Node: Amount formatting parseability191080 +Ref: #amount-formatting-parseability191277 +Node: Time periods193482 +Ref: #time-periods193621 +Node: Report start & end date193739 +Ref: #report-start-end-date193891 +Node: Smart dates195550 +Ref: #smart-dates195703 +Node: Report intervals197571 +Ref: #report-intervals197726 +Node: Date adjustment198144 +Ref: #date-adjustment198304 +Node: Period expressions199155 +Ref: #period-expressions199296 +Node: Period expressions with a report interval201060 +Ref: #period-expressions-with-a-report-interval201294 +Node: More complex report intervals201508 +Ref: #more-complex-report-intervals201753 +Node: Multiple weekday intervals203554 +Ref: #multiple-weekday-intervals203743 +Node: Depth204565 +Ref: #depth204667 +Node: Queries204963 +Ref: #queries205065 +Node: Query types206190 +Ref: #query-types206311 +Node: Combining query terms209647 +Ref: #combining-query-terms209824 +Node: Queries and command options211092 +Ref: #queries-and-command-options211291 +Node: Queries and valuation211540 +Ref: #queries-and-valuation211735 +Node: Querying with account aliases211964 +Ref: #querying-with-account-aliases212175 +Node: Querying with cost or value212305 +Ref: #querying-with-cost-or-value212482 +Node: Pivoting212783 +Ref: #pivoting212897 +Node: Generating data214674 +Ref: #generating-data214806 +Node: Forecasting216389 +Ref: #forecasting216514 +Node: --forecast217045 +Ref: #forecast217176 +Node: Inspecting forecast transactions218222 +Ref: #inspecting-forecast-transactions218424 +Node: Forecast reports219554 +Ref: #forecast-reports219727 +Node: Forecast tags220663 +Ref: #forecast-tags220823 +Node: Forecast period in detail221283 +Ref: #forecast-period-in-detail221477 +Node: Forecast troubleshooting222371 +Ref: #forecast-troubleshooting222539 +Node: Budgeting223442 +Ref: #budgeting223562 +Node: Cost reporting223999 +Ref: #cost-reporting224133 +Node: Recording costs224794 +Ref: #recording-costs224930 +Node: Reporting at cost226521 +Ref: #reporting-at-cost226696 +Node: Equity conversion postings227286 +Ref: #equity-conversion-postings227500 +Node: Inferring equity conversion postings229931 +Ref: #inferring-equity-conversion-postings230194 +Node: Combining costs and equity conversion postings230946 +Ref: #combining-costs-and-equity-conversion-postings231256 +Node: Requirements for detecting equity conversion postings232244 +Ref: #requirements-for-detecting-equity-conversion-postings232566 +Node: Infer cost and equity by default ?233766 +Ref: #infer-cost-and-equity-by-default233995 +Node: Value reporting234203 +Ref: #value-reporting234345 +Node: -V Value235119 +Ref: #v-value235251 +Node: -X Value in specified commodity235446 +Ref: #x-value-in-specified-commodity235647 +Node: Valuation date235796 +Ref: #valuation-date235973 +Node: Finding market price236756 +Ref: #finding-market-price236967 +Node: --infer-market-prices market prices from transactions238136 +Ref: #infer-market-prices-market-prices-from-transactions238418 +Node: Valuation commodity241180 +Ref: #valuation-commodity241399 +Node: Simple valuation examples242612 +Ref: #simple-valuation-examples242816 +Node: --value Flexible valuation243475 +Ref: #value-flexible-valuation243685 +Node: More valuation examples245329 +Ref: #more-valuation-examples245544 +Node: Interaction of valuation and queries246814 +Ref: #interaction-of-valuation-and-queries247061 +Node: Effect of valuation on reports247533 +Ref: #effect-of-valuation-on-reports247736 +Node: PART 4 COMMANDS255433 +Ref: #part-4-commands255582 +Node: Commands overview255961 +Ref: #commands-overview256095 +Node: DATA ENTRY256274 +Ref: #data-entry256398 +Node: DATA CREATION256597 +Ref: #data-creation256751 +Node: DATA MANAGEMENT256869 +Ref: #data-management257034 +Node: REPORTS FINANCIAL257155 +Ref: #reports-financial257330 +Node: REPORTS VERSATILE257635 +Ref: #reports-versatile257808 +Node: REPORTS BASIC258061 +Ref: #reports-basic258213 +Node: HELP258722 +Ref: #help258844 +Node: ADD-ONS258954 +Ref: #add-ons259060 +Node: accounts259639 +Ref: #accounts259772 +Node: activity261659 +Ref: #activity261778 +Node: add262152 +Ref: #add262262 +Node: aregister265073 +Ref: #aregister265194 +Node: aregister and posting dates268082 +Ref: #aregister-and-posting-dates268227 +Node: balance268983 +Ref: #balance269109 +Node: balance features270094 +Ref: #balance-features270234 +Node: Simple balance report272200 +Ref: #simple-balance-report272385 +Node: Balance report line format274010 +Ref: #balance-report-line-format274212 +Node: Filtered balance report276370 +Ref: #filtered-balance-report276562 +Node: List or tree mode276889 +Ref: #list-or-tree-mode277057 +Node: Depth limiting278402 +Ref: #depth-limiting278568 +Node: Dropping top-level accounts279169 +Ref: #dropping-top-level-accounts279369 +Node: Showing declared accounts279679 +Ref: #showing-declared-accounts279878 +Node: Sorting by amount280409 +Ref: #sorting-by-amount280576 +Node: Percentages281246 +Ref: #percentages281405 +Node: Multi-period balance report281953 +Ref: #multi-period-balance-report282153 +Node: Balance change end balance284428 +Ref: #balance-change-end-balance284637 +Node: Balance report types286065 +Ref: #balance-report-types286246 +Node: Calculation type286744 +Ref: #calculation-type286899 +Node: Accumulation type287448 +Ref: #accumulation-type287628 +Node: Valuation type288530 +Ref: #valuation-type288718 +Node: Combining balance report types289719 +Ref: #combining-balance-report-types289913 +Node: Budget report291751 +Ref: #budget-report291913 +Node: Budget report start date297567 +Ref: #budget-report-start-date297745 +Node: Budgets and subaccounts299077 +Ref: #budgets-and-subaccounts299284 +Node: Selecting budget goals302724 +Ref: #selecting-budget-goals302923 +Node: Budget vs forecast303958 +Ref: #budget-vs-forecast304117 +Node: Balance report layout305747 +Ref: #balance-report-layout305927 +Node: Useful balance reports314112 +Ref: #useful-balance-reports314272 +Node: balancesheet315357 +Ref: #balancesheet315502 +Node: balancesheetequity316829 +Ref: #balancesheetequity316987 +Node: cashflow318383 +Ref: #cashflow318514 +Node: check319949 +Ref: #check320063 +Node: Default checks320867 +Ref: #default-checks320993 +Node: Strict checks321490 +Ref: #strict-checks321635 +Node: Other checks322115 +Ref: #other-checks322257 +Node: Custom checks322790 +Ref: #custom-checks322947 +Node: More about specific checks323364 +Ref: #more-about-specific-checks323526 +Node: close324232 +Ref: #close324343 +Node: close and balance assertions327808 +Ref: #close-and-balance-assertions327986 +Node: Example retain earnings329137 +Ref: #example-retain-earnings329354 +Node: Example migrate balances to a new file329786 +Ref: #example-migrate-balances-to-a-new-file330051 +Node: Example excluding closing/opening transactions330627 +Ref: #example-excluding-closingopening-transactions330876 +Node: codes332094 +Ref: #codes332211 +Node: commodities333075 +Ref: #commodities333203 +Node: demo333273 +Ref: #demo333394 +Node: descriptions334310 +Ref: #descriptions334440 +Node: diff334731 +Ref: #diff334846 +Node: files335888 +Ref: #files335997 +Node: help336138 +Ref: #help-1336247 +Node: import337620 +Ref: #import337743 +Node: Deduplication338851 +Ref: #deduplication338976 +Node: Import testing340995 +Ref: #import-testing341160 +Node: Importing balance assignments342003 +Ref: #importing-balance-assignments342209 +Node: Commodity display styles342858 +Ref: #commodity-display-styles343031 +Node: incomestatement343160 +Ref: #incomestatement343302 +Node: notes344630 +Ref: #notes344752 +Node: payees345114 +Ref: #payees345229 +Node: prices345748 +Ref: #prices345863 +Node: print346516 +Ref: #print346631 +Node: print explicitness347607 +Ref: #print-explicitness347750 +Node: print amount style348529 +Ref: #print-amount-style348699 +Node: print parseability349751 +Ref: #print-parseability349923 +Node: print other features350672 +Ref: #print-other-features350851 +Node: print output format351372 +Ref: #print-output-format351520 +Node: register354639 +Ref: #register354761 +Node: Custom register output359792 +Ref: #custom-register-output359923 +Node: rewrite361267 +Ref: #rewrite361385 +Node: Re-write rules in a file363283 +Ref: #re-write-rules-in-a-file363446 +Node: Diff output format364595 +Ref: #diff-output-format364778 +Node: rewrite vs print --auto365870 +Ref: #rewrite-vs.-print---auto366030 +Node: roi366586 +Ref: #roi366693 +Node: Spaces and special characters in --inv and --pnl368505 +Ref: #spaces-and-special-characters-in---inv-and---pnl368745 +Node: Semantics of --inv and --pnl369233 +Ref: #semantics-of---inv-and---pnl369472 +Node: IRR and TWR explained371322 +Ref: #irr-and-twr-explained371482 +Node: stats374735 +Ref: #stats374843 +Node: tags376230 +Ref: #tags-1376337 +Node: test377346 +Ref: #test377439 +Node: PART 5 COMMON TASKS378181 +Ref: #part-5-common-tasks378327 +Node: Getting help378625 +Ref: #getting-help378766 +Node: Constructing command lines379526 +Ref: #constructing-command-lines379727 +Node: Starting a journal file380384 +Ref: #starting-a-journal-file380586 +Node: Setting LEDGER_FILE381788 +Ref: #setting-ledger_file381980 +Node: Setting opening balances382937 +Ref: #setting-opening-balances383138 +Node: Recording transactions386279 +Ref: #recording-transactions386468 +Node: Reconciling387024 +Ref: #reconciling387176 +Node: Reporting389433 +Ref: #reporting389582 +Node: Migrating to a new file393567 +Ref: #migrating-to-a-new-file393724 +Node: BUGS394023 +Ref: #bugs394113 +Node: Troubleshooting394992 +Ref: #troubleshooting395092  End Tag Table diff --git a/hledger/hledger.txt b/hledger/hledger.txt index e888426e9..92ff6d49c 100644 --- a/hledger/hledger.txt +++ b/hledger/hledger.txt @@ -2144,6 +2144,8 @@ Journal commodity 1.000,00 EUR commodity 1 000 000.0000 ; the no-symbol commodity + Commodities do not have tags (tags in the comment will be ignored). + A commodity directive's sample amount must always include a period or comma decimal mark (this rule helps disambiguate decimal marks and digit group marks). If you don't want to show any decimal digits, @@ -2256,9 +2258,15 @@ Journal error if any transaction refers to a payee that has not been declared. Eg: - payee Whole Foods + payee Whole Foods ; a comment - Any indented subdirectives are currently ignored. + Payees do not have tags (tags in the comment will be ignored). + + To declare the empty payee name, use "". + + payee "" + + Ledger-style indented subdirectives, if any, are currently ignored. tag directive tag TAGNAME @@ -3264,6 +3272,7 @@ CSV in the hledger manual (https://hledger.org/hledger.html#regular-expres- sions). + What matchers match With record matchers, it's important to know that the record matched is not the original CSV record, but a modified one: separators will be converted to commas, and enclosing double quotes (but not enclosing @@ -3276,15 +3285,19 @@ CSV 2023-01-01,Acme, Inc., 1,000 + Combining matchers When an if block has multiple matchers, they are combined as follows: o By default they are OR'd (any one of them can match) o When a matcher is preceded by ampersand (&) it will be AND'ed with - the previous matcher (both of them must match). + the previous matcher (both of them must match) - When a matcher is preceded by an exclamation mark (!), the matcher will - be negated, ie it will exclude CSV records that match. + o When a matcher is preceded by an exclamation mark (!), the matcher is + negated (it may not match). + + Currently there is a limitation: you can't use both & and ! on the same + line (you can't AND a negated matcher). Match groups Matchers can define match groups: parenthesised portions of the regular