;doc: regen manuals

[ci skip]
This commit is contained in:
Simon Michael 2020-06-21 10:36:21 -07:00
parent 24996caaeb
commit ce4de7aeb9
21 changed files with 1066 additions and 1064 deletions

View File

@ -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"

View File

@ -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

View File

@ -852,4 +852,4 @@ SEE ALSO
hledger 1.18 June 2020 hledger_csv(5)
hledger 1.18.99 June 2020 hledger_csv(5)

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -78,4 +78,4 @@ SEE ALSO
hledger 1.18 June 2020 hledger_timeclock(5)
hledger 1.18.99 June 2020 hledger_timeclock(5)

View File

@ -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"

View File

@ -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

View File

@ -161,4 +161,4 @@ SEE ALSO
hledger 1.18 June 2020 hledger_timedot(5)
hledger 1.18.99 June 2020 hledger_timedot(5)

View File

@ -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"

View File

@ -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

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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)

View File

@ -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]:

View File

@ -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

File diff suppressed because it is too large Load Diff