;doc: update manuals
This commit is contained in:
parent
e2751a79a3
commit
1bd7e1bf48
@ -2797,6 +2797,8 @@ commodity 1.000,00 EUR
|
|||||||
commodity 1 000 000.0000 ; the no-symbol commodity
|
commodity 1 000 000.0000 ; the no-symbol commodity
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.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
|
A commodity directive\[aq]s sample amount must always include a period
|
||||||
or comma decimal mark (this rule helps disambiguate decimal marks and
|
or comma decimal mark (this rule helps disambiguate decimal marks and
|
||||||
digit group marks).
|
digit group marks).
|
||||||
@ -2932,10 +2934,18 @@ refers to a payee that has not been declared.
|
|||||||
Eg:
|
Eg:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
payee Whole Foods
|
payee Whole Foods ; a comment
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.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
|
.SS \f[CR]tag\f[R] directive
|
||||||
\f[CR]tag TAGNAME\f[R]
|
\f[CR]tag TAGNAME\f[R]
|
||||||
.PP
|
.PP
|
||||||
@ -4154,7 +4164,7 @@ expression, that also supports GNU word boundaries (\f[CR]\[rs]b\f[R],
|
|||||||
else.
|
else.
|
||||||
If you have trouble, see \[dq]Regular expressions\[dq] in the hledger
|
If you have trouble, see \[dq]Regular expressions\[dq] in the hledger
|
||||||
manual (https://hledger.org/hledger.html#regular-expressions).
|
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
|
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
|
is not the original CSV record, but a modified one: separators will be
|
||||||
converted to commas, and enclosing double quotes (but not enclosing
|
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
|
.EX
|
||||||
2023-01-01,Acme, Inc., 1,000
|
2023-01-01,Acme, Inc., 1,000
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.SS Combining matchers
|
||||||
When an if block has multiple matchers, they are combined as follows:
|
When an if block has multiple matchers, they are combined as follows:
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
By default they are OR\[aq]d (any one of them can match)
|
By default they are OR\[aq]d (any one of them can match)
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
When a matcher is preceded by ampersand (\f[CR]&\f[R]) it will be
|
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
|
.PP
|
||||||
When a matcher is preceded by an exclamation mark (!), the matcher will
|
Currently there is a limitation: you can\[aq]t use both \f[CR]&\f[R] and
|
||||||
be negated, ie it will exclude CSV records that match.
|
\f[CR]!\f[R] on the same line (you can\[aq]t AND a negated matcher).
|
||||||
.SS Match groups
|
.SS Match groups
|
||||||
Matchers can define match groups: parenthesised portions of the regular
|
Matchers can define match groups: parenthesised portions of the regular
|
||||||
expression which are available for reference in field assignments.
|
expression which are available for reference in field assignments.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2144,6 +2144,8 @@ Journal
|
|||||||
commodity 1.000,00 EUR
|
commodity 1.000,00 EUR
|
||||||
commodity 1 000 000.0000 ; the no-symbol commodity
|
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
|
A commodity directive's sample amount must always include a period or
|
||||||
comma decimal mark (this rule helps disambiguate decimal marks and
|
comma decimal mark (this rule helps disambiguate decimal marks and
|
||||||
digit group marks). If you don't want to show any decimal digits,
|
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.
|
error if any transaction refers to a payee that has not been declared.
|
||||||
Eg:
|
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 directive
|
||||||
tag TAGNAME
|
tag TAGNAME
|
||||||
@ -3264,6 +3272,7 @@ CSV
|
|||||||
in the hledger manual (https://hledger.org/hledger.html#regular-expres-
|
in the hledger manual (https://hledger.org/hledger.html#regular-expres-
|
||||||
sions).
|
sions).
|
||||||
|
|
||||||
|
What matchers match
|
||||||
With record matchers, it's important to know that the record matched is
|
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
|
not the original CSV record, but a modified one: separators will be
|
||||||
converted to commas, and enclosing double quotes (but not enclosing
|
converted to commas, and enclosing double quotes (but not enclosing
|
||||||
@ -3276,15 +3285,19 @@ CSV
|
|||||||
|
|
||||||
2023-01-01,Acme, Inc., 1,000
|
2023-01-01,Acme, Inc., 1,000
|
||||||
|
|
||||||
|
Combining matchers
|
||||||
When an if block has multiple matchers, they are combined as follows:
|
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 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
|
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
|
o When a matcher is preceded by an exclamation mark (!), the matcher is
|
||||||
be negated, ie it will exclude CSV records that match.
|
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
|
Match groups
|
||||||
Matchers can define match groups: parenthesised portions of the regular
|
Matchers can define match groups: parenthesised portions of the regular
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user