update embedded manuals

This commit is contained in:
Simon Michael 2018-07-31 16:02:51 +01:00
parent 481e2061d7
commit 86c36c1dcc
3 changed files with 198 additions and 197 deletions

View File

@ -1374,7 +1374,7 @@ Secondly, they also can be used to define budget goals (with
.PP .PP
A periodic transaction rule looks like a normal journal entry, with the A periodic transaction rule looks like a normal journal entry, with the
date replaced by a tilde (\f[C]~\f[]) followed by a period expression date replaced by a tilde (\f[C]~\f[]) followed by a period expression
(mnemonic: \f[C]~\f[] looks like a repeating sine wave): (mnemonic: \f[C]~\f[] looks like a recurring sine wave.):
.IP .IP
.nf .nf
\f[C] \f[C]
@ -1456,15 +1456,18 @@ Goals and actual performance can then be compared in budget reports.
.PP .PP
For more details, see: balance: Budget report and Cookbook: Budgeting For more details, see: balance: Budget report and Cookbook: Budgeting
and Forecasting. and Forecasting.
.SS Automated postings
.PP .PP
Automated posting rules describe extra postings that should be added to ## Transaction Modifiers
certain transactions at report time, when the \f[C]\-\-auto\f[] flag is
used.
.PP .PP
An automated posting rule looks like a normal journal entry, except the Transaction modifier rules describe changes that should be applied
first line is an equal sign (\f[C]=\f[]) followed by a query (mnemonic: automatically to certain transactions.
\f[C]=\f[] looks like posting lines): Currently, this means adding extra postings (also known as
\[lq]automated postings\[rq]).
Transaction modifiers are enabled by the \f[C]\-\-auto\f[] flag.
.PP
A transaction modifier rule looks a bit like a normal journal entry,
except the first line is an equal sign (\f[C]=\f[]) followed by a query
(mnemonic: \f[C]=\f[] suggests matching something.):
.IP .IP
.nf .nf
\f[C] \f[C]

View File

@ -82,7 +82,6 @@ File: hledger_journal.info, Node: FILE FORMAT, Next: EDITOR SUPPORT, Prev: To
* Tags:: * Tags::
* Directives:: * Directives::
* Periodic transactions:: * Periodic transactions::
* Automated postings::
 
File: hledger_journal.info, Node: Transactions, Next: Postings, Up: FILE FORMAT File: hledger_journal.info, Node: Transactions, Next: Postings, Up: FILE FORMAT
@ -1197,7 +1196,7 @@ If account aliases are present, they are applied after the default
parent account. parent account.
 
File: hledger_journal.info, Node: Periodic transactions, Next: Automated postings, Prev: Directives, Up: FILE FORMAT File: hledger_journal.info, Node: Periodic transactions, Prev: Directives, Up: FILE FORMAT
1.15 Periodic transactions 1.15 Periodic transactions
========================== ==========================
@ -1209,7 +1208,7 @@ they also can be used to define budget goals (with '--budget').
A periodic transaction rule looks like a normal journal entry, with A periodic transaction rule looks like a normal journal entry, with
the date replaced by a tilde ('~') followed by a period expression the date replaced by a tilde ('~') followed by a period expression
(mnemonic: '~' looks like a repeating sine wave): (mnemonic: '~' looks like a recurring sine wave.):
~ monthly ~ monthly
expenses:rent $2000 expenses:rent $2000
@ -1293,18 +1292,16 @@ compared in budget reports.
For more details, see: balance: Budget report and Cookbook: Budgeting For more details, see: balance: Budget report and Cookbook: Budgeting
and Forecasting. and Forecasting.
 ## Transaction Modifiers
File: hledger_journal.info, Node: Automated postings, Prev: Periodic transactions, Up: FILE FORMAT
1.16 Automated postings Transaction modifier rules describe changes that should be applied
======================= automatically to certain transactions. Currently, this means adding
extra postings (also known as "automated postings"). Transaction
modifiers are enabled by the '--auto' flag.
Automated posting rules describe extra postings that should be added to A transaction modifier rule looks a bit like a normal journal entry,
certain transactions at report time, when the '--auto' flag is used. except the first line is an equal sign ('=') followed by a query
(mnemonic: '=' suggests matching something.):
An automated posting rule looks like a normal journal entry, except
the first line is an equal sign ('=') followed by a query (mnemonic: '='
looks like posting lines):
= expenses:gifts = expenses:gifts
budget:gifts *-1 budget:gifts *-1
@ -1367,89 +1364,87 @@ Tag Table:
Node: Top76 Node: Top76
Node: FILE FORMAT2378 Node: FILE FORMAT2378
Ref: #file-format2502 Ref: #file-format2502
Node: Transactions2786 Node: Transactions2763
Ref: #transactions2907 Ref: #transactions2884
Node: Postings3591 Node: Postings3568
Ref: #postings3718 Ref: #postings3695
Node: Dates4713 Node: Dates4690
Ref: #dates4828 Ref: #dates4805
Node: Simple dates4893 Node: Simple dates4870
Ref: #simple-dates5019 Ref: #simple-dates4996
Node: Secondary dates5385 Node: Secondary dates5362
Ref: #secondary-dates5539 Ref: #secondary-dates5516
Node: Posting dates7102 Node: Posting dates7079
Ref: #posting-dates7231 Ref: #posting-dates7208
Node: Status8605 Node: Status8582
Ref: #status8725 Ref: #status8702
Node: Description10433 Node: Description10410
Ref: #description10571 Ref: #description10548
Node: Payee and note10890 Node: Payee and note10867
Ref: #payee-and-note11004 Ref: #payee-and-note10981
Node: Account names11246 Node: Account names11223
Ref: #account-names11389 Ref: #account-names11366
Node: Amounts11876 Node: Amounts11853
Ref: #amounts12012 Ref: #amounts11989
Node: Virtual Postings15029 Node: Virtual Postings15006
Ref: #virtual-postings15188 Ref: #virtual-postings15165
Node: Balance Assertions16408 Node: Balance Assertions16385
Ref: #balance-assertions16583 Ref: #balance-assertions16560
Node: Assertions and ordering17479 Node: Assertions and ordering17456
Ref: #assertions-and-ordering17665 Ref: #assertions-and-ordering17642
Node: Assertions and included files18365 Node: Assertions and included files18342
Ref: #assertions-and-included-files18606 Ref: #assertions-and-included-files18583
Node: Assertions and multiple -f options18939 Node: Assertions and multiple -f options18916
Ref: #assertions-and-multiple--f-options19193 Ref: #assertions-and-multiple--f-options19170
Node: Assertions and commodities19325 Node: Assertions and commodities19302
Ref: #assertions-and-commodities19560 Ref: #assertions-and-commodities19537
Node: Assertions and subaccounts20256 Node: Assertions and subaccounts20233
Ref: #assertions-and-subaccounts20488 Ref: #assertions-and-subaccounts20465
Node: Assertions and virtual postings21009 Node: Assertions and virtual postings20986
Ref: #assertions-and-virtual-postings21216 Ref: #assertions-and-virtual-postings21193
Node: Balance Assignments21358 Node: Balance Assignments21335
Ref: #balance-assignments21539 Ref: #balance-assignments21516
Node: Transaction prices22659 Node: Transaction prices22636
Ref: #transaction-prices22828 Ref: #transaction-prices22805
Node: Comments25096 Node: Comments25073
Ref: #comments25230 Ref: #comments25207
Node: Tags26400 Node: Tags26377
Ref: #tags26518 Ref: #tags26495
Node: Directives27920 Node: Directives27897
Ref: #directives28063 Ref: #directives28040
Node: Comment blocks33919 Node: Comment blocks33896
Ref: #comment-blocks34064 Ref: #comment-blocks34041
Node: Including other files34240 Node: Including other files34217
Ref: #including-other-files34420 Ref: #including-other-files34397
Node: Default year34809 Node: Default year34805
Ref: #default-year34978 Ref: #default-year34974
Node: Declaring commodities35401 Node: Declaring commodities35397
Ref: #declaring-commodities35584 Ref: #declaring-commodities35580
Node: Default commodity36811 Node: Default commodity36807
Ref: #default-commodity36987 Ref: #default-commodity36983
Node: Market prices37623 Node: Market prices37619
Ref: #market-prices37788 Ref: #market-prices37784
Node: Declaring accounts38629 Node: Declaring accounts38625
Ref: #declaring-accounts38805 Ref: #declaring-accounts38801
Node: Rewriting accounts40476 Node: Rewriting accounts40472
Ref: #rewriting-accounts40661 Ref: #rewriting-accounts40657
Node: Basic aliases41395 Node: Basic aliases41391
Ref: #basic-aliases41541 Ref: #basic-aliases41537
Node: Regex aliases42245 Node: Regex aliases42241
Ref: #regex-aliases42416 Ref: #regex-aliases42412
Node: Multiple aliases43134 Node: Multiple aliases43130
Ref: #multiple-aliases43309 Ref: #multiple-aliases43305
Node: end aliases43807 Node: end aliases43803
Ref: #end-aliases43954 Ref: #end-aliases43950
Node: Default parent account44055 Node: Default parent account44051
Ref: #default-parent-account44221 Ref: #default-parent-account44217
Node: Periodic transactions45105 Node: Periodic transactions45101
Ref: #periodic-transactions45284 Ref: #periodic-transactions45253
Node: Forecasting with periodic transactions46494 Node: Forecasting with periodic transactions46464
Ref: #forecasting-with-periodic-transactions46737 Ref: #forecasting-with-periodic-transactions46707
Node: Budgeting with periodic transactions48424 Node: Budgeting with periodic transactions48394
Ref: #budgeting-with-periodic-transactions48663 Ref: #budgeting-with-periodic-transactions48633
Node: Automated postings49122 Node: EDITOR SUPPORT50380
Ref: #automated-postings49276 Ref: #editor-support50498
Node: EDITOR SUPPORT50415
Ref: #editor-support50533
 
End Tag Table End Tag Table

View File

@ -708,12 +708,12 @@ FILE FORMAT
file. The include file path may contain common glob patterns (e.g. file. The include file path may contain common glob patterns (e.g.
*). *).
The include directive can only be used in journal files. It can The include directive can only be used in journal files. It can
include journal, timeclock or timedot files, but not CSV files. include journal, timeclock or timedot files, but not CSV files.
Default year Default year
You can set a default year to be used for subsequent dates which don't 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. specify a year. This is a line beginning with Y followed by the year.
Eg: Eg:
Y2009 ; set default year to 2009 Y2009 ; set default year to 2009
@ -733,8 +733,8 @@ FILE FORMAT
assets assets
Declaring commodities Declaring commodities
The commodity directive declares commodities which may be used in the The commodity directive declares commodities which may be used in the
journal (though currently we do not enforce this). It may be written journal (though currently we do not enforce this). It may be written
on a single line, like this: on a single line, like this:
; commodity EXAMPLEAMOUNT ; commodity EXAMPLEAMOUNT
@ -744,8 +744,8 @@ FILE FORMAT
; separating thousands with comma. ; separating thousands with comma.
commodity 1,000.0000 AAAA commodity 1,000.0000 AAAA
or on multiple lines, using the "format" subdirective. In this case or on multiple lines, using the "format" subdirective. In this case
the commodity symbol appears twice and should be the same in both the commodity symbol appears twice and should be the same in both
places: places:
; commodity SYMBOL ; commodity SYMBOL
@ -757,19 +757,19 @@ FILE FORMAT
commodity INR commodity INR
format INR 9,99,99,999.00 format INR 9,99,99,999.00
Commodity directives have a second purpose: they define the standard Commodity directives have a second purpose: they define the standard
display format for amounts in the commodity. Normally the display for- display format for amounts in the commodity. Normally the display for-
mat is inferred from journal entries, but this can be unpredictable; mat is inferred from journal entries, but this can be unpredictable;
declaring it with a commodity directive overrides this and removes declaring it with a commodity directive overrides this and removes
ambiguity. Towards this end, amounts in commodity directives must ambiguity. Towards this end, amounts in commodity directives must
always be written with a decimal point (a period or comma, followed by always be written with a decimal point (a period or comma, followed by
0 or more decimal digits). 0 or more decimal digits).
Default commodity Default commodity
The D directive sets a default commodity (and display format), to be The D directive sets a default commodity (and display format), to be
used for amounts without a commodity symbol (ie, plain numbers). (Note used for amounts without a commodity symbol (ie, plain numbers). (Note
this differs from Ledger's default commodity directive.) The commodity this differs from Ledger's default commodity directive.) The commodity
and display format will be applied to all subsequent commodity-less and display format will be applied to all subsequent commodity-less
amounts, or until the next D directive. amounts, or until the next D directive.
# commodity-less amounts should be treated as dollars # commodity-less amounts should be treated as dollars
@ -784,9 +784,9 @@ FILE FORMAT
a decimal point. a decimal point.
Market prices Market prices
The P directive declares a market price, which is an exchange rate The P directive declares a market price, which is an exchange rate
between two commodities on a certain date. (In Ledger, they are called between two commodities on a certain date. (In Ledger, they are called
"historical prices".) These are often obtained from a stock exchange, "historical prices".) These are often obtained from a stock exchange,
cryptocurrency exchange, or the foreign exchange market. cryptocurrency exchange, or the foreign exchange market.
Here is the format: Here is the format:
@ -797,25 +797,25 @@ FILE FORMAT
o COMMODITYA is the symbol of the commodity being priced 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. 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: dollars during 2009, and $1.40 from 2010 onward:
P 2009/1/1 $1.35 P 2009/1/1 $1.35
P 2010/1/1 $1.40 P 2010/1/1 $1.40
The -V/--value flag can be used to convert reported amounts to another The -V/--value flag can be used to convert reported amounts to another
commodity using these prices. commodity using these prices.
Declaring accounts Declaring accounts
The account directive predeclares account names. The simplest form is The account directive predeclares account names. The simplest form is
account ACCTNAME, eg: account ACCTNAME, eg:
account assets:bank:checking account assets:bank:checking
Currently this mainly helps with account name autocompletion in eg Currently this mainly helps with account name autocompletion in eg
hledger add, hledger-iadd, hledger-web, and ledger-mode. hledger add, hledger-iadd, hledger-web, and ledger-mode.
In future it will also help detect misspelled accounts. In future it will also help detect misspelled accounts.
@ -827,10 +827,10 @@ FILE FORMAT
account revenues 4000 account revenues 4000
account expenses 6000 account expenses 6000
This affects how accounts are sorted in account and balance reports: This affects how accounts are sorted in account and balance reports:
accounts with codes are listed before accounts without codes, and in accounts with codes are listed before accounts without codes, and in
increasing code order (instead of listing all accounts alphabetically). increasing code order (instead of listing all accounts alphabetically).
Warning, this feature is incomplete; account codes do not yet affect Warning, this feature is incomplete; account codes do not yet affect
sort order in sort order in
o the accounts command o the accounts command
@ -842,9 +842,9 @@ FILE FORMAT
o hledger-web's sidebar o hledger-web's sidebar
Account codes should be all numeric digits, unique, and separated from Account codes should be all numeric digits, unique, and separated from
the account name by at least two spaces (since account names may con- the account name by at least two spaces (since account names may con-
tain single spaces). By convention, often the first digit indicates tain single spaces). By convention, often the first digit indicates
the type of account, as in this numbering scheme and the example above. the type of account, as in this numbering scheme and the example above.
In future, we might use this to recognize account types. In future, we might use this to recognize account types.
@ -873,14 +873,14 @@ FILE FORMAT
o customising reports o customising reports
Account aliases also rewrite account names in account directives. They Account aliases also rewrite account names in account directives. They
do not affect account names being entered via hledger add or do not affect account names being entered via hledger add or
hledger-web. hledger-web.
See also Cookbook: Rewrite account names. See also Cookbook: Rewrite account names.
Basic aliases Basic aliases
To set an account alias, use the alias directive in your journal file. 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 This affects all subsequent journal entries in the current file or its
included files. The spaces around the = are optional: included files. The spaces around the = are optional:
alias OLD = NEW alias OLD = NEW
@ -888,54 +888,54 @@ FILE FORMAT
Or, you can use the --alias 'OLD=NEW' option on the command line. This 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. affects all entries. It's useful for trying out aliases interactively.
OLD and NEW are case sensitive full account names. hledger will OLD and NEW are case sensitive full account names. hledger will
replace any occurrence of the old account name with the new one. Sub- replace any occurrence of the old account name with the new one. Sub-
accounts are also affected. Eg: accounts are also affected. Eg:
alias checking = assets:bank:wells fargo:checking 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" # rewrites "checking" to "assets:bank:wells fargo:checking", or "checking:a" to "assets:bank:wells fargo:checking:a"
Regex aliases 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: indicated by the forward slashes:
alias /REGEX/ = REPLACEMENT alias /REGEX/ = REPLACEMENT
or --alias '/REGEX/=REPLACEMENT'. or --alias '/REGEX/=REPLACEMENT'.
REGEX is a case-insensitive regular expression. Anywhere it matches REGEX is a case-insensitive regular expression. Anywhere it matches
inside an account name, the matched part will be replaced by REPLACE- inside an account name, the matched part will be replaced by REPLACE-
MENT. If REGEX contains parenthesised match groups, these can be ref- MENT. If REGEX contains parenthesised match groups, these can be ref-
erenced by the usual numeric backreferences in REPLACEMENT. Eg: erenced by the usual numeric backreferences in REPLACEMENT. Eg:
alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3 alias /^(.+):bank:([^:]+)(.*)/ = \1:\2 \3
# rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking" # rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking"
Also note that REPLACEMENT continues to the end of line (or on command 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- line, to end of option argument), so it can contain trailing white-
space. space.
Multiple aliases Multiple aliases
You can define as many aliases as you like using directives or com- You can define as many aliases as you like using directives or com-
mand-line options. Aliases are recursive - each alias sees the result mand-line options. Aliases are recursive - each alias sees the result
of applying previous ones. (This is different from Ledger, where of applying previous ones. (This is different from Ledger, where
aliases are non-recursive by default). Aliases are applied in the fol- aliases are non-recursive by default). Aliases are applied in the fol-
lowing order: lowing order:
1. alias directives, most recently seen first (recent directives take 1. alias directives, most recently seen first (recent directives take
precedence over earlier ones; directives not yet seen are ignored) precedence over earlier ones; directives not yet seen are ignored)
2. alias options, in the order they appear on the command line 2. alias options, in the order they appear on the command line
end aliases end aliases
You can clear (forget) all currently defined aliases with the You can clear (forget) all currently defined aliases with the
end aliases directive: end aliases directive:
end aliases end aliases
Default parent account Default parent account
You can specify a parent account which will be prepended to all You can specify a parent account which will be prepended to all
accounts within a section of the journal. Use the apply account and accounts within a section of the journal. Use the apply account and
end apply account directives like so: end apply account directives like so:
apply account home apply account home
@ -952,7 +952,7 @@ FILE FORMAT
home:food $10 home:food $10
home:cash $-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: file. Included files are also affected, eg:
apply account business apply account business
@ -961,30 +961,30 @@ FILE FORMAT
apply account personal apply account personal
include personal.journal 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. ported.
A default parent account also affects account directives. It does not A default parent account also affects account directives. It does not
affect account names being entered via hledger add or hledger-web. If affect account names being entered via hledger add or hledger-web. If
account aliases are present, they are applied after the default parent account aliases are present, they are applied after the default parent
account. account.
Periodic transactions Periodic transactions
Periodic transaction rules describe transactions that recur. They Periodic transaction rules describe transactions that recur. They
allow you to generate future transactions for forecasting, without hav- allow you to generate future transactions for forecasting, without hav-
ing to write them out explicitly in the journal (with --forecast). ing to write them out explicitly in the journal (with --forecast).
Secondly, they also can be used to define budget goals (with --budget). Secondly, they also can be used to define budget goals (with --budget).
A periodic transaction rule looks like a normal journal entry, with the A periodic transaction rule looks like a normal journal entry, with the
date replaced by a tilde (~) followed by a period expression (mnemonic: date replaced by a tilde (~) followed by a period expression (mnemonic:
~ looks like a repeating sine wave): ~ looks like a recurring sine wave.):
~ monthly ~ monthly
expenses:rent $2000 expenses:rent $2000
assets:bank:checking assets:bank:checking
There is an additional constraint on the period expression: the start There is an additional constraint on the period expression: the start
date must fall on a natural boundary of the interval. Eg 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. monthly from 2018/1/1 is valid, but monthly from 2018/1/15 is not.
If you write a transaction description or same-line comment, it must be If you write a transaction description or same-line comment, it must be
@ -998,74 +998,77 @@ FILE FORMAT
income:acme inc income:acme inc
Forecasting with periodic transactions Forecasting with periodic transactions
With the --forecast flag, each periodic transaction rule generates With the --forecast flag, each periodic transaction rule generates
future transactions recurring at the specified interval. These are not future transactions recurring at the specified interval. These are not
saved in the journal, but appear in all reports. They will look like saved in the journal, but appear in all reports. They will look like
normal transactions, but with an extra tag named recur, whose value is normal transactions, but with an extra tag named recur, whose value is
the generating period expression. the generating period expression.
Forecast transactions start on the first occurrence, and end on the Forecast transactions start on the first occurrence, and end on the
last occurrence, of their interval within the forecast period. The last occurrence, of their interval within the forecast period. The
forecast period: forecast period:
o begins on the later of o begins on the later of
o the report start date if specified with -b/-p/date: 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. journal, or today if there are no normal transactions.
o ends on the report end date if specified with -e/-p/date:, or 180 o ends on the report end date if specified with -e/-p/date:, or 180
days from today. days from today.
where "today" means the current date at report time. The "later of" where "today" means the current date at report time. The "later of"
rule ensures that forecast transactions do not overlap normal transac- rule ensures that forecast transactions do not overlap normal transac-
tions in time; they will begin only after normal transactions end. tions in time; they will begin only after normal transactions end.
Forecasting can be useful for estimating balances into the future, and Forecasting can be useful for estimating balances into the future, and
experimenting with different scenarios. Note the start date logic experimenting with different scenarios. Note the start date logic
means that forecasted transactions are automatically replaced by normal means that forecasted transactions are automatically replaced by normal
transactions as you add those. transactions as you add those.
Forecasting can also help with data entry: describe most of your trans- Forecasting can also help with data entry: describe most of your trans-
actions with periodic rules, and every so often copy the output of actions with periodic rules, and every so often copy the output of
print --forecast to the journal. print --forecast to the journal.
You can generate one-time transactions too: just write a period expres- You can generate one-time transactions too: just write a period expres-
sion specifying a date with no report interval. (You could also write sion specifying a date with no report interval. (You could also write
a normal transaction with a future date, but remember this disables a normal transaction with a future date, but remember this disables
forecast transactions on previous dates.) forecast transactions on previous dates.)
Budgeting with periodic transactions Budgeting with periodic transactions
With the --budget flag, currently supported by the balance command, With the --budget flag, currently supported by the balance command,
each periodic transaction rule declares recurring budget goals for the each periodic transaction rule declares recurring budget goals for the
specified accounts. Eg the first example above declares a goal of specified accounts. Eg the first example above declares a goal of
spending $2000 on rent (and also, a goal of depositing $2000 into spending $2000 on rent (and also, a goal of depositing $2000 into
checking) every month. Goals and actual performance can then be com- checking) every month. Goals and actual performance can then be com-
pared in budget reports. pared in budget reports.
For more details, see: balance: Budget report and Cookbook: Budgeting For more details, see: balance: Budget report and Cookbook: Budgeting
and Forecasting. and Forecasting.
Automated postings ## Transaction Modifiers
Automated posting rules describe extra postings that should be added to
certain transactions at report time, when the --auto flag is used.
An automated posting rule looks like a normal journal entry, except the Transaction modifier rules describe changes that should be applied
first line is an equal sign (=) followed by a query (mnemonic: = looks automatically to certain transactions. Currently, this means adding
like posting lines): extra postings (also known as "automated postings"). Transaction modi-
fiers are enabled by the --auto flag.
A transaction modifier rule looks a bit like a normal journal entry,
except the first line is an equal sign (=) followed by a query
(mnemonic: = suggests matching something.):
= expenses:gifts = expenses:gifts
budget:gifts *-1 budget:gifts *-1
assets:budget *1 assets:budget *1
The posting amounts can be of the form *N, which means "the amount of The posting amounts can be of the form *N, which means "the amount of
the matched transaction's first posting, multiplied by N". They can the matched transaction's first posting, multiplied by N". They can
also be ordinary fixed amounts. Fixed amounts with no commodity symbol also be ordinary fixed amounts. Fixed amounts with no commodity symbol
will be given the same commodity as the matched transaction's first will be given the same commodity as the matched transaction's first
posting. posting.
This example adds a corresponding (unbalanced) budget posting to every This example adds a corresponding (unbalanced) budget posting to every
transaction involving the expenses:gifts account: transaction involving the expenses:gifts account:
= expenses:gifts = expenses:gifts
@ -1081,16 +1084,16 @@ FILE FORMAT
(budget:gifts) $-20 (budget:gifts) $-20
assets assets
Like postings recorded by hand, automated postings participate in Like postings recorded by hand, automated postings participate in
transaction balancing, missing amount inference and balance assertions. transaction balancing, missing amount inference and balance assertions.
EDITOR SUPPORT EDITOR SUPPORT
Add-on modes exist for various text editors, to make working with jour- Add-on modes exist for various text editors, to make working with jour-
nal files easier. They add colour, navigation aids and helpful com- nal files easier. They add colour, navigation aids and helpful com-
mands. For hledger users who edit the journal file directly (the mands. For hledger users who edit the journal file directly (the
majority), using one of these modes is quite recommended. majority), using one of these modes is quite recommended.
These were written with Ledger in mind, but also work with hledger These were written with Ledger in mind, but also work with hledger
files: files:
@ -1109,7 +1112,7 @@ EDITOR SUPPORT
REPORTING BUGS 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) or hledger mail list)
@ -1123,7 +1126,7 @@ COPYRIGHT
SEE ALSO 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- hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1) dot(5), ledger(1)