update generated manuals
This commit is contained in:
parent
e6e8e3420b
commit
3390972cab
@ -35,13 +35,34 @@ The server listens on IP address 127.0.0.1, accessible only to local
|
||||
requests, by default.
|
||||
You can change this with \f[C]\-\-host\f[], eg
|
||||
\f[C]\-\-host\ 0.0.0.0\f[] to listen on all addresses.
|
||||
Note there is no other access control, so you will need to hide
|
||||
hledger\-api behind an authenticating proxy if you want to restrict
|
||||
access.
|
||||
You can change the TCP port (default: 8001) with \f[C]\-p\ PORT\f[].
|
||||
Note there is no other access control, and hledger\-api allows file
|
||||
browsing, so on shared machines you will certainly need to put it behind
|
||||
an authenticating proxy to restrict access.
|
||||
.PP
|
||||
If invoked as \f[C]hledger\-api\ \-\-swagger\f[], instead of starting a
|
||||
server the API docs will be printed in Swagger 2.0 format.
|
||||
You can change the TCP port it listens on (default: 8001) with
|
||||
\f[C]\-p\ PORT\f[].
|
||||
.PP
|
||||
API methods look like:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
/api/v1/accountnames
|
||||
/api/v1/transactions
|
||||
/api/v1/prices
|
||||
/api/v1/commodities
|
||||
/api/v1/accounts
|
||||
/api/v1/accounts/ACCTNAME
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
See \f[C]/api/swagger.json\f[] for a full list in Swagger 2.0 format.
|
||||
(Or you can run \f[C]hledger\-api\ \-\-swagger\f[] to print this in the
|
||||
console.)
|
||||
.PP
|
||||
hledger\-api also serves files, from the current directory by default,
|
||||
and the \f[C]/\f[] path will also show a directory listing.
|
||||
This is convenient for serving client\-side web code, in addition to the
|
||||
server\-side api.
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
Note: if invoking hledger\-api as a hledger subcommand, write
|
||||
|
||||
@ -19,12 +19,28 @@ hledger_journal(5) etc.
|
||||
The server listens on IP address 127.0.0.1, accessible only to local
|
||||
requests, by default. You can change this with '--host', eg '--host
|
||||
0.0.0.0' to listen on all addresses. Note there is no other access
|
||||
control, so you will need to hide hledger-api behind an authenticating
|
||||
proxy if you want to restrict access. You can change the TCP port
|
||||
(default: 8001) with '-p PORT'.
|
||||
control, and hledger-api allows file browsing, so on shared machines you
|
||||
will certainly need to put it behind an authenticating proxy to restrict
|
||||
access.
|
||||
|
||||
If invoked as 'hledger-api --swagger', instead of starting a server
|
||||
the API docs will be printed in Swagger 2.0 format.
|
||||
You can change the TCP port it listens on (default: 8001) with '-p
|
||||
PORT'.
|
||||
|
||||
API methods look like:
|
||||
|
||||
/api/v1/accountnames
|
||||
/api/v1/transactions
|
||||
/api/v1/prices
|
||||
/api/v1/commodities
|
||||
/api/v1/accounts
|
||||
/api/v1/accounts/ACCTNAME
|
||||
|
||||
See '/api/swagger.json' for a full list in Swagger 2.0 format. (Or
|
||||
you can run 'hledger-api --swagger' to print this in the console.)
|
||||
|
||||
hledger-api also serves files, from the current directory by default,
|
||||
and the '/' path will also show a directory listing. This is convenient
|
||||
for serving client-side web code, in addition to the server-side api.
|
||||
* Menu:
|
||||
|
||||
* OPTIONS::
|
||||
@ -64,7 +80,7 @@ options as shown above.
|
||||
|
||||
Tag Table:
|
||||
Node: Top72
|
||||
Node: OPTIONS1222
|
||||
Ref: #options1307
|
||||
Node: OPTIONS1664
|
||||
Ref: #options1749
|
||||
|
||||
End Tag Table
|
||||
|
||||
@ -29,15 +29,30 @@ DESCRIPTION
|
||||
The server listens on IP address 127.0.0.1, accessible only to local
|
||||
requests, by default. You can change this with --host, eg
|
||||
--host 0.0.0.0 to listen on all addresses. Note there is no other
|
||||
access control, so you will need to hide hledger-api behind an authen-
|
||||
ticating proxy if you want to restrict access. You can change the TCP
|
||||
port (default: 8001) with -p PORT.
|
||||
access control, and hledger-api allows file browsing, so on shared
|
||||
machines you will certainly need to put it behind an authenticating
|
||||
proxy to restrict access.
|
||||
|
||||
If invoked as hledger-api --swagger, instead of starting a server the
|
||||
API docs will be printed in Swagger 2.0 format.
|
||||
You can change the TCP port it listens on (default: 8001) with -p PORT.
|
||||
|
||||
API methods look like:
|
||||
|
||||
/api/v1/accountnames
|
||||
/api/v1/transactions
|
||||
/api/v1/prices
|
||||
/api/v1/commodities
|
||||
/api/v1/accounts
|
||||
/api/v1/accounts/ACCTNAME
|
||||
|
||||
See /api/swagger.json for a full list in Swagger 2.0 format. (Or you
|
||||
can run hledger-api --swagger to print this in the console.)
|
||||
|
||||
hledger-api also serves files, from the current directory by default,
|
||||
and the / path will also show a directory listing. This is convenient
|
||||
for serving client-side web code, in addition to the server-side api.
|
||||
|
||||
OPTIONS
|
||||
Note: if invoking hledger-api as a hledger subcommand, write -- before
|
||||
Note: if invoking hledger-api as a hledger subcommand, write -- before
|
||||
options as shown above.
|
||||
|
||||
-f --file=FILE
|
||||
@ -64,23 +79,23 @@ OPTIONS
|
||||
|
||||
ENVIRONMENT
|
||||
LEDGER_FILE The journal file path when not specified with -f. Default:
|
||||
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
|
||||
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
|
||||
nal).
|
||||
|
||||
FILES
|
||||
Reads data from one or more files in hledger journal, timeclock, time-
|
||||
dot, or CSV format specified with -f, or $LEDGER_FILE, or
|
||||
$HOME/.hledger.journal (on windows, perhaps
|
||||
Reads data from one or more files in hledger journal, timeclock, time-
|
||||
dot, or CSV format specified with -f, or $LEDGER_FILE, or
|
||||
$HOME/.hledger.journal (on windows, perhaps
|
||||
C:/Users/USER/.hledger.journal).
|
||||
|
||||
BUGS
|
||||
The need to precede options with -- when invoked from hledger is awk-
|
||||
The need to precede options with -- when invoked from hledger is awk-
|
||||
ward.
|
||||
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@ -94,7 +109,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)
|
||||
|
||||
|
||||
@ -1144,8 +1144,11 @@ The \f[C]include\f[] directive can only be used in journal files.
|
||||
It can include journal, timeclock or timedot files, but not CSV files.
|
||||
.SH Periodic transactions
|
||||
.PP
|
||||
A periodic transaction starts with a tilde `~' in place of a date
|
||||
followed by a period expression:
|
||||
Periodic transactions are a kind of rule with a dual purpose: they can
|
||||
specify recurring future transactions (with \f[C]\-\-forecast\f[]), or
|
||||
budget goals (with \f[C]\-\-budget\f[]).
|
||||
They look a bit like a transaction, except the first line is a tilde
|
||||
(\f[C]~\f[]) followed by a period expression:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
@ -1155,23 +1158,25 @@ followed by a period expression:
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
Periodic transactions are used for forecasting and budgeting only, they
|
||||
have no effect unless the \f[C]\-\-forecast\f[] or \f[C]\-\-budget\f[]
|
||||
flag is used.
|
||||
With \f[C]\-\-forecast\f[], each periodic transaction rule generates
|
||||
recurring forecast transactions at the specified interval, beginning the
|
||||
day after the last recorded journal transaction and ending 6 months from
|
||||
today, or at the specified report end date.
|
||||
With \f[C]balance\ \-\-budget\f[], each periodic transaction declares
|
||||
recurring budget goals for one or more accounts.
|
||||
.PD 0
|
||||
.P
|
||||
.PD
|
||||
For more details, see: balance > Budgeting, Budgeting and Forecasting.
|
||||
.SH Automated posting rules
|
||||
recurring \[lq]forecast\[rq] transactions at the specified interval,
|
||||
beginning the day after the latest recorded journal transaction (or
|
||||
today, if there are no transactions) and ending 6 months from today (or
|
||||
at the report end date, if specified).
|
||||
.PP
|
||||
Automated posting rule starts with an equal sign `=' in place of a date,
|
||||
followed by a query:
|
||||
With \f[C]balance\ \-\-budget\f[], each periodic transaction declares
|
||||
recurring budget goals for the specified accounts.
|
||||
Eg the example above declares the goal of receiving $400 from
|
||||
\f[C]income:acme\ inc\f[] (and also, depositing $400 into
|
||||
\f[C]assets:bank:checking\f[]) every week.
|
||||
.PP
|
||||
For more details, see: balance: Budgeting and Budgeting and Forecasting.
|
||||
.SH Automated postings
|
||||
.PP
|
||||
Automated postings are postings added automatically by rule to certain
|
||||
transactions (with \f[C]\-\-auto\f[]).
|
||||
An automated posting rule looks like a transaction where the first line
|
||||
is an equal sign (\f[C]=\f[]) followed by a query:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
@ -1181,36 +1186,33 @@ followed by a query:
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
When \f[C]\-\-auto\f[] option is specified on the command line,
|
||||
automated posting rule will add its postings to all transactions that
|
||||
match the query.
|
||||
The posting amounts can be of the form \f[C]*N\f[], which means \[lq]the
|
||||
amount of the matched transaction's first posting, multiplied by N\[rq].
|
||||
They can also be ordinary fixed amounts.
|
||||
Fixed amounts with no commodity symbol will be given the same commodity
|
||||
as the matched transaction's first posting.
|
||||
.PP
|
||||
If amount in the automated posting rule includes commodity name, new
|
||||
posting will be made in the given commodity, otherwise commodity of the
|
||||
matched transaction will be used.
|
||||
.PP
|
||||
When amount in the automated posting rule begins with the '*', amount
|
||||
will be treated as a multiplier that is applied to the amount of the
|
||||
first posting in the matched transaction.
|
||||
.PP
|
||||
In example above, every transaction in \f[C]expenses:gifts\f[] account
|
||||
will have two additional postings added to it: amount of the original
|
||||
gift will be debited from \f[C]budget:gifts\f[] and credited into
|
||||
\f[C]assets:budget\f[]:
|
||||
This example adds a corresponding (unbalanced) budget posting to every
|
||||
transaction involving the \f[C]expenses:gifts\f[] account:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
;\ Original\ transaction
|
||||
=\ expenses:gifts
|
||||
\ \ \ \ (budget:gifts)\ \ *\-1
|
||||
|
||||
2017\-12\-14
|
||||
\ \ expenses:gifts\ \ $20
|
||||
\ \ assets
|
||||
|
||||
;\ With\ automated\ postings\ applied
|
||||
\f[]
|
||||
.fi
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
$\ hledger\ print\ \-\-auto
|
||||
2017/12/14
|
||||
\ \ \ \ expenses:gifts\ \ \ \ \ \ \ \ \ \ \ \ \ $20
|
||||
\ \ \ \ assets
|
||||
\ \ \ \ budget:gifts\ \ \ \ \ \ \ \ \ \ \ \ \ \ $\-20
|
||||
\ \ \ \ assets:budget\ \ \ \ \ \ \ \ \ \ \ \ \ \ $20
|
||||
\ \ \ \ (budget:gifts)\ \ \ \ \ \ \ \ \ \ \ \ $\-20
|
||||
\f[]
|
||||
.fi
|
||||
.SH EDITOR SUPPORT
|
||||
|
||||
@ -58,7 +58,7 @@ assisted by the helper modes for emacs or vim.
|
||||
|
||||
* FILE FORMAT::
|
||||
* Periodic transactions::
|
||||
* Automated posting rules::
|
||||
* Automated postings::
|
||||
* EDITOR SUPPORT::
|
||||
|
||||
|
||||
@ -1080,71 +1080,73 @@ current file. Glob patterns ('*') are not currently supported.
|
||||
include journal, timeclock or timedot files, but not CSV files.
|
||||
|
||||
|
||||
File: hledger_journal.info, Node: Periodic transactions, Next: Automated posting rules, Prev: FILE FORMAT, Up: Top
|
||||
File: hledger_journal.info, Node: Periodic transactions, Next: Automated postings, Prev: FILE FORMAT, Up: Top
|
||||
|
||||
2 Periodic transactions
|
||||
***********************
|
||||
|
||||
A periodic transaction starts with a tilde '~' in place of a date
|
||||
followed by a period expression:
|
||||
Periodic transactions are a kind of rule with a dual purpose: they can
|
||||
specify recurring future transactions (with '--forecast'), or budget
|
||||
goals (with '--budget'). They look a bit like a transaction, except the
|
||||
first line is a tilde ('~') followed by a period expression:
|
||||
|
||||
~ weekly
|
||||
assets:bank:checking $400 ; paycheck
|
||||
income:acme inc
|
||||
|
||||
Periodic transactions are used for forecasting and budgeting only,
|
||||
they have no effect unless the '--forecast' or '--budget' flag is used.
|
||||
With '--forecast', each periodic transaction rule generates recurring
|
||||
forecast transactions at the specified interval, beginning the day after
|
||||
the last recorded journal transaction and ending 6 months from today, or
|
||||
at the specified report end date. With 'balance --budget', each
|
||||
periodic transaction declares recurring budget goals for one or more
|
||||
accounts.
|
||||
For more details, see: balance > Budgeting, Budgeting and Forecasting.
|
||||
With '--forecast', each periodic transaction rule generates recurring
|
||||
"forecast" transactions at the specified interval, beginning the day
|
||||
after the latest recorded journal transaction (or today, if there are no
|
||||
transactions) and ending 6 months from today (or at the report end date,
|
||||
if specified).
|
||||
|
||||
With 'balance --budget', each periodic transaction declares recurring
|
||||
budget goals for the specified accounts. Eg the example above declares
|
||||
the goal of receiving $400 from 'income:acme inc' (and also, depositing
|
||||
$400 into 'assets:bank:checking') every week.
|
||||
|
||||
For more details, see: balance: Budgeting and Budgeting and
|
||||
Forecasting.
|
||||
|
||||
|
||||
File: hledger_journal.info, Node: Automated posting rules, Next: EDITOR SUPPORT, Prev: Periodic transactions, Up: Top
|
||||
File: hledger_journal.info, Node: Automated postings, Next: EDITOR SUPPORT, Prev: Periodic transactions, Up: Top
|
||||
|
||||
3 Automated posting rules
|
||||
*************************
|
||||
3 Automated postings
|
||||
********************
|
||||
|
||||
Automated posting rule starts with an equal sign '=' in place of a date,
|
||||
followed by a query:
|
||||
Automated postings are postings added automatically by rule to certain
|
||||
transactions (with '--auto'). An automated posting rule looks like a
|
||||
transaction where the first line is an equal sign ('=') followed by a
|
||||
query:
|
||||
|
||||
= expenses:gifts
|
||||
budget:gifts *-1
|
||||
assets:budget *1
|
||||
|
||||
When '--auto' option is specified on the command line, automated
|
||||
posting rule will add its postings to all transactions that match the
|
||||
query.
|
||||
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
|
||||
also be ordinary fixed amounts. Fixed amounts with no commodity symbol
|
||||
will be given the same commodity as the matched transaction's first
|
||||
posting.
|
||||
|
||||
If amount in the automated posting rule includes commodity name, new
|
||||
posting will be made in the given commodity, otherwise commodity of the
|
||||
matched transaction will be used.
|
||||
This example adds a corresponding (unbalanced) budget posting to
|
||||
every transaction involving the 'expenses:gifts' account:
|
||||
|
||||
When amount in the automated posting rule begins with the '*', amount
|
||||
will be treated as a multiplier that is applied to the amount of the
|
||||
first posting in the matched transaction.
|
||||
= expenses:gifts
|
||||
(budget:gifts) *-1
|
||||
|
||||
In example above, every transaction in 'expenses:gifts' account will
|
||||
have two additional postings added to it: amount of the original gift
|
||||
will be debited from 'budget:gifts' and credited into 'assets:budget':
|
||||
|
||||
; Original transaction
|
||||
2017-12-14
|
||||
expenses:gifts $20
|
||||
assets
|
||||
|
||||
; With automated postings applied
|
||||
$ hledger print --auto
|
||||
2017/12/14
|
||||
expenses:gifts $20
|
||||
assets
|
||||
budget:gifts $-20
|
||||
assets:budget $20
|
||||
(budget:gifts) $-20
|
||||
|
||||
|
||||
File: hledger_journal.info, Node: EDITOR SUPPORT, Prev: Automated posting rules, Up: Top
|
||||
File: hledger_journal.info, Node: EDITOR SUPPORT, Prev: Automated postings, Up: Top
|
||||
|
||||
4 EDITOR SUPPORT
|
||||
****************
|
||||
@ -1173,89 +1175,89 @@ Code
|
||||
|
||||
Tag Table:
|
||||
Node: Top76
|
||||
Node: FILE FORMAT2430
|
||||
Ref: #file-format2561
|
||||
Node: Transactions2784
|
||||
Ref: #transactions2905
|
||||
Node: Postings3589
|
||||
Ref: #postings3716
|
||||
Node: Dates4711
|
||||
Ref: #dates4826
|
||||
Node: Simple dates4891
|
||||
Ref: #simple-dates5017
|
||||
Node: Secondary dates5383
|
||||
Ref: #secondary-dates5537
|
||||
Node: Posting dates7100
|
||||
Ref: #posting-dates7229
|
||||
Node: Status8603
|
||||
Ref: #status8723
|
||||
Node: Description10431
|
||||
Ref: #description10569
|
||||
Node: Payee and note10888
|
||||
Ref: #payee-and-note11002
|
||||
Node: Account names11244
|
||||
Ref: #account-names11387
|
||||
Node: Amounts11874
|
||||
Ref: #amounts12010
|
||||
Node: Virtual Postings14690
|
||||
Ref: #virtual-postings14849
|
||||
Node: Balance Assertions16069
|
||||
Ref: #balance-assertions16244
|
||||
Node: Assertions and ordering17140
|
||||
Ref: #assertions-and-ordering17326
|
||||
Node: Assertions and included files18026
|
||||
Ref: #assertions-and-included-files18267
|
||||
Node: Assertions and multiple -f options18600
|
||||
Ref: #assertions-and-multiple--f-options18854
|
||||
Node: Assertions and commodities18986
|
||||
Ref: #assertions-and-commodities19221
|
||||
Node: Assertions and subaccounts19917
|
||||
Ref: #assertions-and-subaccounts20149
|
||||
Node: Assertions and virtual postings20670
|
||||
Ref: #assertions-and-virtual-postings20877
|
||||
Node: Balance Assignments21019
|
||||
Ref: #balance-assignments21188
|
||||
Node: Prices22308
|
||||
Ref: #prices22441
|
||||
Node: Transaction prices22492
|
||||
Ref: #transaction-prices22637
|
||||
Node: Market prices24793
|
||||
Ref: #market-prices24928
|
||||
Node: Comments25888
|
||||
Ref: #comments26010
|
||||
Node: Tags27252
|
||||
Ref: #tags27370
|
||||
Node: Directives28772
|
||||
Ref: #directives28885
|
||||
Node: Account aliases29078
|
||||
Ref: #account-aliases29222
|
||||
Node: Basic aliases29826
|
||||
Ref: #basic-aliases29969
|
||||
Node: Regex aliases30659
|
||||
Ref: #regex-aliases30827
|
||||
Node: Multiple aliases31545
|
||||
Ref: #multiple-aliases31717
|
||||
Node: end aliases32215
|
||||
Ref: #end-aliases32355
|
||||
Node: account directive32456
|
||||
Ref: #account-directive32636
|
||||
Node: apply account directive33983
|
||||
Ref: #apply-account-directive34179
|
||||
Node: Multi-line comments34838
|
||||
Ref: #multi-line-comments35028
|
||||
Node: commodity directive35156
|
||||
Ref: #commodity-directive35340
|
||||
Node: Default commodity36212
|
||||
Ref: #default-commodity36385
|
||||
Node: Default year36922
|
||||
Ref: #default-year37087
|
||||
Node: Including other files37510
|
||||
Ref: #including-other-files37667
|
||||
Node: Periodic transactions38064
|
||||
Ref: #periodic-transactions38235
|
||||
Node: Automated posting rules38978
|
||||
Ref: #automated-posting-rules39156
|
||||
Node: EDITOR SUPPORT40265
|
||||
Ref: #editor-support40395
|
||||
Node: FILE FORMAT2425
|
||||
Ref: #file-format2556
|
||||
Node: Transactions2779
|
||||
Ref: #transactions2900
|
||||
Node: Postings3584
|
||||
Ref: #postings3711
|
||||
Node: Dates4706
|
||||
Ref: #dates4821
|
||||
Node: Simple dates4886
|
||||
Ref: #simple-dates5012
|
||||
Node: Secondary dates5378
|
||||
Ref: #secondary-dates5532
|
||||
Node: Posting dates7095
|
||||
Ref: #posting-dates7224
|
||||
Node: Status8598
|
||||
Ref: #status8718
|
||||
Node: Description10426
|
||||
Ref: #description10564
|
||||
Node: Payee and note10883
|
||||
Ref: #payee-and-note10997
|
||||
Node: Account names11239
|
||||
Ref: #account-names11382
|
||||
Node: Amounts11869
|
||||
Ref: #amounts12005
|
||||
Node: Virtual Postings14685
|
||||
Ref: #virtual-postings14844
|
||||
Node: Balance Assertions16064
|
||||
Ref: #balance-assertions16239
|
||||
Node: Assertions and ordering17135
|
||||
Ref: #assertions-and-ordering17321
|
||||
Node: Assertions and included files18021
|
||||
Ref: #assertions-and-included-files18262
|
||||
Node: Assertions and multiple -f options18595
|
||||
Ref: #assertions-and-multiple--f-options18849
|
||||
Node: Assertions and commodities18981
|
||||
Ref: #assertions-and-commodities19216
|
||||
Node: Assertions and subaccounts19912
|
||||
Ref: #assertions-and-subaccounts20144
|
||||
Node: Assertions and virtual postings20665
|
||||
Ref: #assertions-and-virtual-postings20872
|
||||
Node: Balance Assignments21014
|
||||
Ref: #balance-assignments21183
|
||||
Node: Prices22303
|
||||
Ref: #prices22436
|
||||
Node: Transaction prices22487
|
||||
Ref: #transaction-prices22632
|
||||
Node: Market prices24788
|
||||
Ref: #market-prices24923
|
||||
Node: Comments25883
|
||||
Ref: #comments26005
|
||||
Node: Tags27247
|
||||
Ref: #tags27365
|
||||
Node: Directives28767
|
||||
Ref: #directives28880
|
||||
Node: Account aliases29073
|
||||
Ref: #account-aliases29217
|
||||
Node: Basic aliases29821
|
||||
Ref: #basic-aliases29964
|
||||
Node: Regex aliases30654
|
||||
Ref: #regex-aliases30822
|
||||
Node: Multiple aliases31540
|
||||
Ref: #multiple-aliases31712
|
||||
Node: end aliases32210
|
||||
Ref: #end-aliases32350
|
||||
Node: account directive32451
|
||||
Ref: #account-directive32631
|
||||
Node: apply account directive33978
|
||||
Ref: #apply-account-directive34174
|
||||
Node: Multi-line comments34833
|
||||
Ref: #multi-line-comments35023
|
||||
Node: commodity directive35151
|
||||
Ref: #commodity-directive35335
|
||||
Node: Default commodity36207
|
||||
Ref: #default-commodity36380
|
||||
Node: Default year36917
|
||||
Ref: #default-year37082
|
||||
Node: Including other files37505
|
||||
Ref: #including-other-files37662
|
||||
Node: Periodic transactions38059
|
||||
Ref: #periodic-transactions38225
|
||||
Node: Automated postings39214
|
||||
Ref: #automated-postings39377
|
||||
Node: EDITOR SUPPORT40279
|
||||
Ref: #editor-support40404
|
||||
|
||||
End Tag Table
|
||||
|
||||
@ -837,64 +837,68 @@ FILE FORMAT
|
||||
include journal, timeclock or timedot files, but not CSV files.
|
||||
|
||||
Periodic transactions
|
||||
A periodic transaction starts with a tilde `~' in place of a date fol-
|
||||
lowed by a period expression:
|
||||
Periodic transactions are a kind of rule with a dual purpose: they can
|
||||
specify recurring future transactions (with --forecast), or budget
|
||||
goals (with --budget). They look a bit like a transaction, except the
|
||||
first line is a tilde (~) followed by a period expression:
|
||||
|
||||
~ weekly
|
||||
assets:bank:checking $400 ; paycheck
|
||||
income:acme inc
|
||||
|
||||
Periodic transactions are used for forecasting and budgeting only, they
|
||||
have no effect unless the --forecast or --budget flag is used. With
|
||||
--forecast, each periodic transaction rule generates recurring forecast
|
||||
transactions at the specified interval, beginning the day after the
|
||||
last recorded journal transaction and ending 6 months from today, or at
|
||||
the specified report end date. With balance --budget, each periodic
|
||||
transaction declares recurring budget goals for one or more accounts.
|
||||
For more details, see: balance > Budgeting, Budgeting and Forecasting.
|
||||
With --forecast, each periodic transaction rule generates recurring
|
||||
"forecast" transactions at the specified interval, beginning the day
|
||||
after the latest recorded journal transaction (or today, if there are
|
||||
no transactions) and ending 6 months from today (or at the report end
|
||||
date, if specified).
|
||||
|
||||
Automated posting rules
|
||||
Automated posting rule starts with an equal sign `=' in place of a
|
||||
date, followed by a query:
|
||||
With balance --budget, each periodic transaction declares recurring
|
||||
budget goals for the specified accounts. Eg the example above declares
|
||||
the goal of receiving $400 from income:acme inc (and also, depositing
|
||||
$400 into assets:bank:checking) every week.
|
||||
|
||||
For more details, see: balance: Budgeting and Budgeting and Forecast-
|
||||
ing.
|
||||
|
||||
Automated postings
|
||||
Automated postings are postings added automatically by rule to certain
|
||||
transactions (with --auto). An automated posting rule looks like a
|
||||
transaction where the first line is an equal sign (=) followed by a
|
||||
query:
|
||||
|
||||
= expenses:gifts
|
||||
budget:gifts *-1
|
||||
assets:budget *1
|
||||
|
||||
When --auto option is specified on the command line, automated posting
|
||||
rule will add its postings to all transactions that match the query.
|
||||
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
|
||||
also be ordinary fixed amounts. Fixed amounts with no commodity symbol
|
||||
will be given the same commodity as the matched transaction's first
|
||||
posting.
|
||||
|
||||
If amount in the automated posting rule includes commodity name, new
|
||||
posting will be made in the given commodity, otherwise commodity of the
|
||||
matched transaction will be used.
|
||||
This example adds a corresponding (unbalanced) budget posting to every
|
||||
transaction involving the expenses:gifts account:
|
||||
|
||||
When amount in the automated posting rule begins with the '*', amount
|
||||
will be treated as a multiplier that is applied to the amount of the
|
||||
first posting in the matched transaction.
|
||||
= expenses:gifts
|
||||
(budget:gifts) *-1
|
||||
|
||||
In example above, every transaction in expenses:gifts account will have
|
||||
two additional postings added to it: amount of the original gift will
|
||||
be debited from budget:gifts and credited into assets:budget:
|
||||
|
||||
; Original transaction
|
||||
2017-12-14
|
||||
expenses:gifts $20
|
||||
assets
|
||||
|
||||
; With automated postings applied
|
||||
$ hledger print --auto
|
||||
2017/12/14
|
||||
expenses:gifts $20
|
||||
assets
|
||||
budget:gifts $-20
|
||||
assets:budget $20
|
||||
(budget:gifts) $-20
|
||||
|
||||
EDITOR SUPPORT
|
||||
Add-on modes exist for various text editors, to make working with jour-
|
||||
nal files easier. They add colour, navigation aids and helpful com-
|
||||
mands. For hledger users who edit the journal file directly (the
|
||||
nal files easier. They add colour, navigation aids and helpful com-
|
||||
mands. For hledger users who edit the journal file directly (the
|
||||
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:
|
||||
|
||||
|
||||
@ -913,7 +917,7 @@ EDITOR SUPPORT
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@ -927,7 +931,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)
|
||||
|
||||
|
||||
@ -1497,6 +1497,11 @@ is displayed.
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[C]\-\-invert\f[]
|
||||
display all amounts with reversed sign
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[C]\-\-budget\f[]
|
||||
show performance compared to budget goals defined by periodic
|
||||
transactions
|
||||
|
||||
@ -1126,6 +1126,9 @@ Show accounts and their balances. Aliases: b, bal.
|
||||
sort by amount instead of account code/name (in flat mode). With
|
||||
multiple columns, sorts by the row total, or by row average if that
|
||||
is displayed.
|
||||
'--invert'
|
||||
|
||||
display all amounts with reversed sign
|
||||
'--budget'
|
||||
|
||||
show performance compared to budget goals defined by periodic
|
||||
@ -2446,85 +2449,85 @@ Node: add32323
|
||||
Ref: #add32422
|
||||
Node: balance35083
|
||||
Ref: #balance35194
|
||||
Node: Flat mode38642
|
||||
Ref: #flat-mode38767
|
||||
Node: Depth limited balance reports39187
|
||||
Ref: #depth-limited-balance-reports39388
|
||||
Node: Multicolumn balance reports39808
|
||||
Ref: #multicolumn-balance-reports40003
|
||||
Node: Budgets44692
|
||||
Ref: #budgets44839
|
||||
Node: Custom balance output48670
|
||||
Ref: #custom-balance-output48832
|
||||
Node: Colour support50998
|
||||
Ref: #colour-support51130
|
||||
Node: balancesheet51303
|
||||
Ref: #balancesheet51439
|
||||
Node: balancesheetequity53750
|
||||
Ref: #balancesheetequity53899
|
||||
Node: cashflow54436
|
||||
Ref: #cashflow54564
|
||||
Node: check-dates56687
|
||||
Ref: #check-dates56814
|
||||
Node: check-dupes56931
|
||||
Ref: #check-dupes57055
|
||||
Node: close57192
|
||||
Ref: #close57299
|
||||
Node: help57629
|
||||
Ref: #help57729
|
||||
Node: import58803
|
||||
Ref: #import58917
|
||||
Node: incomestatement59647
|
||||
Ref: #incomestatement59781
|
||||
Node: prices62185
|
||||
Ref: #prices62300
|
||||
Node: print62343
|
||||
Ref: #print62453
|
||||
Node: print-unique67347
|
||||
Ref: #print-unique67473
|
||||
Node: register67541
|
||||
Ref: #register67668
|
||||
Node: Custom register output72169
|
||||
Ref: #custom-register-output72298
|
||||
Node: register-match73528
|
||||
Ref: #register-match73662
|
||||
Node: rewrite73845
|
||||
Ref: #rewrite73962
|
||||
Node: stats74031
|
||||
Ref: #stats74134
|
||||
Node: tags75004
|
||||
Ref: #tags75102
|
||||
Node: test75338
|
||||
Ref: #test75422
|
||||
Node: ADD-ON COMMANDS75790
|
||||
Ref: #add-on-commands75900
|
||||
Node: Official add-ons77187
|
||||
Ref: #official-add-ons77327
|
||||
Node: api77414
|
||||
Ref: #api77503
|
||||
Node: ui77555
|
||||
Ref: #ui77654
|
||||
Node: web77712
|
||||
Ref: #web77801
|
||||
Node: Third party add-ons77847
|
||||
Ref: #third-party-add-ons78022
|
||||
Node: diff78157
|
||||
Ref: #diff78254
|
||||
Node: iadd78353
|
||||
Ref: #iadd78467
|
||||
Node: interest78550
|
||||
Ref: #interest78671
|
||||
Node: irr78766
|
||||
Ref: #irr78864
|
||||
Node: Experimental add-ons78942
|
||||
Ref: #experimental-add-ons79094
|
||||
Node: autosync79385
|
||||
Ref: #autosync79497
|
||||
Node: budget79736
|
||||
Ref: #budget79858
|
||||
Node: chart79924
|
||||
Ref: #chart80041
|
||||
Node: check80112
|
||||
Ref: #check80214
|
||||
Node: Flat mode38698
|
||||
Ref: #flat-mode38823
|
||||
Node: Depth limited balance reports39243
|
||||
Ref: #depth-limited-balance-reports39444
|
||||
Node: Multicolumn balance reports39864
|
||||
Ref: #multicolumn-balance-reports40059
|
||||
Node: Budgets44748
|
||||
Ref: #budgets44895
|
||||
Node: Custom balance output48726
|
||||
Ref: #custom-balance-output48888
|
||||
Node: Colour support51054
|
||||
Ref: #colour-support51186
|
||||
Node: balancesheet51359
|
||||
Ref: #balancesheet51495
|
||||
Node: balancesheetequity53806
|
||||
Ref: #balancesheetequity53955
|
||||
Node: cashflow54492
|
||||
Ref: #cashflow54620
|
||||
Node: check-dates56743
|
||||
Ref: #check-dates56870
|
||||
Node: check-dupes56987
|
||||
Ref: #check-dupes57111
|
||||
Node: close57248
|
||||
Ref: #close57355
|
||||
Node: help57685
|
||||
Ref: #help57785
|
||||
Node: import58859
|
||||
Ref: #import58973
|
||||
Node: incomestatement59703
|
||||
Ref: #incomestatement59837
|
||||
Node: prices62241
|
||||
Ref: #prices62356
|
||||
Node: print62399
|
||||
Ref: #print62509
|
||||
Node: print-unique67403
|
||||
Ref: #print-unique67529
|
||||
Node: register67597
|
||||
Ref: #register67724
|
||||
Node: Custom register output72225
|
||||
Ref: #custom-register-output72354
|
||||
Node: register-match73584
|
||||
Ref: #register-match73718
|
||||
Node: rewrite73901
|
||||
Ref: #rewrite74018
|
||||
Node: stats74087
|
||||
Ref: #stats74190
|
||||
Node: tags75060
|
||||
Ref: #tags75158
|
||||
Node: test75394
|
||||
Ref: #test75478
|
||||
Node: ADD-ON COMMANDS75846
|
||||
Ref: #add-on-commands75956
|
||||
Node: Official add-ons77243
|
||||
Ref: #official-add-ons77383
|
||||
Node: api77470
|
||||
Ref: #api77559
|
||||
Node: ui77611
|
||||
Ref: #ui77710
|
||||
Node: web77768
|
||||
Ref: #web77857
|
||||
Node: Third party add-ons77903
|
||||
Ref: #third-party-add-ons78078
|
||||
Node: diff78213
|
||||
Ref: #diff78310
|
||||
Node: iadd78409
|
||||
Ref: #iadd78523
|
||||
Node: interest78606
|
||||
Ref: #interest78727
|
||||
Node: irr78822
|
||||
Ref: #irr78920
|
||||
Node: Experimental add-ons78998
|
||||
Ref: #experimental-add-ons79150
|
||||
Node: autosync79441
|
||||
Ref: #autosync79553
|
||||
Node: budget79792
|
||||
Ref: #budget79914
|
||||
Node: chart79980
|
||||
Ref: #chart80097
|
||||
Node: check80168
|
||||
Ref: #check80270
|
||||
|
||||
End Tag Table
|
||||
|
||||
@ -1018,6 +1018,9 @@ COMMANDS
|
||||
With multiple columns, sorts by the row total, or by row average
|
||||
if that is displayed.
|
||||
|
||||
--invert
|
||||
display all amounts with reversed sign
|
||||
|
||||
--budget
|
||||
show performance compared to budget goals defined by periodic
|
||||
transactions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user