;update manuals

This commit is contained in:
Simon Michael 2020-11-26 08:52:56 -08:00
parent ec3ad14ae5
commit d40d53ae02
12 changed files with 896 additions and 697 deletions

View File

@ -1332,15 +1332,13 @@ market prices to show amount values in another commodity.
See Valuation. See Valuation.
.SS Declaring accounts .SS Declaring accounts
.PP .PP
\f[C]account\f[R] directives can be used to pre-declare accounts. \f[C]account\f[R] directives can be used to declare accounts (ie, the
Though not required, they can provide several benefits: places that amounts are transferred from and to).
Though not required, these declarations can provide several benefits:
.IP \[bu] 2 .IP \[bu] 2
They can document your intended chart of accounts, providing a They can document your intended chart of accounts, providing a
reference. reference.
.IP \[bu] 2 .IP \[bu] 2
They can store extra information about accounts (account numbers, notes,
etc.)
.IP \[bu] 2
They can help hledger know your accounts\[aq] types (asset, liability, They can help hledger know your accounts\[aq] types (asset, liability,
equity, revenue, expense), useful for reports like balancesheet and equity, revenue, expense), useful for reports like balancesheet and
incomestatement. incomestatement.
@ -1348,17 +1346,55 @@ incomestatement.
They control account display order in reports, allowing non-alphabetic They control account display order in reports, allowing non-alphabetic
sorting (eg Revenues to appear above Expenses). sorting (eg Revenues to appear above Expenses).
.IP \[bu] 2 .IP \[bu] 2
They can store extra information about accounts (account numbers, notes,
etc.)
.IP \[bu] 2
They help with account name completion in the add command, hledger-iadd, They help with account name completion in the add command, hledger-iadd,
hledger-web, ledger-mode etc. hledger-web, ledger-mode etc.
.IP \[bu] 2
In strict mode, they restrict which accounts may be posted to by
transactions, which helps detect typos.
.PP .PP
The simplest form is just the word \f[C]account\f[R] followed by a The simplest form is just the word \f[C]account\f[R] followed by a
hledger-style account name, eg: hledger-style account name, eg this account directive declares the
\f[C]assets:bank:checking\f[R] account:
.IP .IP
.nf .nf
\f[C] \f[C]
account assets:bank:checking account assets:bank:checking
\f[R] \f[R]
.fi .fi
.SS Account existence
.PP
By default, accounts come into existence when a transaction references
them.
This is convenient, but when you mis-spell an account name in a
transaction, hledger won\[aq]t be able to detect it.
Usually this isn\[aq]t a big problem, as you\[aq]ll notice the error in
balance reports, or when reconciling account balances.
.PP
When you want more error checking, you can enable strict mode with the
\f[C]-s\f[R]/\f[C]--strict\f[R] flag.
Then hledger will will report an error if any transaction references an
account that has not been declared by an account directive.
Some things to note:
.IP \[bu] 2
The declaration is case-sensitive; transactions must use the correct
account name capitalisation.
.IP \[bu] 2
The account directive\[aq]s scope is \[dq]whole file and below\[dq] (see
directives).
This means it affects all of the current file, and any files it
includes, but not parent or sibling files.
The position of account directives within the file does not matter,
though it\[aq]s usual to put them at the top.
.IP \[bu] 2
Accounts can only be declared in \f[C]journal\f[R] files (but will
affect included files in other formats).
.IP \[bu] 2
It\[aq]s currently not possible to declare \[dq]all possible
subaccounts\[dq] with a wildcard; every account posted to must be
declared.
.SS Account comments .SS Account comments
.PP .PP
Comments, beginning with a semicolon, can be added: Comments, beginning with a semicolon, can be added:

View File

@ -1202,37 +1202,71 @@ File: hledger_journal.info, Node: Declaring accounts, Next: Rewriting accounts
1.13.8 Declaring accounts 1.13.8 Declaring accounts
------------------------- -------------------------
'account' directives can be used to pre-declare accounts. Though not 'account' directives can be used to declare accounts (ie, the places
required, they can provide several benefits: that amounts are transferred from and to). Though not required, these
declarations can provide several benefits:
* They can document your intended chart of accounts, providing a * They can document your intended chart of accounts, providing a
reference. reference.
* They can store extra information about accounts (account numbers,
notes, etc.)
* They can help hledger know your accounts' types (asset, liability, * They can help hledger know your accounts' types (asset, liability,
equity, revenue, expense), useful for reports like balancesheet and equity, revenue, expense), useful for reports like balancesheet and
incomestatement. incomestatement.
* They control account display order in reports, allowing * They control account display order in reports, allowing
non-alphabetic sorting (eg Revenues to appear above Expenses). non-alphabetic sorting (eg Revenues to appear above Expenses).
* They can store extra information about accounts (account numbers,
notes, etc.)
* They help with account name completion in the add command, * They help with account name completion in the add command,
hledger-iadd, hledger-web, ledger-mode etc. hledger-iadd, hledger-web, ledger-mode etc.
* In strict mode, they restrict which accounts may be posted to by
transactions, which helps detect typos.
The simplest form is just the word 'account' followed by a The simplest form is just the word 'account' followed by a
hledger-style account name, eg: hledger-style account name, eg this account directive declares the
'assets:bank:checking' account:
account assets:bank:checking account assets:bank:checking
* Menu: * Menu:
* Account existence::
* Account comments:: * Account comments::
* Account subdirectives:: * Account subdirectives::
* Account types:: * Account types::
* Account display order:: * Account display order::
 
File: hledger_journal.info, Node: Account comments, Next: Account subdirectives, Up: Declaring accounts File: hledger_journal.info, Node: Account existence, Next: Account comments, Up: Declaring accounts
1.13.8.1 Account comments 1.13.8.1 Account existence
..........................
By default, accounts come into existence when a transaction references
them. This is convenient, but when you mis-spell an account name in a
transaction, hledger won't be able to detect it. Usually this isn't a
big problem, as you'll notice the error in balance reports, or when
reconciling account balances.
When you want more error checking, you can enable strict mode with
the '-s'/'--strict' flag. Then hledger will will report an error if any
transaction references an account that has not been declared by an
account directive. Some things to note:
* The declaration is case-sensitive; transactions must use the
correct account name capitalisation.
* The account directive's scope is "whole file and below" (see
directives). This means it affects all of the current file, and
any files it includes, but not parent or sibling files. The
position of account directives within the file does not matter,
though it's usual to put them at the top.
* Accounts can only be declared in 'journal' files (but will affect
included files in other formats).
* It's currently not possible to declare "all possible subaccounts"
with a wildcard; every account posted to must be declared.

File: hledger_journal.info, Node: Account comments, Next: Account subdirectives, Prev: Account existence, Up: Declaring accounts
1.13.8.2 Account comments
......................... .........................
Comments, beginning with a semicolon, can be added: Comments, beginning with a semicolon, can be added:
@ -1252,7 +1286,7 @@ account assets:bank:checking ; same-line comment, note 2+ spaces before ;
 
File: hledger_journal.info, Node: Account subdirectives, Next: Account types, Prev: Account comments, Up: Declaring accounts File: hledger_journal.info, Node: Account subdirectives, Next: Account types, Prev: Account comments, Up: Declaring accounts
1.13.8.2 Account subdirectives 1.13.8.3 Account subdirectives
.............................. ..............................
We also allow (and ignore) Ledger-style indented subdirectives, just for We also allow (and ignore) Ledger-style indented subdirectives, just for
@ -1270,7 +1304,7 @@ account ACCTNAME [ACCTTYPE] [;COMMENT]
 
File: hledger_journal.info, Node: Account types, Next: Account display order, Prev: Account subdirectives, Up: Declaring accounts File: hledger_journal.info, Node: Account types, Next: Account display order, Prev: Account subdirectives, Up: Declaring accounts
1.13.8.3 Account types 1.13.8.4 Account types
...................... ......................
hledger recognises five main types of account, corresponding to the hledger recognises five main types of account, corresponding to the
@ -1349,7 +1383,7 @@ account expenses X
 
File: hledger_journal.info, Node: Account display order, Prev: Account types, Up: Declaring accounts File: hledger_journal.info, Node: Account display order, Prev: Account types, Up: Declaring accounts
1.13.8.4 Account display order 1.13.8.5 Account display order
.............................. ..............................
Account directives also set the order in which accounts are displayed, Account directives also set the order in which accounts are displayed,
@ -1962,48 +1996,50 @@ Node: Declaring market prices43555
Ref: #declaring-market-prices43750 Ref: #declaring-market-prices43750
Node: Declaring accounts44607 Node: Declaring accounts44607
Ref: #declaring-accounts44793 Ref: #declaring-accounts44793
Node: Account comments45718 Node: Account existence45990
Ref: #account-comments45881 Ref: #account-existence46151
Node: Account subdirectives46305 Node: Account comments47387
Ref: #account-subdirectives46500 Ref: #account-comments47576
Node: Account types46813 Node: Account subdirectives48000
Ref: #account-types46997 Ref: #account-subdirectives48195
Node: Account display order50043 Node: Account types48508
Ref: #account-display-order50213 Ref: #account-types48692
Node: Rewriting accounts51364 Node: Account display order51738
Ref: #rewriting-accounts51549 Ref: #account-display-order51908
Node: Basic aliases52306 Node: Rewriting accounts53059
Ref: #basic-aliases52452 Ref: #rewriting-accounts53244
Node: Regex aliases53156 Node: Basic aliases54001
Ref: #regex-aliases53328 Ref: #basic-aliases54147
Node: Combining aliases54047 Node: Regex aliases54851
Ref: #combining-aliases54240 Ref: #regex-aliases55023
Node: Aliases and multiple files55516 Node: Combining aliases55742
Ref: #aliases-and-multiple-files55725 Ref: #combining-aliases55935
Node: end aliases56304 Node: Aliases and multiple files57211
Ref: #end-aliases56461 Ref: #aliases-and-multiple-files57420
Node: Default parent account56562 Node: end aliases57999
Ref: #default-parent-account56730 Ref: #end-aliases58156
Node: Periodic transactions57614 Node: Default parent account58257
Ref: #periodic-transactions57789 Ref: #default-parent-account58425
Node: Periodic rule syntax59661 Node: Periodic transactions59309
Ref: #periodic-rule-syntax59867 Ref: #periodic-transactions59484
Node: Two spaces between period expression and description!60571 Node: Periodic rule syntax61356
Ref: #two-spaces-between-period-expression-and-description60890 Ref: #periodic-rule-syntax61562
Node: Forecasting with periodic transactions61574 Node: Two spaces between period expression and description!62266
Ref: #forecasting-with-periodic-transactions61879 Ref: #two-spaces-between-period-expression-and-description62585
Node: Budgeting with periodic transactions63934 Node: Forecasting with periodic transactions63269
Ref: #budgeting-with-periodic-transactions64173 Ref: #forecasting-with-periodic-transactions63574
Node: Auto postings64582 Node: Budgeting with periodic transactions65629
Ref: #auto-postings64722 Ref: #budgeting-with-periodic-transactions65868
Node: Auto postings and multiple files66901 Node: Auto postings66277
Ref: #auto-postings-and-multiple-files67105 Ref: #auto-postings66417
Node: Auto postings and dates67314 Node: Auto postings and multiple files68596
Ref: #auto-postings-and-dates67588 Ref: #auto-postings-and-multiple-files68800
Node: Auto postings and transaction balancing / inferred amounts / balance assertions67763 Node: Auto postings and dates69009
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions68114 Ref: #auto-postings-and-dates69283
Node: Auto posting tags68456 Node: Auto postings and transaction balancing / inferred amounts / balance assertions69458
Ref: #auto-posting-tags68671 Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions69809
Node: Auto posting tags70151
Ref: #auto-posting-tags70366
 
End Tag Table End Tag Table

View File

@ -941,15 +941,13 @@ FILE FORMAT
values in another commodity. See Valuation. values in another commodity. See Valuation.
Declaring accounts Declaring accounts
account directives can be used to pre-declare accounts. Though not re- account directives can be used to declare accounts (ie, the places that
quired, they can provide several benefits: amounts are transferred from and to). Though not required, these dec-
larations can provide several benefits:
o They can document your intended chart of accounts, providing a refer- o They can document your intended chart of accounts, providing a refer-
ence. ence.
o They can store extra information about accounts (account numbers,
notes, etc.)
o They can help hledger know your accounts' types (asset, liability, o They can help hledger know your accounts' types (asset, liability,
equity, revenue, expense), useful for reports like balancesheet and equity, revenue, expense), useful for reports like balancesheet and
incomestatement. incomestatement.
@ -957,18 +955,52 @@ FILE FORMAT
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). betic sorting (eg Revenues to appear above Expenses).
o They help with account name completion in the add command, hledger- o They can store extra information about accounts (account numbers,
notes, etc.)
o They help with account name completion in the add command, hledger-
iadd, hledger-web, ledger-mode etc. iadd, hledger-web, ledger-mode etc.
o In strict mode, they restrict which accounts may be posted to by
transactions, which helps detect typos.
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 name, eg this account directive declares the assets:bank:check-
ing account:
account assets:bank:checking account assets:bank:checking
Account existence
By default, accounts come into existence when a transaction references
them. This is convenient, but when you mis-spell an account name in a
transaction, hledger won't be able to detect it. Usually this isn't a
big problem, as you'll notice the error in balance reports, or when
reconciling account balances.
When you want more error checking, you can enable strict mode with the
-s/--strict flag. Then hledger will will report an error if any trans-
action references an account that has not been declared by an account
directive. Some things to note:
o The declaration is case-sensitive; transactions must use the correct
account name capitalisation.
o The account directive's scope is "whole file and below" (see direc-
tives). This means it affects all of the current file, and any files
it includes, but not parent or sibling files. The position of ac-
count directives within the file does not matter, though it's usual
to put them at the top.
o Accounts can only be declared in journal files (but will affect in-
cluded files in other formats).
o It's currently not possible to declare "all possible subaccounts"
with a wildcard; every account posted to must be declared.
Account comments Account comments
Comments, beginning with a semicolon, can be added: 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) account names)
o on the next lines, indented o on the next lines, indented
@ -982,7 +1014,7 @@ FILE FORMAT
Same-line comments are not supported by Ledger, or hledger <1.13. Same-line comments are not supported by Ledger, or hledger <1.13.
Account subdirectives Account subdirectives
We also allow (and ignore) Ledger-style indented subdirectives, just We also allow (and ignore) Ledger-style indented subdirectives, just
for compatibility.: for compatibility.:
account assets:bank:checking account assets:bank:checking
@ -1001,21 +1033,21 @@ FILE FORMAT
Asset, Liability, Equity, Revenue, Expense. Asset, Liability, Equity, Revenue, Expense.
These account types are important for controlling which accounts appear These account types are important for controlling which accounts appear
in the balancesheet, balancesheetequity, incomestatement reports (and in the balancesheet, balancesheetequity, incomestatement reports (and
probably for other things in future). probably for other things in future).
Additionally, we recognise the Cash type, which is also an Asset, and Additionally, we recognise the Cash type, which is also an Asset, and
which causes accounts to appear in the cashflow report. ("Cash" here which causes accounts to appear in the cashflow report. ("Cash" here
means liquid assets, eg bank balances but typically not investments or means liquid assets, eg bank balances but typically not investments or
receivables.) receivables.)
Declaring account types Declaring account types
Generally, to make these reports work you should declare your top-level Generally, to make these reports work you should declare your top-level
accounts and their types, using account directives with type: tags. accounts and their types, using account directives with type: tags.
The tag's value should be one of: Asset, Liability, Equity, Revenue, The tag's value should be one of: Asset, Liability, Equity, Revenue,
Expense, Cash, A, L, E, R, X, C (all case insensitive). The type is Expense, Cash, A, L, E, R, X, C (all case insensitive). The type is
inherited by all subaccounts except where they override it. Here's a inherited by all subaccounts except where they override it. Here's a
complete example: complete example:
account assets ; type: Asset account assets ; type: Asset
@ -1027,8 +1059,8 @@ FILE FORMAT
account expenses ; type: Expense account expenses ; type: Expense
Auto-detected account types Auto-detected account types
If you happen to use common english top-level account names, you may If you happen to use common english top-level account names, you may
not need to declare account types, as they will be detected automati- not need to declare account types, as they will be detected automati-
cally using the following rules: cally using the following rules:
If name matches regular account type is: If name matches regular account type is:
@ -1041,7 +1073,7 @@ FILE FORMAT
^(income|revenue)s?(:|$) Revenue ^(income|revenue)s?(:|$) Revenue
^expenses?(:|$) Expense ^expenses?(:|$) Expense
If account type is Asset and name does not contain regu- account type If account type is Asset and name does not contain regu- account type
lar expression: is: lar expression: is:
-------------------------------------------------------------------------- --------------------------------------------------------------------------
(investment|receivable|:A/R|:fixed) Cash (investment|receivable|:A/R|:fixed) Cash
@ -1051,9 +1083,9 @@ FILE FORMAT
Interference from auto-detected account types Interference from auto-detected account types
If you assign any account type, it's a good idea to assign all of them, If you assign any account type, it's a good idea to assign all of them,
to prevent any confusion from mixing declared and auto-detected types. to prevent any confusion from mixing declared and auto-detected types.
Although it's unlikely to happen in real life, here's an example: with Although it's unlikely to happen in real life, here's an example: with
the following journal, balancesheetequity shows "liabilities" in both the following journal, balancesheetequity shows "liabilities" in both
Liabilities and Equity sections. Declaring another account as type:Li- Liabilities and Equity sections. Declaring another account as type:Li-
ability would fix it: ability would fix it:
@ -1065,8 +1097,8 @@ FILE FORMAT
equity -2 equity -2
Old account type syntax Old account type syntax
In some hledger journals you might instead see this old syntax (the In some hledger journals you might instead see this old syntax (the
letters ALERX, separated from the account name by two or more spaces); letters ALERX, separated from the account name by two or more spaces);
this is deprecated and may be removed soon: this is deprecated and may be removed soon:
account assets A account assets A
@ -1076,8 +1108,8 @@ FILE FORMAT
account expenses X account expenses X
Account display order Account display order
Account directives also set the order in which accounts are displayed, Account directives also set the order in which accounts are displayed,
eg in reports, the hledger-ui accounts screen, and the hledger-web eg in reports, the hledger-ui accounts screen, and the hledger-web
sidebar. By default accounts are listed in alphabetical order. But if sidebar. By default accounts are listed in alphabetical order. But if
you have these account directives in the journal: you have these account directives in the journal:
@ -1099,20 +1131,20 @@ FILE FORMAT
Undeclared accounts, if any, are displayed last, in alphabetical order. Undeclared accounts, if any, are displayed last, in alphabetical order.
Note that sorting is done at each level of the account tree (within Note that sorting is done at each level of the account tree (within
each group of sibling accounts under the same parent). And currently, each group of sibling accounts under the same parent). And currently,
this directive: this directive:
account other:zoo 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: 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- that you don't intend to post to, just to customize their display or-
der 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). a:b and a:c).
Rewriting accounts Rewriting accounts
@ -1130,14 +1162,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 hledger- do not affect account names being entered via hledger add or hledger-
web. web.
See also Rewrite account names. See also 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
@ -1145,49 +1177,49 @@ 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 re- 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- place any occurrence of the old account name with the new one. Subac-
counts are also affected. Eg: counts 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.
Combining aliases 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. and/or command line options.
Recursive aliases - where an account name is rewritten by one alias, Recursive aliases - where an account name is rewritten by one alias,
then by another alias, and so on - are allowed. Each alias sees the then by another alias, and so on - are allowed. Each alias sees the
effect of previously applied aliases. effect of previously applied aliases.
In such cases it can be important to understand which aliases will be 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 applied and in which order. For (each account name in) each journal
entry, we apply: 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) 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). (left to right).
In other words, for (an account name in) a given journal entry: In other words, for (an account name in) a given journal entry:
@ -1198,20 +1230,20 @@ FILE FORMAT
o aliases defined after/below the entry do not affect it. o aliases defined after/below the entry do not affect it.
This gives nearby aliases precedence over distant ones, and helps pro- This gives nearby aliases precedence over distant ones, and helps pro-
vide semantic stability - aliases will keep working the same way inde- vide semantic stability - aliases will keep working the same way inde-
pendent of which files are being read and in which order. 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. which aliases are being applied when.
Aliases and multiple files 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, affect parent or sibling files. Eg in this command,
hledger -f a.aliases -f b.journal 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: cluding the aliases doesn't work either:
include a.aliases include a.aliases
@ -1233,14 +1265,14 @@ FILE FORMAT
include c.journal ; also affected include c.journal ; also affected
end aliases 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: aliases directive:
end aliases end aliases
Default parent account Default parent account
You can specify a parent account which will be prepended to all ac- 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 counts within a section of the journal. Use the apply account and end
apply account directives like so: apply account directives like so:
apply account home apply account home
@ -1257,7 +1289,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
@ -1266,50 +1298,50 @@ 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 al- Periodic transaction rules describe transactions that recur. They al-
low hledger to generate temporary future transactions to help with low hledger to generate temporary future transactions to help with
forecasting, so you don't have to write out each one in the journal, 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 and it's easy to try out different forecasts. Secondly, they are also
used to define the budgets shown in budget reports. 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: 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. read about this below.
2. For troubleshooting, show the generated transactions with hledger 2. For troubleshooting, show the generated transactions with hledger
print --forecast tag:generated or hledger register --forecast print --forecast tag:generated or hledger register --forecast
tag:generated. 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. 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. 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. provement, but is worth studying.
6. Some period expressions with a repeating interval must begin on a 6. Some period expressions with a repeating interval must begin on a
natural boundary of that interval. Eg in weekly from DATE, DATE 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 must be a monday. ~ weekly from 2019/10/1 (a tuesday) will give an
error. error.
7. Other period expressions with an interval are automatically expanded 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 reports, but it also affects periodic transactions. Yes, it's a bit
inconsistent with the above.) Eg: ~ 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, which is equivalent to ~ every 10th day of month from
2020/01/01, will be adjusted to start on 2019/12/10. 2020/01/01, will be adjusted to start on 2019/12/10.
Periodic rule syntax Periodic rule syntax
@ -1321,17 +1353,17 @@ FILE FORMAT
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 monthly from 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. 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 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 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 date, unless a Y default year directive is in effect, in which case
they will be relative to Y/1/1. they will be relative to Y/1/1.
Two spaces between period expression and description! 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 these must be separated by two or more spaces. This helps hledger know
where the period expression ends, so that descriptions can not acciden- where the period expression ends, so that descriptions can not acciden-
tally alter their meaning, as in this example: tally alter their meaning, as in this example:
@ -1345,67 +1377,67 @@ FILE FORMAT
So, 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. 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. pression.
Forecasting with periodic transactions Forecasting with periodic transactions
The --forecast flag activates any periodic transaction rules in the The --forecast flag activates any periodic transaction rules in the
journal. They will generate temporary recurring transactions, which journal. They will generate temporary recurring transactions, which
are not saved in the journal, but will appear in all reports (eg 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 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 entry aid: describe recurring transactions, and every so often copy the
output of print --forecast into the journal. 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- rule generated them: generated-transaction:~ PERIODICEXPR. And a simi-
lar, hidden tag (beginning with an underscore) which, because it's lar, hidden tag (beginning with an underscore) which, because it's
never displayed by print, can be used to match transactions generated never displayed by print, can be used to match transactions generated
"just now": _generated-transaction:~ PERIODICEXPR. "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 default, this
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 6 o ends on the report end date if specified with -e/-p/date:, or 6
months (180 days) from today. months (180 days) from today.
This means that periodic transactions will begin only after the latest This means that periodic transactions will begin only after the latest
recorded transaction. And a recorded transaction dated in the future recorded transaction. And a recorded transaction dated in the future
can prevent generation of periodic transactions. (You can avoid that can prevent generation of periodic transactions. (You can avoid that
by writing the future transaction as a one-time periodic rule instead - by writing the future transaction as a one-time periodic rule instead -
put tilde before the date, eg ~ YYYY-MM-DD ...). put tilde before the date, eg ~ YYYY-MM-DD ...).
Or, you can set your own arbitrary "forecast period", which can overlap Or, you can set your own arbitrary "forecast period", which can overlap
recorded transactions, and need not be in the future, by providing an recorded transactions, and need not be in the future, by providing an
option argument, like --forecast=PERIODEXPR. Note the equals sign is option argument, like --forecast=PERIODEXPR. Note the equals sign is
required, a space won't work. PERIODEXPR is a period expression, which 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. can specify the start date, end date, or both, like in a date: query.
(See also hledger.1 -> Report start & end date). Some examples: (See also hledger.1 -> Report start & end date). Some examples:
--forecast=202001-202004, --forecast=jan-, --forecast=2020. --forecast=202001-202004, --forecast=jan-, --forecast=2020.
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.
See also: Budgeting and Forecasting. See also: Budgeting and Forecasting.
Auto postings Auto postings
"Automated postings" or "auto postings" are extra postings which get "Automated postings" or "auto postings" are extra postings which get
added automatically to transactions which match certain queries, de- added automatically to transactions which match certain queries, de-
fined by "auto posting rules", when you use the --auto flag. fined by "auto posting rules", when you use the --auto flag.
An auto posting rule looks a bit like a transaction: An auto posting rule looks a bit like a transaction:
@ -1415,27 +1447,27 @@ FILE FORMAT
... ...
ACCOUNT [AMOUNT] ACCOUNT [AMOUNT]
except the first line is an equals sign (mnemonic: = suggests match- except the first line is an equals sign (mnemonic: = suggests match-
ing), followed by a query (which matches existing postings), and each ing), followed by a query (which matches existing postings), and each
"posting" line describes a posting to be generated, and the posting "posting" line describes a posting to be generated, and the posting
amounts can be: 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. as-is.
o a number, eg 2. The commodity symbol (if any) from the matched post- o a number, eg 2. The commodity symbol (if any) from the matched post-
ing will be added to this. 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 matched posting's amount (and total price, if any) will be multiplied
by N. 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 symbol S). The matched posting's amount will be multiplied by N, and
its commodity symbol will be replaced with S. its commodity symbol will be replaced with S.
Any query term containing spaces must be enclosed in single or double 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 quotes, as on the command line. Eg, note the quotes around the second
query term below: query term below:
= expenses:groceries 'expenses:dining out' = expenses:groceries 'expenses:dining out'
@ -1474,24 +1506,24 @@ FILE FORMAT
Auto postings and multiple files Auto postings and multiple files
An auto posting rule can affect any transaction in the current file, or 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). sibling files (when multiple -f/--file are used - see #1212).
Auto postings and dates Auto postings and dates
A posting date (or secondary date) in the matched posting, or (taking A posting date (or secondary date) in the matched posting, or (taking
precedence) a posting date in the auto posting rule itself, will also precedence) a posting date in the auto posting rule itself, will also
be used in the generated posting. be used in the generated posting.
Auto postings and transaction balancing / inferred amounts / balance asser- Auto postings and transaction balancing / inferred amounts / balance asser-
tions tions
Currently, auto postings are added: 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, balancedness,
o but before balance assertions are checked. 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 after auto postings are added. This changed in hledger 1.12+; see #893
for background. for background.
@ -1501,11 +1533,11 @@ FILE FORMAT
o generated-posting:= QUERY - shows this was generated by an auto post- o generated-posting:= QUERY - shows this was generated by an auto post-
ing rule, and the query 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 hledger's output. This can be used to match postings generated "just
now", rather than generated in the past and saved to the journal. 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: have these tags added:
o modified: - this transaction was modified o modified: - this transaction was modified
@ -1516,7 +1548,7 @@ FILE FORMAT
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)
@ -1530,7 +1562,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)

View File

@ -88,6 +88,9 @@ use some other field or tag for the account name
\f[B]\f[CB]-I --ignore-assertions\f[B]\f[R] \f[B]\f[CB]-I --ignore-assertions\f[B]\f[R]
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
.TP
\f[B]\f[CB]-s --strict\f[B]\f[R]
do extra error checking (check that all posted accounts are declared)
.PP .PP
hledger reporting options: hledger reporting options:
.TP .TP

View File

@ -99,6 +99,10 @@ the data.
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
'-s --strict'
do extra error checking (check that all posted accounts are
declared)
hledger reporting options: hledger reporting options:
@ -517,24 +521,24 @@ Tag Table:
Node: Top71 Node: Top71
Node: OPTIONS1476 Node: OPTIONS1476
Ref: #options1573 Ref: #options1573
Node: keys5545 Node: keys5640
Ref: #keys5640 Ref: #keys5735
Node: screens9972 Node: screens10067
Ref: #screens10077 Ref: #screens10172
Node: accounts screen10167 Node: accounts screen10262
Ref: #accounts-screen10295 Ref: #accounts-screen10390
Node: Register screen12510 Node: Register screen12605
Ref: #register-screen12665 Ref: #register-screen12760
Node: Transaction screen14662 Node: Transaction screen14757
Ref: #transaction-screen14820 Ref: #transaction-screen14915
Node: Error screen15690 Node: Error screen15785
Ref: #error-screen15812 Ref: #error-screen15907
Node: ENVIRONMENT16056 Node: ENVIRONMENT16151
Ref: #environment16170 Ref: #environment16265
Node: FILES16977 Node: FILES17072
Ref: #files17076 Ref: #files17171
Node: BUGS17289 Node: BUGS17384
Ref: #bugs17366 Ref: #bugs17461
 
End Tag Table End Tag Table

View File

@ -84,6 +84,10 @@ OPTIONS
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
-s --strict
do extra error checking (check that all posted accounts are de-
clared)
hledger reporting options: hledger reporting options:
-b --begin=DATE -b --begin=DATE
@ -108,7 +112,7 @@ OPTIONS
multiperiod/multicolumn report by year multiperiod/multicolumn report by year
-p --period=PERIODEXP -p --period=PERIODEXP
set start date, end date, and/or reporting interval all at once set start date, end date, and/or reporting interval all at once
using period expressions syntax using period expressions syntax
--date2 --date2
@ -131,21 +135,21 @@ OPTIONS
hide/aggregate accounts or postings more than NUM levels deep hide/aggregate accounts or postings more than NUM levels deep
-E --empty -E --empty
show items with zero amount, normally hidden (and vice-versa in show items with zero amount, normally hidden (and vice-versa in
hledger-ui/hledger-web) hledger-ui/hledger-web)
-B --cost -B --cost
convert amounts to their cost/selling amount at transaction time convert amounts to their cost/selling amount at transaction time
-V --market -V --market
convert amounts to their market value in default valuation com- convert amounts to their market value in default valuation com-
modities modities
-X --exchange=COMM -X --exchange=COMM
convert amounts to their market value in commodity COMM convert amounts to their market value in commodity COMM
--value --value
convert amounts to cost or market value, more flexibly than convert amounts to cost or market value, more flexibly than
-B/-V/-X -B/-V/-X
--infer-value --infer-value
@ -154,15 +158,15 @@ OPTIONS
--auto apply automated posting rules to modify transactions. --auto apply automated posting rules to modify transactions.
--forecast --forecast
generate future transactions from periodic transaction rules, generate future transactions from periodic transaction rules,
for the next 6 months or till report end date. In hledger-ui, for the next 6 months or till report end date. In hledger-ui,
also make ordinary future transactions visible. also make ordinary future transactions visible.
--color=WHEN (or --colour=WHEN) --color=WHEN (or --colour=WHEN)
Should color-supporting commands use ANSI color codes in text Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color- output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this. NO_COLOR environment variable overrides this.
When a reporting option appears more than once in the command line, the When a reporting option appears more than once in the command line, the
@ -182,91 +186,91 @@ OPTIONS
show debug output (levels 1-9, default: 1) show debug output (levels 1-9, default: 1)
a @file argument will be expanded to the contents of file, which should a @file argument will be expanded to the contents of file, which should
contain one command line option/argument per line. (to prevent this, contain one command line option/argument per line. (to prevent this,
insert a -- argument before.) insert a -- argument before.)
keys keys
? shows a help dialog listing all keys. (some of these also appear in ? shows a help dialog listing all keys. (some of these also appear in
the quick help at the bottom of each screen.) press ? again (or escape, the quick help at the bottom of each screen.) press ? again (or escape,
or left, or q) to close it. the following keys work on most screens: or left, or q) to close it. the following keys work on most screens:
the cursor keys navigate: right (or enter) goes deeper, left returns to the cursor keys navigate: right (or enter) goes deeper, left returns to
the previous screen, up/down/page up/page down/home/end move up and the previous screen, up/down/page up/page down/home/end move up and
down through lists. Emacs-style (ctrl-p/ctrl-n/ctrl-f/ctrl-b) movement down through lists. Emacs-style (ctrl-p/ctrl-n/ctrl-f/ctrl-b) movement
keys are also supported (but not vi-style keys, since hledger-1.19, keys are also supported (but not vi-style keys, since hledger-1.19,
sorry!). A tip: movement speed is limited by your keyboard repeat sorry!). A tip: movement speed is limited by your keyboard repeat
rate, to move faster you may want to adjust it. (If you're on a mac, rate, to move faster you may want to adjust it. (If you're on a mac,
the karabiner app is one way to do that.) the karabiner app is one way to do that.)
with shift pressed, the cursor keys adjust the report period, limiting with shift pressed, the cursor keys adjust the report period, limiting
the transactions to be shown (by default, all are shown). shift- the transactions to be shown (by default, all are shown). shift-
down/up steps downward and upward through these standard report period down/up steps downward and upward through these standard report period
durations: year, quarter, month, week, day. then, shift-left/right durations: year, quarter, month, week, day. then, shift-left/right
moves to the previous/next period. T sets the report period to today. moves to the previous/next period. T sets the report period to today.
with the --watch option, when viewing a "current" period (the current with the --watch option, when viewing a "current" period (the current
day, week, month, quarter, or year), the period will move automatically day, week, month, quarter, or year), the period will move automatically
to track the current date. to set a non-standard period, you can use / to track the current date. to set a non-standard period, you can use /
and a date: query. and a date: query.
/ lets you set a general filter query limiting the data shown, using / lets you set a general filter query limiting the data shown, using
the same query terms as in hledger and hledger-web. while editing the the same query terms as in hledger and hledger-web. while editing the
query, you can use ctrl-a/e/d/k, bs, cursor keys; press enter to set query, you can use ctrl-a/e/d/k, bs, cursor keys; press enter to set
it, or escapeto cancel. there are also keys for quickly adjusting some it, or escapeto cancel. there are also keys for quickly adjusting some
common filters like account depth and transaction status (see below). common filters like account depth and transaction status (see below).
backspace or delete removes all filters, showing all transactions. backspace or delete removes all filters, showing all transactions.
as mentioned above, by default hledger-ui hides future transactions - as mentioned above, by default hledger-ui hides future transactions -
both ordinary transactions recorded in the journal, and periodic trans- both ordinary transactions recorded in the journal, and periodic trans-
actions generated by rule. f toggles forecast mode, in which fu- actions generated by rule. f toggles forecast mode, in which fu-
ture/forecasted transactions are shown. (experimental) ture/forecasted transactions are shown. (experimental)
escape resets the UI state and jumps back to the top screen, restoring escape resets the UI state and jumps back to the top screen, restoring
the app's initial state at startup. Or, it cancels minibuffer data en- the app's initial state at startup. Or, it cancels minibuffer data en-
try or the help dialog. try or the help dialog.
ctrl-l redraws the screen and centers the selection if possible (selec- ctrl-l redraws the screen and centers the selection if possible (selec-
tions near the top won't be centered, since we don't scroll above the tions near the top won't be centered, since we don't scroll above the
top). top).
g reloads from the data file(s) and updates the current screen and any g reloads from the data file(s) and updates the current screen and any
previous screens. (with large files, this could cause a noticeable previous screens. (with large files, this could cause a noticeable
pause.) pause.)
i toggles balance assertion checking. disabling balance assertions i toggles balance assertion checking. disabling balance assertions
temporarily can be useful for troubleshooting. temporarily can be useful for troubleshooting.
a runs command-line hledger's add command, and reloads the updated a runs command-line hledger's add command, and reloads the updated
file. this allows some basic data entry. file. this allows some basic data entry.
a is like a, but runs the hledger-iadd tool, which provides a terminal a is like a, but runs the hledger-iadd tool, which provides a terminal
interface. this key will be available if hledger-iadd is installed in interface. this key will be available if hledger-iadd is installed in
$path. $path.
e runs $hledger_ui_editor, or $editor, or a default (emacsclient -a "" e runs $hledger_ui_editor, or $editor, or a default (emacsclient -a ""
-nw) on the journal file. with some editors (emacs, vi), the cursor -nw) on the journal file. with some editors (emacs, vi), the cursor
will be positioned at the current transaction when invoked from the will be positioned at the current transaction when invoked from the
register and transaction screens, and at the error location (if possi- register and transaction screens, and at the error location (if possi-
ble) when invoked from the error screen. ble) when invoked from the error screen.
b toggles cost mode, showing amounts in their transaction price's com- b toggles cost mode, showing amounts in their transaction price's com-
modity (like toggling the -b/--cost flag). modity (like toggling the -b/--cost flag).
v toggles value mode, showing amounts' current market value in their v toggles value mode, showing amounts' current market value in their
default valuation commodity (like toggling the -v/--market flag). default valuation commodity (like toggling the -v/--market flag).
note, "current market value" means the value on the report end date if note, "current market value" means the value on the report end date if
specified, otherwise today. to see the value on another date, you can specified, otherwise today. to see the value on another date, you can
temporarily set that as the report end date. eg: to see a transaction temporarily set that as the report end date. eg: to see a transaction
as it was valued on july 30, go to the accounts or register screen, as it was valued on july 30, go to the accounts or register screen,
press /, and add date:-7/30 to the query. press /, and add date:-7/30 to the query.
at most one of cost or value mode can be active at once. at most one of cost or value mode can be active at once.
there's not yet any visual reminder when cost or value mode is active; there's not yet any visual reminder when cost or value mode is active;
for now pressing b b v should reliably reset to normal mode. for now pressing b b v should reliably reset to normal mode.
with --watch active, if you save an edit to the journal file while with --watch active, if you save an edit to the journal file while
viewing the transaction screen in cost or value mode, the b/v keys will viewing the transaction screen in cost or value mode, the b/v keys will
stop working. to work around, press g to force a manual reload, or stop working. to work around, press g to force a manual reload, or
exit the transaction screen. exit the transaction screen.
q quits the application. q quits the application.
@ -275,43 +279,43 @@ keys
screens screens
accounts screen accounts screen
this is normally the first screen displayed. it lists accounts and this is normally the first screen displayed. it lists accounts and
their balances, like hledger's balance command. by default, it shows their balances, like hledger's balance command. by default, it shows
all accounts and their latest ending balances (including the balances all accounts and their latest ending balances (including the balances
of subaccounts). if you specify a query on the command line, it shows of subaccounts). if you specify a query on the command line, it shows
just the matched accounts and the balances from matched transactions. just the matched accounts and the balances from matched transactions.
Account names are shown as a flat list by default; press t to toggle Account names are shown as a flat list by default; press t to toggle
tree mode. In list mode, account balances are exclusive of subac- tree mode. In list mode, account balances are exclusive of subac-
counts, except where subaccounts are hidden by a depth limit (see be- counts, except where subaccounts are hidden by a depth limit (see be-
low). In tree mode, all account balances are inclusive of subaccounts. low). In tree mode, all account balances are inclusive of subaccounts.
To see less detail, press a number key, 1 to 9, to set a depth limit. To see less detail, press a number key, 1 to 9, to set a depth limit.
Or use - to decrease and +/= to increase the depth limit. 0 shows even Or use - to decrease and +/= to increase the depth limit. 0 shows even
less detail, collapsing all accounts to a single total. To remove the less detail, collapsing all accounts to a single total. To remove the
depth limit, set it higher than the maximum account depth, or press ES- depth limit, set it higher than the maximum account depth, or press ES-
CAPE. CAPE.
H toggles between showing historical balances or period balances. His- H toggles between showing historical balances or period balances. His-
torical balances (the default) are ending balances at the end of the torical balances (the default) are ending balances at the end of the
report period, taking into account all transactions before that date report period, taking into account all transactions before that date
(filtered by the filter query if any), including transactions before (filtered by the filter query if any), including transactions before
the start of the report period. In other words, historical balances the start of the report period. In other words, historical balances
are what you would see on a bank statement for that account (unless are what you would see on a bank statement for that account (unless
disturbed by a filter query). Period balances ignore transactions be- disturbed by a filter query). Period balances ignore transactions be-
fore the report start date, so they show the change in balance during fore the report start date, so they show the change in balance during
the report period. They are more useful eg when viewing a time log. the report period. They are more useful eg when viewing a time log.
U toggles filtering by unmarked status, including or excluding unmarked U toggles filtering by unmarked status, including or excluding unmarked
postings in the balances. Similarly, P toggles pending postings, and C postings in the balances. Similarly, P toggles pending postings, and C
toggles cleared postings. (By default, balances include all postings; toggles cleared postings. (By default, balances include all postings;
if you activate one or two status filters, only those postings are in- if you activate one or two status filters, only those postings are in-
cluded; and if you activate all three, the filter is removed.) cluded; and if you activate all three, the filter is removed.)
R toggles real mode, in which virtual postings are ignored. R toggles real mode, in which virtual postings are ignored.
Z toggles nonzero mode, in which only accounts with nonzero balances Z toggles nonzero mode, in which only accounts with nonzero balances
are shown (hledger-ui shows zero items by default, unlike command-line are shown (hledger-ui shows zero items by default, unlike command-line
hledger). hledger).
Press right or enter to view an account's transactions register. Press right or enter to view an account's transactions register.
@ -320,63 +324,63 @@ screens
This screen shows the transactions affecting a particular account, like This screen shows the transactions affecting a particular account, like
a check register. Each line represents one transaction and shows: a check register. Each line represents one transaction and shows:
o the other account(s) involved, in abbreviated form. (If there are o the other account(s) involved, in abbreviated form. (If there are
both real and virtual postings, it shows only the accounts affected both real and virtual postings, it shows only the accounts affected
by real postings.) by real postings.)
o the overall change to the current account's balance; positive for an o the overall change to the current account's balance; positive for an
inflow to this account, negative for an outflow. inflow to this account, negative for an outflow.
o the running historical total or period total for the current account, o the running historical total or period total for the current account,
after the transaction. This can be toggled with H. Similar to the after the transaction. This can be toggled with H. Similar to the
accounts screen, the historical total is affected by transactions accounts screen, the historical total is affected by transactions
(filtered by the filter query) before the report start date, while (filtered by the filter query) before the report start date, while
the period total is not. If the historical total is not disturbed by the period total is not. If the historical total is not disturbed by
a filter query, it will be the running historical balance you would a filter query, it will be the running historical balance you would
see on a bank register for the current account. see on a bank register for the current account.
Transactions affecting this account's subaccounts will be included in Transactions affecting this account's subaccounts will be included in
the register if the accounts screen is in tree mode, or if it's in list the register if the accounts screen is in tree mode, or if it's in list
mode but this account has subaccounts which are not shown due to a mode but this account has subaccounts which are not shown due to a
depth limit. In other words, the register always shows the transac- depth limit. In other words, the register always shows the transac-
tions contributing to the balance shown on the accounts screen. Tree tions contributing to the balance shown on the accounts screen. Tree
mode/list mode can be toggled with t here also. mode/list mode can be toggled with t here also.
U toggles filtering by unmarked status, showing or hiding unmarked U toggles filtering by unmarked status, showing or hiding unmarked
transactions. Similarly, P toggles pending transactions, and C toggles transactions. Similarly, P toggles pending transactions, and C toggles
cleared transactions. (By default, transactions with all statuses are cleared transactions. (By default, transactions with all statuses are
shown; if you activate one or two status filters, only those transac- shown; if you activate one or two status filters, only those transac-
tions are shown; and if you activate all three, the filter is removed.) tions are shown; and if you activate all three, the filter is removed.)
R toggles real mode, in which virtual postings are ignored. R toggles real mode, in which virtual postings are ignored.
Z toggles nonzero mode, in which only transactions posting a nonzero Z toggles nonzero mode, in which only transactions posting a nonzero
change are shown (hledger-ui shows zero items by default, unlike com- change are shown (hledger-ui shows zero items by default, unlike com-
mand-line hledger). mand-line hledger).
Press right (or enter) to view the selected transaction in detail. Press right (or enter) to view the selected transaction in detail.
Transaction screen Transaction screen
This screen shows a single transaction, as a general journal entry, This screen shows a single transaction, as a general journal entry,
similar to hledger's print command and journal format (hledger_jour- similar to hledger's print command and journal format (hledger_jour-
nal(5)). nal(5)).
The transaction's date(s) and any cleared flag, transaction code, de- The transaction's date(s) and any cleared flag, transaction code, de-
scription, comments, along with all of its account postings are shown. scription, comments, along with all of its account postings are shown.
Simple transactions have two postings, but there can be more (or in Simple transactions have two postings, but there can be more (or in
certain cases, fewer). certain cases, fewer).
up and down will step through all transactions listed in the previous up and down will step through all transactions listed in the previous
account register screen. In the title bar, the numbers in parentheses account register screen. In the title bar, the numbers in parentheses
show your position within that account register. They will vary de- show your position within that account register. They will vary de-
pending on which account register you came from (remember most transac- pending on which account register you came from (remember most transac-
tions appear in multiple account registers). The #N number preceding tions appear in multiple account registers). The #N number preceding
them is the transaction's position within the complete unfiltered jour- them is the transaction's position within the complete unfiltered jour-
nal, which is a more stable id (at least until the next reload). nal, which is a more stable id (at least until the next reload).
Error screen Error screen
This screen will appear if there is a problem, such as a parse error, This screen will appear if there is a problem, such as a parse error,
when you press g to reload. Once you have fixed the problem, press g when you press g to reload. Once you have fixed the problem, press g
again to reload and resume normal operation. (Or, you can press escape again to reload and resume normal operation. (Or, you can press escape
to cancel the reload attempt.) to cancel the reload attempt.)
@ -384,15 +388,15 @@ ENVIRONMENT
COLUMNS The screen width to use. Default: the full terminal width. COLUMNS The screen width to use. Default: the full terminal width.
LEDGER_FILE The journal file path when not specified with -f. Default: 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). nal).
A typical value is ~/DIR/YYYY.journal, where DIR is a version-con- A typical value is ~/DIR/YYYY.journal, where DIR is a version-con-
trolled finance directory and YYYY is the current year. Or ~/DIR/cur- trolled finance directory and YYYY is the current year. Or ~/DIR/cur-
rent.journal, where current.journal is a symbolic link to YYYY.journal. rent.journal, where current.journal is a symbolic link to YYYY.journal.
On Mac computers, you can set this and other environment variables in a On Mac computers, you can set this and other environment variables in a
more thorough way that also affects applications started from the GUI more thorough way that also affects applications started from the GUI
(say, an Emacs dock icon). Eg on MacOS Catalina I have a ~/.MacOSX/en- (say, an Emacs dock icon). Eg on MacOS Catalina I have a ~/.MacOSX/en-
vironment.plist file containing vironment.plist file containing
@ -403,13 +407,13 @@ ENVIRONMENT
To see the effect you may need to killall Dock, or reboot. To see the effect you may need to killall Dock, or reboot.
FILES FILES
Reads data from one or more files in hledger journal, timeclock, time- Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal). C:/Users/USER/.hledger.journal).
BUGS 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. ward.
-f- doesn't work (hledger-ui can't read from stdin). -f- doesn't work (hledger-ui can't read from stdin).
@ -417,24 +421,24 @@ BUGS
-V affects only the accounts screen. -V affects only the accounts screen.
When you press g, the current and all previous screens are regenerated, When you press g, the current and all previous screens are regenerated,
which may cause a noticeable pause with large files. Also there is no which may cause a noticeable pause with large files. Also there is no
visual indication that this is in progress. visual indication that this is in progress.
--watch is not yet fully robust. It works well for normal usage, but --watch is not yet fully robust. It works well for normal usage, but
many file changes in a short time (eg saving the file thousands of many file changes in a short time (eg saving the file thousands of
times with an editor macro) can cause problems at least on OSX. Symp- times with an editor macro) can cause problems at least on OSX. Symp-
toms include: unresponsive UI, periodic resetting of the cursor posi- toms include: unresponsive UI, periodic resetting of the cursor posi-
tion, momentary display of parse errors, high CPU usage eventually sub- tion, momentary display of parse errors, high CPU usage eventually sub-
siding, and possibly a small but persistent build-up of CPU usage until siding, and possibly a small but persistent build-up of CPU usage until
the program is restarted. the program is restarted.
Also, if you are viewing files mounted from another machine, --watch Also, if you are viewing files mounted from another machine, --watch
requires that both machine clocks are roughly in step. requires that both machine clocks are roughly in step.
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)
@ -448,7 +452,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)

View File

@ -118,6 +118,9 @@ use some other field or tag for the account name
\f[B]\f[CB]-I --ignore-assertions\f[B]\f[R] \f[B]\f[CB]-I --ignore-assertions\f[B]\f[R]
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
.TP
\f[B]\f[CB]-s --strict\f[B]\f[R]
do extra error checking (check that all posted accounts are declared)
.PP .PP
hledger reporting options: hledger reporting options:
.TP .TP

View File

@ -127,6 +127,10 @@ before options, as shown in the synopsis above.
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
'-s --strict'
do extra error checking (check that all posted accounts are
declared)
hledger reporting options: hledger reporting options:
@ -587,20 +591,20 @@ Tag Table:
Node: Top72 Node: Top72
Node: OPTIONS1752 Node: OPTIONS1752
Ref: #options1857 Ref: #options1857
Node: PERMISSIONS8861 Node: PERMISSIONS8956
Ref: #permissions9000 Ref: #permissions9095
Node: EDITING UPLOADING DOWNLOADING10212 Node: EDITING UPLOADING DOWNLOADING10307
Ref: #editing-uploading-downloading10393 Ref: #editing-uploading-downloading10488
Node: RELOADING11227 Node: RELOADING11322
Ref: #reloading11361 Ref: #reloading11456
Node: JSON API11794 Node: JSON API11889
Ref: #json-api11908 Ref: #json-api12003
Node: ENVIRONMENT17398 Node: ENVIRONMENT17493
Ref: #environment17514 Ref: #environment17609
Node: FILES18247 Node: FILES18342
Ref: #files18347 Ref: #files18442
Node: BUGS18560 Node: BUGS18655
Ref: #bugs18638 Ref: #bugs18733
 
End Tag Table End Tag Table

View File

@ -108,6 +108,10 @@ OPTIONS
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
-s --strict
do extra error checking (check that all posted accounts are de-
clared)
hledger reporting options: hledger reporting options:
-b --begin=DATE -b --begin=DATE
@ -132,7 +136,7 @@ OPTIONS
multiperiod/multicolumn report by year multiperiod/multicolumn report by year
-p --period=PERIODEXP -p --period=PERIODEXP
set start date, end date, and/or reporting interval all at once set start date, end date, and/or reporting interval all at once
using period expressions syntax using period expressions syntax
--date2 --date2
@ -155,21 +159,21 @@ OPTIONS
hide/aggregate accounts or postings more than NUM levels deep hide/aggregate accounts or postings more than NUM levels deep
-E --empty -E --empty
show items with zero amount, normally hidden (and vice-versa in show items with zero amount, normally hidden (and vice-versa in
hledger-ui/hledger-web) hledger-ui/hledger-web)
-B --cost -B --cost
convert amounts to their cost/selling amount at transaction time convert amounts to their cost/selling amount at transaction time
-V --market -V --market
convert amounts to their market value in default valuation com- convert amounts to their market value in default valuation com-
modities modities
-X --exchange=COMM -X --exchange=COMM
convert amounts to their market value in commodity COMM convert amounts to their market value in commodity COMM
--value --value
convert amounts to cost or market value, more flexibly than convert amounts to cost or market value, more flexibly than
-B/-V/-X -B/-V/-X
--infer-value --infer-value
@ -178,15 +182,15 @@ OPTIONS
--auto apply automated posting rules to modify transactions. --auto apply automated posting rules to modify transactions.
--forecast --forecast
generate future transactions from periodic transaction rules, generate future transactions from periodic transaction rules,
for the next 6 months or till report end date. In hledger-ui, for the next 6 months or till report end date. In hledger-ui,
also make ordinary future transactions visible. also make ordinary future transactions visible.
--color=WHEN (or --colour=WHEN) --color=WHEN (or --colour=WHEN)
Should color-supporting commands use ANSI color codes in text Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color- output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this. NO_COLOR environment variable overrides this.
When a reporting option appears more than once in the command line, the When a reporting option appears more than once in the command line, the
@ -206,54 +210,54 @@ OPTIONS
show debug output (levels 1-9, default: 1) show debug output (levels 1-9, default: 1)
A @FILE argument will be expanded to the contents of FILE, which should A @FILE argument will be expanded to the contents of FILE, which should
contain one command line option/argument per line. (To prevent this, contain one command line option/argument per line. (To prevent this,
insert a -- argument before.) insert a -- argument before.)
By default, hledger-web starts the web app in "transient mode" and also By default, hledger-web starts the web app in "transient mode" and also
opens it in your default web browser if possible. In this mode the web opens it in your default web browser if possible. In this mode the web
app will keep running for as long as you have it open in a browser win- app will keep running for as long as you have it open in a browser win-
dow, and will exit after two minutes of inactivity (no requests and no dow, and will exit after two minutes of inactivity (no requests and no
browser windows viewing it). With --serve, it just runs the web app browser windows viewing it). With --serve, it just runs the web app
without exiting, and logs requests to the console. With --serve-api, without exiting, and logs requests to the console. With --serve-api,
only the JSON web api (see below) is served, with the usual HTML only the JSON web api (see below) is served, with the usual HTML
server-side web UI disabled. server-side web UI disabled.
By default the server listens on IP address 127.0.0.1, accessible only By default the server listens on IP address 127.0.0.1, accessible only
to local requests. You can use --host to change this, eg --host to local requests. You can use --host to change this, eg --host
0.0.0.0 to listen on all configured addresses. 0.0.0.0 to listen on all configured addresses.
Similarly, use --port to set a TCP port other than 5000, eg if you are Similarly, use --port to set a TCP port other than 5000, eg if you are
running multiple hledger-web instances. running multiple hledger-web instances.
Both of these options are ignored when --socket is used. In this case, Both of these options are ignored when --socket is used. In this case,
it creates an AF_UNIX socket file at the supplied path and uses that it creates an AF_UNIX socket file at the supplied path and uses that
for communication. This is an alternative way of running multiple for communication. This is an alternative way of running multiple
hledger-web instances behind a reverse proxy that handles authentica- hledger-web instances behind a reverse proxy that handles authentica-
tion for different users. The path can be derived in a predictable tion for different users. The path can be derived in a predictable
way, eg by using the username within the path. As an example, nginx as way, eg by using the username within the path. As an example, nginx as
reverse proxy can use the variable $remote_user to derive a path from reverse proxy can use the variable $remote_user to derive a path from
the username used in a HTTP basic authentication. The following the username used in a HTTP basic authentication. The following
proxy_pass directive allows access to all hledger-web instances that proxy_pass directive allows access to all hledger-web instances that
created a socket in /tmp/hledger/: created a socket in /tmp/hledger/:
proxy_pass http://unix:/tmp/hledger/${remote_user}.socket; proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;
You can use --base-url to change the protocol, hostname, port and path You can use --base-url to change the protocol, hostname, port and path
that appear in hyperlinks, useful eg for integrating hledger-web within that appear in hyperlinks, useful eg for integrating hledger-web within
a larger website. The default is http://HOST:PORT/ using the server's a larger website. The default is http://HOST:PORT/ using the server's
configured host address and TCP port (or http://HOST if PORT is 80). configured host address and TCP port (or http://HOST if PORT is 80).
With --file-url you can set a different base url for static files, eg With --file-url you can set a different base url for static files, eg
for better caching or cookie-less serving on high performance websites. for better caching or cookie-less serving on high performance websites.
PERMISSIONS PERMISSIONS
By default, hledger-web allows anyone who can reach it to view the By default, hledger-web allows anyone who can reach it to view the
journal and to add new transactions, but not to change existing data. journal and to add new transactions, but not to change existing data.
You can restrict who can reach it by You can restrict who can reach it by
o setting the IP address it listens on (see --host above). By default o setting the IP address it listens on (see --host above). By default
it listens on 127.0.0.1, accessible to all users on the local ma- it listens on 127.0.0.1, accessible to all users on the local ma-
chine. chine.
o putting it behind an authenticating proxy, using eg apache or nginx o putting it behind an authenticating proxy, using eg apache or nginx
@ -263,44 +267,44 @@ PERMISSIONS
You can restrict what the users who reach it can do, by You can restrict what the users who reach it can do, by
o using the --capabilities=CAP[,CAP..] flag when you start it, enabling o using the --capabilities=CAP[,CAP..] flag when you start it, enabling
one or more of the following capabilities. The default value is one or more of the following capabilities. The default value is
view,add: view,add:
o view - allows viewing the journal file and all included files o view - allows viewing the journal file and all included files
o add - allows adding new transactions to the main journal file o add - allows adding new transactions to the main journal file
o manage - allows editing, uploading or downloading the main or in- o manage - allows editing, uploading or downloading the main or in-
cluded files cluded files
o using the --capabilities-header=HTTPHEADER flag to specify a HTTP o using the --capabilities-header=HTTPHEADER flag to specify a HTTP
header from which it will read capabilities to enable. hledger-web header from which it will read capabilities to enable. hledger-web
on Sandstorm uses the X-Sandstorm-Permissions header to integrate on Sandstorm uses the X-Sandstorm-Permissions header to integrate
with Sandstorm's permissions. This is disabled by default. with Sandstorm's permissions. This is disabled by default.
EDITING, UPLOADING, DOWNLOADING EDITING, UPLOADING, DOWNLOADING
If you enable the manage capability mentioned above, you'll see a new If you enable the manage capability mentioned above, you'll see a new
"spanner" button to the right of the search form. Clicking this will "spanner" button to the right of the search form. Clicking this will
let you edit, upload, or download the journal file or any files it in- let you edit, upload, or download the journal file or any files it in-
cludes. cludes.
Note, unlike any other hledger command, in this mode you (or any visi- Note, unlike any other hledger command, in this mode you (or any visi-
tor) can alter or wipe the data files. tor) can alter or wipe the data files.
Normally whenever a file is changed in this way, hledger-web saves a Normally whenever a file is changed in this way, hledger-web saves a
numbered backup (assuming file permissions allow it, the disk is not numbered backup (assuming file permissions allow it, the disk is not
full, etc.) hledger-web is not aware of version control systems, cur- full, etc.) hledger-web is not aware of version control systems, cur-
rently; if you use one, you'll have to arrange to commit the changes rently; if you use one, you'll have to arrange to commit the changes
yourself (eg with a cron job or a file watcher like entr). yourself (eg with a cron job or a file watcher like entr).
Changes which would leave the journal file(s) unparseable or non-valid Changes which would leave the journal file(s) unparseable or non-valid
(eg with failing balance assertions) are prevented. (Probably. This (eg with failing balance assertions) are prevented. (Probably. This
needs re-testing.) needs re-testing.)
RELOADING RELOADING
hledger-web detects changes made to the files by other means (eg if you hledger-web detects changes made to the files by other means (eg if you
edit it directly, outside of hledger-web), and it will show the new edit it directly, outside of hledger-web), and it will show the new
data when you reload the page or navigate to a new page. If a change data when you reload the page or navigate to a new page. If a change
makes a file unparseable, hledger-web will display an error message un- makes a file unparseable, hledger-web will display an error message un-
til the file has been fixed. til the file has been fixed.
@ -308,8 +312,8 @@ RELOADING
that both machine clocks are roughly in step.) that both machine clocks are roughly in step.)
JSON API JSON API
In addition to the web UI, hledger-web also serves a JSON API that can In addition to the web UI, hledger-web also serves a JSON API that can
be used to get data or add new transactions. If you want the JSON API be used to get data or add new transactions. If you want the JSON API
only, you can use the --serve-api flag. Eg: only, you can use the --serve-api flag. Eg:
$ hledger-web -f examples/sample.journal --serve-api $ hledger-web -f examples/sample.journal --serve-api
@ -326,7 +330,7 @@ JSON API
/accounttransactions/ACCOUNTNAME /accounttransactions/ACCOUNTNAME
Eg, all account names in the journal (similar to the accounts command). Eg, all account names in the journal (similar to the accounts command).
(hledger-web's JSON does not include newlines, here we use python to (hledger-web's JSON does not include newlines, here we use python to
prettify it): prettify it):
$ curl -s http://127.0.0.1:5000/accountnames | python -m json.tool $ curl -s http://127.0.0.1:5000/accountnames | python -m json.tool
@ -367,25 +371,25 @@ JSON API
"aprice": null, "aprice": null,
... ...
Most of the JSON corresponds to hledger's data types; for details of Most of the JSON corresponds to hledger's data types; for details of
what the fields mean, see the Hledger.Data.Json haddock docs and click what the fields mean, see the Hledger.Data.Json haddock docs and click
on the various data types, eg Transaction. And for a higher level un- on the various data types, eg Transaction. And for a higher level un-
derstanding, see the journal manual. derstanding, see the journal manual.
In some cases there is outer JSON corresponding to a "Report" type. To In some cases there is outer JSON corresponding to a "Report" type. To
understand that, go to the Hledger.Web.Handler.MiscR haddock and look understand that, go to the Hledger.Web.Handler.MiscR haddock and look
at the source for the appropriate handler to see what it returns. Eg at the source for the appropriate handler to see what it returns. Eg
for /accounttransactions it's getAccounttransactionsR, returning a "ac- for /accounttransactions it's getAccounttransactionsR, returning a "ac-
countTransactionsReport ...". Looking up the haddock for that we can countTransactionsReport ...". Looking up the haddock for that we can
see that /accounttransactions returns an AccountTransactionsReport, see that /accounttransactions returns an AccountTransactionsReport,
which consists of a report title and a list of AccountTransactionsRe- which consists of a report title and a list of AccountTransactionsRe-
portItem (etc). portItem (etc).
You can add a new transaction to the journal with a PUT request to You can add a new transaction to the journal with a PUT request to
/add, if hledger-web was started with the add capability (enabled by /add, if hledger-web was started with the add capability (enabled by
default). The payload must be the full, exact JSON representation of a default). The payload must be the full, exact JSON representation of a
hledger transaction (partial data won't do). You can get sample JSON hledger transaction (partial data won't do). You can get sample JSON
from hledger-web's /transactions or /accounttransactions, or you can from hledger-web's /transactions or /accounttransactions, or you can
export it with hledger-lib, eg like so: export it with hledger-lib, eg like so:
.../hledger$ stack ghci hledger-lib .../hledger$ stack ghci hledger-lib
@ -481,22 +485,22 @@ JSON API
"tstatus": "Unmarked" "tstatus": "Unmarked"
} }
And here's how to test adding it with curl. This should add a new en- And here's how to test adding it with curl. This should add a new en-
try to your journal: try to your journal:
$ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json $ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json
ENVIRONMENT ENVIRONMENT
LEDGER_FILE The journal file path when not specified with -f. Default: 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). nal).
A typical value is ~/DIR/YYYY.journal, where DIR is a version-con- A typical value is ~/DIR/YYYY.journal, where DIR is a version-con-
trolled finance directory and YYYY is the current year. Or ~/DIR/cur- trolled finance directory and YYYY is the current year. Or ~/DIR/cur-
rent.journal, where current.journal is a symbolic link to YYYY.journal. rent.journal, where current.journal is a symbolic link to YYYY.journal.
On Mac computers, you can set this and other environment variables in a On Mac computers, you can set this and other environment variables in a
more thorough way that also affects applications started from the GUI more thorough way that also affects applications started from the GUI
(say, an Emacs dock icon). Eg on MacOS Catalina I have a ~/.MacOSX/en- (say, an Emacs dock icon). Eg on MacOS Catalina I have a ~/.MacOSX/en-
vironment.plist file containing vironment.plist file containing
@ -507,13 +511,13 @@ ENVIRONMENT
To see the effect you may need to killall Dock, or reboot. To see the effect you may need to killall Dock, or reboot.
FILES FILES
Reads data from one or more files in hledger journal, timeclock, time- Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal). C:/Users/USER/.hledger.journal).
BUGS 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. ward.
-f- doesn't work (hledger-web can't read from stdin). -f- doesn't work (hledger-web can't read from stdin).
@ -527,7 +531,7 @@ BUGS
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)
@ -541,7 +545,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)

View File

@ -566,6 +566,9 @@ use some other field or tag for the account name
\f[B]\f[CB]-I --ignore-assertions\f[B]\f[R] \f[B]\f[CB]-I --ignore-assertions\f[B]\f[R]
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
.TP
\f[B]\f[CB]-s --strict\f[B]\f[R]
do extra error checking (check that all posted accounts are declared)
.PP .PP
General reporting options: General reporting options:
.TP .TP
@ -1060,6 +1063,25 @@ use a single parent file which includes the others
.IP \[bu] 2 .IP \[bu] 2
or concatenate the files into one before reading, eg: or concatenate the files into one before reading, eg:
\f[C]cat a.journal b.journal | hledger -f- CMD\f[R]. \f[C]cat a.journal b.journal | hledger -f- CMD\f[R].
.SS Strict mode
.PP
hledger checks input files for valid data.
By default, the most important errors are detected, while still
accepting easy journal files without a lot of declarations:
.IP \[bu] 2
Are the input files parseable, with valid syntax ?
.IP \[bu] 2
Are all transactions balanced ?
.IP \[bu] 2
Do all balance assertions pass ?
.PP
With the \f[C]-s\f[R]/\f[C]--strict\f[R] flag, additional checks are
performed:
.IP \[bu] 2
Are all accounts referenced by transactions declared with an account
directive ?
.PP
\f[I]experimental.\f[R]
.SS Output destination .SS Output destination
.PP .PP
hledger commands send their output to the terminal by default. hledger commands send their output to the terminal by default.

View File

@ -500,6 +500,7 @@ File: hledger.info, Node: OPTIONS, Next: COMMANDS, Prev: COMMON TASKS, Up: T
* Special characters in arguments and queries:: * Special characters in arguments and queries::
* Unicode characters:: * Unicode characters::
* Input files:: * Input files::
* Strict mode::
* Output destination:: * Output destination::
* Output format:: * Output format::
* Regular expressions:: * Regular expressions::
@ -557,6 +558,10 @@ by most hledger commands, run 'hledger -h'.
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
'-s --strict'
do extra error checking (check that all posted accounts are
declared)
General reporting options: General reporting options:
@ -934,7 +939,7 @@ hledger is expected to handle non-ascii characters correctly:
terminal, and vice versa. (See eg #961). terminal, and vice versa. (See eg #961).
 
File: hledger.info, Node: Input files, Next: Output destination, Prev: Unicode characters, Up: OPTIONS File: hledger.info, Node: Input files, Next: Strict mode, Prev: Unicode characters, Up: OPTIONS
2.7 Input files 2.7 Input files
=============== ===============
@ -997,9 +1002,30 @@ big journal. There are some limitations with this:
a.journal b.journal | hledger -f- CMD'. a.journal b.journal | hledger -f- CMD'.
 
File: hledger.info, Node: Output destination, Next: Output format, Prev: Input files, Up: OPTIONS File: hledger.info, Node: Strict mode, Next: Output destination, Prev: Input files, Up: OPTIONS
2.8 Output destination 2.8 Strict mode
===============
hledger checks input files for valid data. By default, the most
important errors are detected, while still accepting easy journal files
without a lot of declarations:
* Are the input files parseable, with valid syntax ?
* Are all transactions balanced ?
* Do all balance assertions pass ?
With the '-s'/'--strict' flag, additional checks are performed:
* Are all accounts referenced by transactions declared with an
account directive ?
_experimental._

File: hledger.info, Node: Output destination, Next: Output format, Prev: Strict mode, Up: OPTIONS
2.9 Output destination
====================== ======================
hledger commands send their output to the terminal by default. You can hledger commands send their output to the terminal by default. You can
@ -1017,8 +1043,8 @@ $ hledger print -o - # write to stdout (the default)
 
File: hledger.info, Node: Output format, Next: Regular expressions, Prev: Output destination, Up: OPTIONS File: hledger.info, Node: Output format, Next: Regular expressions, Prev: Output destination, Up: OPTIONS
2.9 Output format 2.10 Output format
================= ==================
Some commands (print, register, the balance commands) offer a choice of Some commands (print, register, the balance commands) offer a choice of
output format. In addition to the usual plain text format ('txt'), output format. In addition to the usual plain text format ('txt'),
@ -1071,7 +1097,7 @@ $ hledger balancesheet -o foo.txt -O html # write HTML to foo.txt
 
File: hledger.info, Node: Regular expressions, Next: Smart dates, Prev: Output format, Up: OPTIONS File: hledger.info, Node: Regular expressions, Next: Smart dates, Prev: Output format, Up: OPTIONS
2.10 Regular expressions 2.11 Regular expressions
======================== ========================
hledger uses regular expressions in a number of places: hledger uses regular expressions in a number of places:
@ -1116,7 +1142,7 @@ they support:
 
File: hledger.info, Node: Smart dates, Next: Report start & end date, Prev: Regular expressions, Up: OPTIONS File: hledger.info, Node: Smart dates, Next: Report start & end date, Prev: Regular expressions, Up: OPTIONS
2.11 Smart dates 2.12 Smart dates
================ ================
hledger's user interfaces accept a flexible "smart date" syntax (unlike hledger's user interfaces accept a flexible "smart date" syntax (unlike
@ -1155,7 +1181,7 @@ results:
 
File: hledger.info, Node: Report start & end date, Next: Report intervals, Prev: Smart dates, Up: OPTIONS File: hledger.info, Node: Report start & end date, Next: Report intervals, Prev: Smart dates, Up: OPTIONS
2.12 Report start & end date 2.13 Report start & end date
============================ ============================
Most hledger reports show the full span of time represented by the Most hledger reports show the full span of time represented by the
@ -1198,7 +1224,7 @@ thismonth'
 
File: hledger.info, Node: Report intervals, Next: Period expressions, Prev: Report start & end date, Up: OPTIONS File: hledger.info, Node: Report intervals, Next: Period expressions, Prev: Report start & end date, Up: OPTIONS
2.13 Report intervals 2.14 Report intervals
===================== =====================
A report interval can be specified so that commands like register, A report interval can be specified so that commands like register,
@ -1211,7 +1237,7 @@ intervals can not be specified with a query.
 
File: hledger.info, Node: Period expressions, Next: Depth limiting, Prev: Report intervals, Up: OPTIONS File: hledger.info, Node: Period expressions, Next: Depth limiting, Prev: Report intervals, Up: OPTIONS
2.14 Period expressions 2.15 Period expressions
======================= =======================
The '-p/--period' option accepts period expressions, a shorthand way of The '-p/--period' option accepts period expressions, a shorthand way of
@ -1336,7 +1362,7 @@ start date and exclusive end date):
 
File: hledger.info, Node: Depth limiting, Next: Pivoting, Prev: Period expressions, Up: OPTIONS File: hledger.info, Node: Depth limiting, Next: Pivoting, Prev: Period expressions, Up: OPTIONS
2.15 Depth limiting 2.16 Depth limiting
=================== ===================
With the '--depth N' option (short form: '-N'), commands like account, With the '--depth N' option (short form: '-N'), commands like account,
@ -1348,7 +1374,7 @@ less detail. This flag has the same effect as a 'depth:' query argument
 
File: hledger.info, Node: Pivoting, Next: Valuation, Prev: Depth limiting, Up: OPTIONS File: hledger.info, Node: Pivoting, Next: Valuation, Prev: Depth limiting, Up: OPTIONS
2.16 Pivoting 2.17 Pivoting
============= =============
Normally hledger sums amounts, and organizes them in a hierarchy, based Normally hledger sums amounts, and organizes them in a hierarchy, based
@ -1405,7 +1431,7 @@ $ hledger balance --pivot member acct:.
 
File: hledger.info, Node: Valuation, Prev: Pivoting, Up: OPTIONS File: hledger.info, Node: Valuation, Prev: Pivoting, Up: OPTIONS
2.17 Valuation 2.18 Valuation
============== ==============
Instead of reporting amounts in their original commodity, hledger can Instead of reporting amounts in their original commodity, hledger can
@ -1432,7 +1458,7 @@ usually one of those is all you need.
 
File: hledger.info, Node: -B Cost, Next: -V Value, Up: Valuation File: hledger.info, Node: -B Cost, Next: -V Value, Up: Valuation
2.17.1 -B: Cost 2.18.1 -B: Cost
--------------- ---------------
The '-B/--cost' flag converts amounts to their cost or sale amount at The '-B/--cost' flag converts amounts to their cost or sale amount at
@ -1441,7 +1467,7 @@ transaction time, if they have a transaction price specified.
 
File: hledger.info, Node: -V Value, Next: -X Value in specified commodity, Prev: -B Cost, Up: Valuation File: hledger.info, Node: -V Value, Next: -X Value in specified commodity, Prev: -B Cost, Up: Valuation
2.17.2 -V: Value 2.18.2 -V: Value
---------------- ----------------
The '-V/--market' flag converts amounts to market value in their default The '-V/--market' flag converts amounts to market value in their default
@ -1451,7 +1477,7 @@ _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 File: hledger.info, Node: -X Value in specified commodity, Next: Valuation date, Prev: -V Value, Up: Valuation
2.17.3 -X: Value in specified commodity 2.18.3 -X: Value in specified commodity
--------------------------------------- ---------------------------------------
The '-X/--exchange=COMM' option is like '-V', except you tell it which The '-X/--exchange=COMM' option is like '-V', except you tell it which
@ -1461,7 +1487,7 @@ that.
 
File: hledger.info, Node: Valuation date, Next: Market prices, Prev: -X Value in specified commodity, Up: Valuation File: hledger.info, Node: Valuation date, Next: Market prices, Prev: -X Value in specified commodity, Up: Valuation
2.17.4 Valuation date 2.18.4 Valuation date
--------------------- ---------------------
Since market prices can change from day to day, market value reports Since market prices can change from day to day, market value reports
@ -1478,7 +1504,7 @@ of the period, by default.
 
File: hledger.info, Node: Market prices, Next: --infer-value market prices from transactions, Prev: Valuation date, Up: Valuation File: hledger.info, Node: Market prices, Next: --infer-value market prices from transactions, Prev: Valuation date, Up: Valuation
2.17.5 Market prices 2.18.5 Market prices
-------------------- --------------------
_(experimental)_ _(experimental)_
@ -1509,7 +1535,7 @@ converted.
 
File: hledger.info, Node: --infer-value market prices from transactions, Next: Valuation commodity, Prev: Market prices, Up: Valuation File: hledger.info, Node: --infer-value market prices from transactions, Next: Valuation commodity, Prev: Market prices, Up: Valuation
2.17.6 -infer-value: market prices from transactions 2.18.6 -infer-value: market prices from transactions
---------------------------------------------------- ----------------------------------------------------
_(experimental)_ _(experimental)_
@ -1544,7 +1570,7 @@ you, read all of this Valuation section carefully, and try adding
 
File: hledger.info, Node: Valuation commodity, Next: Simple valuation examples, Prev: --infer-value market prices from transactions, Up: Valuation File: hledger.info, Node: Valuation commodity, Next: Simple valuation examples, Prev: --infer-value market prices from transactions, Up: Valuation
2.17.7 Valuation commodity 2.18.7 Valuation commodity
-------------------------- --------------------------
_(experimental)_ _(experimental)_
@ -1584,7 +1610,7 @@ converted.
 
File: hledger.info, Node: Simple valuation examples, Next: --value Flexible valuation, Prev: Valuation commodity, Up: Valuation File: hledger.info, Node: Simple valuation examples, Next: --value Flexible valuation, Prev: Valuation commodity, Up: Valuation
2.17.8 Simple valuation examples 2.18.8 Simple valuation examples
-------------------------------- --------------------------------
Here are some quick examples of '-V': Here are some quick examples of '-V':
@ -1619,7 +1645,7 @@ $ hledger -f t.j bal -N euros -V
 
File: hledger.info, Node: --value Flexible valuation, Next: More valuation examples, Prev: Simple valuation examples, Up: Valuation File: hledger.info, Node: --value Flexible valuation, Next: More valuation examples, Prev: Simple valuation examples, Up: Valuation
2.17.9 -value: Flexible valuation 2.18.9 -value: Flexible valuation
--------------------------------- ---------------------------------
'-B', '-V' and '-X' are special cases of the more general '--value' '-B', '-V' and '-X' are special cases of the more general '--value'
@ -1667,7 +1693,7 @@ this commodity, deducing market prices as described above.
 
File: hledger.info, Node: More valuation examples, Next: Effect of valuation on reports, Prev: --value Flexible valuation, Up: Valuation File: hledger.info, Node: More valuation examples, Next: Effect of valuation on reports, Prev: --value Flexible valuation, Up: Valuation
2.17.10 More valuation examples 2.18.10 More valuation examples
------------------------------- -------------------------------
Here are some examples showing the effect of '--value', as seen with Here are some examples showing the effect of '--value', as seen with
@ -1781,7 +1807,7 @@ $ hledger print -X A
 
File: hledger.info, Node: Effect of valuation on reports, Prev: More valuation examples, Up: Valuation File: hledger.info, Node: Effect of valuation on reports, Prev: More valuation examples, Up: Valuation
2.17.11 Effect of valuation on reports 2.18.11 Effect of valuation on reports
-------------------------------------- --------------------------------------
Here is a reference for how valuation is supposed to affect each part of Here is a reference for how valuation is supposed to affect each part of
@ -4406,190 +4432,192 @@ Node: Migrating to a new file16412
Ref: #migrating-to-a-new-file16560 Ref: #migrating-to-a-new-file16560
Node: OPTIONS16859 Node: OPTIONS16859
Ref: #options16966 Ref: #options16966
Node: General options17336 Node: General options17352
Ref: #general-options17461 Ref: #general-options17477
Node: Command options20767 Node: Command options20878
Ref: #command-options20918 Ref: #command-options21029
Node: Command arguments21316 Node: Command arguments21427
Ref: #command-arguments21463 Ref: #command-arguments21574
Node: Queries22343 Node: Queries22454
Ref: #queries22498 Ref: #queries22609
Node: Special characters in arguments and queries26460 Node: Special characters in arguments and queries26571
Ref: #special-characters-in-arguments-and-queries26688 Ref: #special-characters-in-arguments-and-queries26799
Node: More escaping27139 Node: More escaping27250
Ref: #more-escaping27301 Ref: #more-escaping27412
Node: Even more escaping27597 Node: Even more escaping27708
Ref: #even-more-escaping27791 Ref: #even-more-escaping27902
Node: Less escaping28462 Node: Less escaping28573
Ref: #less-escaping28624 Ref: #less-escaping28735
Node: Unicode characters28869 Node: Unicode characters28980
Ref: #unicode-characters29051 Ref: #unicode-characters29162
Node: Input files30463 Node: Input files30574
Ref: #input-files30606 Ref: #input-files30710
Node: Output destination32905 Node: Strict mode33009
Ref: #output-destination33057 Ref: #strict-mode33145
Node: Output format33482 Node: Output destination33626
Ref: #output-format33632 Ref: #output-destination33778
Node: Regular expressions35799 Node: Output format34203
Ref: #regular-expressions35956 Ref: #output-format34355
Node: Smart dates37692 Node: Regular expressions36522
Ref: #smart-dates37843 Ref: #regular-expressions36679
Node: Report start & end date39204 Node: Smart dates38415
Ref: #report-start-end-date39376 Ref: #smart-dates38566
Node: Report intervals40873 Node: Report start & end date39927
Ref: #report-intervals41038 Ref: #report-start-end-date40099
Node: Period expressions41428 Node: Report intervals41596
Ref: #period-expressions41588 Ref: #report-intervals41761
Node: Depth limiting45961 Node: Period expressions42151
Ref: #depth-limiting46105 Ref: #period-expressions42311
Node: Pivoting46437 Node: Depth limiting46684
Ref: #pivoting46560 Ref: #depth-limiting46828
Node: Valuation48236 Node: Pivoting47160
Ref: #valuation48338 Ref: #pivoting47283
Node: -B Cost49027 Node: Valuation48959
Ref: #b-cost49131 Ref: #valuation49061
Node: -V Value49264 Node: -B Cost49750
Ref: #v-value49410 Ref: #b-cost49854
Node: -X Value in specified commodity49605 Node: -V Value49987
Ref: #x-value-in-specified-commodity49804 Ref: #v-value50133
Node: Valuation date49953 Node: -X Value in specified commodity50328
Ref: #valuation-date50121 Ref: #x-value-in-specified-commodity50527
Node: Market prices50543 Node: Valuation date50676
Ref: #market-prices50723 Ref: #valuation-date50844
Node: --infer-value market prices from transactions51665 Node: Market prices51266
Ref: #infer-value-market-prices-from-transactions51914 Ref: #market-prices51446
Node: Valuation commodity53196 Node: --infer-value market prices from transactions52388
Ref: #valuation-commodity53405 Ref: #infer-value-market-prices-from-transactions52637
Node: Simple valuation examples54631 Node: Valuation commodity53919
Ref: #simple-valuation-examples54833 Ref: #valuation-commodity54128
Node: --value Flexible valuation55492 Node: Simple valuation examples55354
Ref: #value-flexible-valuation55700 Ref: #simple-valuation-examples55556
Node: More valuation examples57647 Node: --value Flexible valuation56215
Ref: #more-valuation-examples57856 Ref: #value-flexible-valuation56423
Node: Effect of valuation on reports59861 Node: More valuation examples58370
Ref: #effect-of-valuation-on-reports60049 Ref: #more-valuation-examples58579
Node: COMMANDS67068 Node: Effect of valuation on reports60584
Ref: #commands67176 Ref: #effect-of-valuation-on-reports60772
Node: accounts68284 Node: COMMANDS67791
Ref: #accounts68382 Ref: #commands67899
Node: activity69081 Node: accounts69007
Ref: #activity69191 Ref: #accounts69105
Node: add69574 Node: activity69804
Ref: #add69675 Ref: #activity69914
Node: aregister72468 Node: add70297
Ref: #aregister72580 Ref: #add70398
Node: aregister and custom posting dates73953 Node: aregister73191
Ref: #aregister-and-custom-posting-dates74126 Ref: #aregister73303
Ref: #output-format-174719 Node: aregister and custom posting dates74676
Node: balance75124 Ref: #aregister-and-custom-posting-dates74849
Ref: #balance75241 Ref: #output-format-175442
Node: Classic balance report76721 Node: balance75847
Ref: #classic-balance-report76894 Ref: #balance75964
Node: Customising the classic balance report78218 Node: Classic balance report77444
Ref: #customising-the-classic-balance-report78446 Ref: #classic-balance-report77617
Node: Colour support80522 Node: Customising the classic balance report78941
Ref: #colour-support80689 Ref: #customising-the-classic-balance-report79169
Node: Flat mode80785 Node: Colour support81245
Ref: #flat-mode80933 Ref: #colour-support81412
Node: Depth limited balance reports81346 Node: Flat mode81508
Ref: #depth-limited-balance-reports81531 Ref: #flat-mode81656
Node: Percentages81987 Node: Depth limited balance reports82069
Ref: #percentages82144 Ref: #depth-limited-balance-reports82254
Node: Sorting by amount83281 Node: Percentages82710
Ref: #sorting-by-amount83447 Ref: #percentages82867
Node: Multicolumn balance report83941 Node: Sorting by amount84004
Ref: #multicolumn-balance-report84127 Ref: #sorting-by-amount84170
Node: Budget report89724 Node: Multicolumn balance report84664
Ref: #budget-report89867 Ref: #multicolumn-balance-report84850
Node: Budget report start date95156 Node: Budget report90447
Ref: #budget-report-start-date95321 Ref: #budget-report90590
Node: Nested budgets96653 Node: Budget report start date95879
Ref: #nested-budgets96798 Ref: #budget-report-start-date96044
Ref: #output-format-2100281 Node: Nested budgets97376
Node: balancesheet100442 Ref: #nested-budgets97521
Ref: #balancesheet100578 Ref: #output-format-2101004
Node: balancesheetequity102090 Node: balancesheet101165
Ref: #balancesheetequity102239 Ref: #balancesheet101301
Node: cashflow103315 Node: balancesheetequity102813
Ref: #cashflow103443 Ref: #balancesheetequity102962
Node: check-dates104659 Node: cashflow104038
Ref: #check-dates104786 Ref: #cashflow104166
Node: check-dupes105065 Node: check-dates105382
Ref: #check-dupes105191 Ref: #check-dates105509
Node: close105484 Node: check-dupes105788
Ref: #close105592 Ref: #check-dupes105914
Node: close usage107114 Node: close106207
Ref: #close-usage107207 Ref: #close106315
Node: codes110020 Node: close usage107837
Ref: #codes110128 Ref: #close-usage107930
Node: commodities110840 Node: codes110743
Ref: #commodities110967 Ref: #codes110851
Node: descriptions111049 Node: commodities111563
Ref: #descriptions111177 Ref: #commodities111690
Node: diff111481 Node: descriptions111772
Ref: #diff111587 Ref: #descriptions111900
Node: files112634 Node: diff112204
Ref: #files112734 Ref: #diff112310
Node: help112881 Node: files113357
Ref: #help112981 Ref: #files113457
Node: import114062 Node: help113604
Ref: #import114176 Ref: #help113704
Node: Importing balance assignments115098 Node: import114785
Ref: #importing-balance-assignments115279 Ref: #import114899
Node: Commodity display styles115928 Node: Importing balance assignments115821
Ref: #commodity-display-styles116099 Ref: #importing-balance-assignments116002
Node: incomestatement116228 Node: Commodity display styles116651
Ref: #incomestatement116361 Ref: #commodity-display-styles116822
Node: notes117706 Node: incomestatement116951
Ref: #notes117819 Ref: #incomestatement117084
Node: payees118187 Node: notes118429
Ref: #payees118293 Ref: #notes118542
Node: prices118713 Node: payees118910
Ref: #prices118819 Ref: #payees119016
Node: print119160 Node: prices119436
Ref: #print119270 Ref: #prices119542
Node: print-unique124066 Node: print119883
Ref: #print-unique124192 Ref: #print119993
Node: register124477 Node: print-unique124789
Ref: #register124604 Ref: #print-unique124915
Node: Custom register output129053 Node: register125200
Ref: #custom-register-output129182 Ref: #register125327
Node: register-match130519 Node: Custom register output129776
Ref: #register-match130653 Ref: #custom-register-output129905
Node: rewrite131004 Node: register-match131242
Ref: #rewrite131119 Ref: #register-match131376
Node: Re-write rules in a file132974 Node: rewrite131727
Ref: #re-write-rules-in-a-file133108 Ref: #rewrite131842
Node: Diff output format134318 Node: Re-write rules in a file133697
Ref: #diff-output-format134487 Ref: #re-write-rules-in-a-file133831
Node: rewrite vs print --auto135579 Node: Diff output format135041
Ref: #rewrite-vs.-print---auto135758 Ref: #diff-output-format135210
Node: roi136314 Node: rewrite vs print --auto136302
Ref: #roi136412 Ref: #rewrite-vs.-print---auto136481
Node: stats148622 Node: roi137037
Ref: #stats148721 Ref: #roi137135
Node: tags149509 Node: stats149345
Ref: #tags149607 Ref: #stats149444
Node: test150126 Node: tags150232
Ref: #test150234 Ref: #tags150330
Node: Add-on commands150981 Node: test150849
Ref: #add-on-commands151098 Ref: #test150957
Node: ui152441 Node: Add-on commands151704
Ref: #ui152529 Ref: #add-on-commands151821
Node: web152583 Node: ui153164
Ref: #web152686 Ref: #ui153252
Node: iadd152802 Node: web153306
Ref: #iadd152913 Ref: #web153409
Node: interest152995 Node: iadd153525
Ref: #interest153102 Ref: #iadd153636
Node: ENVIRONMENT153342 Node: interest153718
Ref: #environment153454 Ref: #interest153825
Node: FILES154439 Node: ENVIRONMENT154065
Ref: #files-1154542 Ref: #environment154177
Node: LIMITATIONS154755 Node: FILES155162
Ref: #limitations154874 Ref: #files-1155265
Node: TROUBLESHOOTING155616 Node: LIMITATIONS155478
Ref: #troubleshooting155729 Ref: #limitations155597
Node: TROUBLESHOOTING156339
Ref: #troubleshooting156452
 
End Tag Table End Tag Table

View File

@ -464,6 +464,10 @@ OPTIONS
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
-s --strict
do extra error checking (check that all posted accounts are de-
clared)
General reporting options: General reporting options:
-b --begin=DATE -b --begin=DATE
@ -488,7 +492,7 @@ OPTIONS
multiperiod/multicolumn report by year multiperiod/multicolumn report by year
-p --period=PERIODEXP -p --period=PERIODEXP
set start date, end date, and/or reporting interval all at once set start date, end date, and/or reporting interval all at once
using period expressions syntax using period expressions syntax
--date2 --date2
@ -511,21 +515,21 @@ OPTIONS
hide/aggregate accounts or postings more than NUM levels deep hide/aggregate accounts or postings more than NUM levels deep
-E --empty -E --empty
show items with zero amount, normally hidden (and vice-versa in show items with zero amount, normally hidden (and vice-versa in
hledger-ui/hledger-web) hledger-ui/hledger-web)
-B --cost -B --cost
convert amounts to their cost/selling amount at transaction time convert amounts to their cost/selling amount at transaction time
-V --market -V --market
convert amounts to their market value in default valuation com- convert amounts to their market value in default valuation com-
modities modities
-X --exchange=COMM -X --exchange=COMM
convert amounts to their market value in commodity COMM convert amounts to their market value in commodity COMM
--value --value
convert amounts to cost or market value, more flexibly than convert amounts to cost or market value, more flexibly than
-B/-V/-X -B/-V/-X
--infer-value --infer-value
@ -534,15 +538,15 @@ OPTIONS
--auto apply automated posting rules to modify transactions. --auto apply automated posting rules to modify transactions.
--forecast --forecast
generate future transactions from periodic transaction rules, generate future transactions from periodic transaction rules,
for the next 6 months or till report end date. In hledger-ui, for the next 6 months or till report end date. In hledger-ui,
also make ordinary future transactions visible. also make ordinary future transactions visible.
--color=WHEN (or --colour=WHEN) --color=WHEN (or --colour=WHEN)
Should color-supporting commands use ANSI color codes in text Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color- output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this. NO_COLOR environment variable overrides this.
When a reporting option appears more than once in the command line, the When a reporting option appears more than once in the command line, the
@ -554,26 +558,26 @@ OPTIONS
To see options for a particular command, including command-specific op- To see options for a particular command, including command-specific op-
tions, run: hledger COMMAND -h. tions, run: hledger COMMAND -h.
Command-specific options must be written after the command name, eg: Command-specific options must be written after the command name, eg:
hledger print -x. hledger print -x.
Additionally, if the command is an addon, you may need to put its op- Additionally, if the command is an addon, you may need to put its op-
tions after a double-hyphen, eg: hledger ui -- --watch. Or, you can tions after a double-hyphen, eg: hledger ui -- --watch. Or, you can
run the addon executable directly: hledger-ui --watch. run the addon executable directly: hledger-ui --watch.
Command arguments Command arguments
Most hledger commands accept arguments after the command name, which Most hledger commands accept arguments after the command name, which
are often a query, filtering the data in some way. are often a query, filtering the data in some way.
You can save a set of command line options/arguments in a file, and You can save a set of command line options/arguments in a file, and
then reuse them by writing @FILENAME as a command line argument. Eg: then reuse them by writing @FILENAME as a command line argument. Eg:
hledger bal @foo.args. (To prevent this, eg if you have an argument hledger bal @foo.args. (To prevent this, eg if you have an argument
that begins with a literal @, precede it with --, eg: hledger bal -- that begins with a literal @, precede it with --, eg: hledger bal --
@ARG). @ARG).
Inside the argument file, each line should contain just one option or Inside the argument file, each line should contain just one option or
argument. Avoid the use of spaces, except inside quotes (or you'll see argument. Avoid the use of spaces, except inside quotes (or you'll see
a confusing error). Between a flag and its argument, use = (or noth- a confusing error). Between a flag and its argument, use = (or noth-
ing). Bad: ing). Bad:
assets depth:2 assets depth:2
@ -585,7 +589,7 @@ OPTIONS
depth:2 depth:2
-X=USD -X=USD
For special characters (see below), use one less level of quoting than For special characters (see below), use one less level of quoting than
you would at the command prompt. Bad: you would at the command prompt. Bad:
-X"$" -X"$"
@ -597,16 +601,16 @@ OPTIONS
See also: Save frequently used options. See also: Save frequently used options.
Queries Queries
One of hledger's strengths is being able to quickly report on precise One of hledger's strengths is being able to quickly report on precise
subsets of your data. Most commands accept an optional query expres- subsets of your data. Most commands accept an optional query expres-
sion, written as arguments after the command name, to filter the data sion, written as arguments after the command name, to filter the data
by date, account name or other criteria. The syntax is similar to a by date, account name or other criteria. The syntax is similar to a
web search: one or more space-separated search terms, quotes to enclose web search: one or more space-separated search terms, quotes to enclose
whitespace, prefixes to match specific fields, a not: prefix to negate whitespace, prefixes to match specific fields, a not: prefix to negate
the match. the match.
We do not yet support arbitrary boolean combinations of search terms; We do not yet support arbitrary boolean combinations of search terms;
instead most commands show transactions/postings/accounts which match instead most commands show transactions/postings/accounts which match
(or negatively match): (or negatively match):
o any of the description terms AND o any of the description terms AND
@ -627,31 +631,31 @@ OPTIONS
o match all the other terms. o match all the other terms.
The following kinds of search terms can be used. Remember these can The following kinds of search terms can be used. Remember these can
also be prefixed with not:, eg to exclude a particular subaccount. also be prefixed with not:, eg to exclude a particular subaccount.
REGEX, acct:REGEX REGEX, acct:REGEX
match account names by this regular expression. (With no pre- match account names by this regular expression. (With no pre-
fix, acct: is assumed.) same as above fix, acct: is assumed.) same as above
amt:N, amt:<N, amt:<=N, amt:>N, amt:>=N amt:N, amt:<N, amt:<=N, amt:>N, amt:>=N
match postings with a single-commodity amount that is equal to, match postings with a single-commodity amount that is equal to,
less than, or greater than N. (Multi-commodity amounts are not less than, or greater than N. (Multi-commodity amounts are not
tested, and will always match.) The comparison has two modes: if tested, and will always match.) The comparison has two modes: if
N is preceded by a + or - sign (or is 0), the two signed numbers N is preceded by a + or - sign (or is 0), the two signed numbers
are compared. Otherwise, the absolute magnitudes are compared, are compared. Otherwise, the absolute magnitudes are compared,
ignoring sign. ignoring sign.
code:REGEX code:REGEX
match by transaction code (eg check number) match by transaction code (eg check number)
cur:REGEX cur:REGEX
match postings or transactions including any amounts whose cur- match postings or transactions including any amounts whose cur-
rency/commodity symbol is fully matched by REGEX. (For a par- rency/commodity symbol is fully matched by REGEX. (For a par-
tial match, use .*REGEX.*). Note, to match characters which are tial match, use .*REGEX.*). Note, to match characters which are
regex-significant, like the dollar sign ($), you need to prepend regex-significant, like the dollar sign ($), you need to prepend
\. And when using the command line you need to add one more \. And when using the command line you need to add one more
level of quoting to hide it from the shell, so eg do: hledger level of quoting to hide it from the shell, so eg do: hledger
print cur:'\$' or hledger print cur:\\$. print cur:'\$' or hledger print cur:\\$.
desc:REGEX desc:REGEX
@ -659,20 +663,20 @@ OPTIONS
date:PERIODEXPR date:PERIODEXPR
match dates within the specified period. PERIODEXPR is a period match dates within the specified period. PERIODEXPR is a period
expression (with no report interval). Examples: date:2016, expression (with no report interval). Examples: date:2016,
date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the
--date2 command line flag is present, this matches secondary --date2 command line flag is present, this matches secondary
dates instead. dates instead.
date2:PERIODEXPR date2:PERIODEXPR
match secondary dates within the specified period. match secondary dates within the specified period.
depth:N depth:N
match (or display, depending on command) accounts at or above match (or display, depending on command) accounts at or above
this depth this depth
note:REGEX note:REGEX
match transaction notes (part of description right of |, or match transaction notes (part of description right of |, or
whole description when there's no |) whole description when there's no |)
payee:REGEX payee:REGEX
@ -686,35 +690,35 @@ OPTIONS
match unmarked, pending, or cleared transactions respectively match unmarked, pending, or cleared transactions respectively
tag:REGEX[=REGEX] tag:REGEX[=REGEX]
match by tag name, and optionally also by tag value. Note a match by tag name, and optionally also by tag value. Note a
tag: query is considered to match a transaction if it matches tag: query is considered to match a transaction if it matches
any of the postings. Also remember that postings inherit the any of the postings. Also remember that postings inherit the
tags of their parent transaction. tags of their parent transaction.
The following special search term is used automatically in hledger-web, The following special search term is used automatically in hledger-web,
only: only:
inacct:ACCTNAME inacct:ACCTNAME
tells hledger-web to show the transaction register for this ac- tells hledger-web to show the transaction register for this ac-
count. Can be filtered further with acct etc. count. Can be filtered further with acct etc.
Some of these can also be expressed as command-line options (eg depth:2 Some of these can also be expressed as command-line options (eg depth:2
is equivalent to --depth 2). Generally you can mix options and query is equivalent to --depth 2). Generally you can mix options and query
arguments, and the resulting query will be their intersection (perhaps arguments, and the resulting query will be their intersection (perhaps
excluding the -p/--period option). excluding the -p/--period option).
Special characters in arguments and queries Special characters in arguments and queries
In shell command lines, option and argument values which contain "prob- In shell command lines, option and argument values which contain "prob-
lematic" characters, ie spaces, and also characters significant to your lematic" characters, ie spaces, and also characters significant to your
shell such as <, >, (, ), | and $, should be escaped by enclosing them shell such as <, >, (, ), | and $, should be escaped by enclosing them
in quotes or by writing backslashes before the characters. Eg: in quotes or by writing backslashes before the characters. Eg:
hledger register -p 'last year' "accounts receivable (receiv- hledger register -p 'last year' "accounts receivable (receiv-
able|payable)" amt:\>100. able|payable)" amt:\>100.
More escaping More escaping
Characters significant both to the shell and in regular expressions may Characters significant both to the shell and in regular expressions may
need one extra level of escaping. These include parentheses, the pipe need one extra level of escaping. These include parentheses, the pipe
symbol and the dollar sign. Eg, to match the dollar symbol, bash users symbol and the dollar sign. Eg, to match the dollar symbol, bash users
should do: should do:
@ -725,9 +729,9 @@ OPTIONS
hledger balance cur:\\$ hledger balance cur:\\$
Even more escaping Even more escaping
When hledger runs an addon executable (eg you type hledger ui, hledger When hledger runs an addon executable (eg you type hledger ui, hledger
runs hledger-ui), it de-escapes command-line options and arguments runs hledger-ui), it de-escapes command-line options and arguments
once, so you might need to triple-escape. Eg in bash, running the ui once, so you might need to triple-escape. Eg in bash, running the ui
command and matching the dollar sign, it's: command and matching the dollar sign, it's:
hledger ui cur:'\\$' hledger ui cur:'\\$'
@ -752,8 +756,8 @@ OPTIONS
hledger-ui cur:\\$ hledger-ui cur:\\$
Less escaping Less escaping
Inside an argument file, or in the search field of hledger-ui or Inside an argument file, or in the search field of hledger-ui or
hledger-web, or at a GHCI prompt, you need one less level of escaping hledger-web, or at a GHCI prompt, you need one less level of escaping
than at the command line. And backslashes may work better than quotes. than at the command line. And backslashes may work better than quotes.
Eg: Eg:
@ -762,41 +766,41 @@ OPTIONS
Unicode characters Unicode characters
hledger is expected to handle non-ascii characters correctly: hledger is expected to handle non-ascii characters correctly:
o they should be parsed correctly in input files and on the command o they should be parsed correctly in input files and on the command
line, by all hledger tools (add, iadd, hledger-web's search/add/edit line, by all hledger tools (add, iadd, hledger-web's search/add/edit
forms, etc.) forms, etc.)
o they should be displayed correctly by all hledger tools, and on- o they should be displayed correctly by all hledger tools, and on-
screen alignment should be preserved. screen alignment should be preserved.
This requires a well-configured environment. Here are some tips: This requires a well-configured environment. Here are some tips:
o A system locale must be configured, and it must be one that can de- o A system locale must be configured, and it must be one that can de-
code the characters being used. In bash, you can set a locale like code the characters being used. In bash, you can set a locale like
this: export LANG=en_US.UTF-8. There are some more details in Trou- this: export LANG=en_US.UTF-8. There are some more details in Trou-
bleshooting. This step is essential - without it, hledger will quit bleshooting. This step is essential - without it, hledger will quit
on encountering a non-ascii character (as with all GHC-compiled pro- on encountering a non-ascii character (as with all GHC-compiled pro-
grams). grams).
o your terminal software (eg Terminal.app, iTerm, CMD.exe, xterm..) o your terminal software (eg Terminal.app, iTerm, CMD.exe, xterm..)
must support unicode must support unicode
o the terminal must be using a font which includes the required unicode o the terminal must be using a font which includes the required unicode
glyphs glyphs
o the terminal should be configured to display wide characters as dou- o the terminal should be configured to display wide characters as dou-
ble width (for report alignment) ble width (for report alignment)
o on Windows, for best results you should run hledger in the same kind o on Windows, for best results you should run hledger in the same kind
of environment in which it was built. Eg hledger built in the stan- of environment in which it was built. Eg hledger built in the stan-
dard CMD.EXE environment (like the binaries on our download page) dard CMD.EXE environment (like the binaries on our download page)
might show display problems when run in a cygwin or msys terminal, might show display problems when run in a cygwin or msys terminal,
and vice versa. (See eg #961). and vice versa. (See eg #961).
Input files Input files
hledger reads transactions from a data file (and the add command writes hledger reads transactions from a data file (and the add command writes
to it). By default this file is $HOME/.hledger.journal (or on Windows, to it). By default this file is $HOME/.hledger.journal (or on Windows,
something like C:/Users/USER/.hledger.journal). You can override this something like C:/Users/USER/.hledger.journal). You can override this
with the $LEDGER_FILE environment variable: with the $LEDGER_FILE environment variable:
$ setenv LEDGER_FILE ~/finance/2016.journal $ setenv LEDGER_FILE ~/finance/2016.journal
@ -810,49 +814,67 @@ OPTIONS
$ cat some.journal | hledger -f- $ cat some.journal | hledger -f-
Usually the data file is in hledger's journal format, but it can be in Usually the data file is in hledger's journal format, but it can be in
any of the supported file formats, which currently are: any of the supported file formats, which currently are:
Reader: Reads: Used for file exten- Reader: Reads: Used for file exten-
sions: sions:
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
journal hledger journal files and some Ledger .journal .j .hledger journal hledger journal files and some Ledger .journal .j .hledger
journals, for transactions .ledger journals, for transactions .ledger
time- timeclock files, for precise time log- .timeclock time- timeclock files, for precise time log- .timeclock
clock ging clock ging
timedot timedot files, for approximate time .timedot timedot timedot files, for approximate time .timedot
logging logging
csv comma/semicolon/tab/other-separated .csv .ssv .tsv csv comma/semicolon/tab/other-separated .csv .ssv .tsv
values, for data import values, for data import
hledger detects the format automatically based on the file extensions hledger detects the format automatically based on the file extensions
shown above. If it can't recognise the file extension, it assumes shown above. If it can't recognise the file extension, it assumes
journal format. So for non-journal files, it's important to use a journal format. So for non-journal files, it's important to use a
recognised file extension, so as to either read successfully or to show recognised file extension, so as to either read successfully or to show
relevant error messages. relevant error messages.
When you can't ensure the right file extension, not to worry: you can When you can't ensure the right file extension, not to worry: you can
force a specific reader/format by prefixing the file path with the for- force a specific reader/format by prefixing the file path with the for-
mat and a colon. Eg to read a .dat file as csv: mat and a colon. Eg to read a .dat file as csv:
$ hledger -f csv:/some/csv-file.dat stats $ hledger -f csv:/some/csv-file.dat stats
$ echo 'i 2009/13/1 08:00:00' | hledger print -ftimeclock:- $ echo 'i 2009/13/1 08:00:00' | hledger print -ftimeclock:-
You can specify multiple -f options, to read multiple files as one big You can specify multiple -f options, to read multiple files as one big
journal. There are some limitations with this: journal. There are some limitations with this:
o directives in one file will not affect the other files o directives in one file will not affect the other files
o balance assertions will not see any account balances from previous o balance assertions will not see any account balances from previous
files files
If you need either of those things, you can If you need either of those things, you can
o use a single parent file which includes the others o use a single parent file which includes the others
o or concatenate the files into one before reading, eg: cat a.journal o or concatenate the files into one before reading, eg: cat a.journal
b.journal | hledger -f- CMD. b.journal | hledger -f- CMD.
Strict mode
hledger checks input files for valid data. By default, the most impor-
tant errors are detected, while still accepting easy journal files
without a lot of declarations:
o Are the input files parseable, with valid syntax ?
o Are all transactions balanced ?
o Do all balance assertions pass ?
With the -s/--strict flag, additional checks are performed:
o Are all accounts referenced by transactions declared with an account
directive ?
experimental.
Output destination Output destination
hledger commands send their output to the terminal by default. You can hledger commands send their output to the terminal by default. You can
of course redirect this, eg into a file, using standard shell syntax: of course redirect this, eg into a file, using standard shell syntax:
@ -981,6 +1003,7 @@ OPTIONS
last/this/next -1, 0, 1 periods from the current period last/this/next -1, 0, 1 periods from the current period
day/week/month/quar- day/week/month/quar-
ter/year ter/year
20181201 8 digit YYYYMMDD with valid year month and day 20181201 8 digit YYYYMMDD with valid year month and day
201812 6 digit YYYYMM with valid year and month 201812 6 digit YYYYMM with valid year and month
@ -1071,7 +1094,6 @@ OPTIONS
1, 2009 1, 2009
-p "from 2009/1" the same -p "from 2009/1" the same
-p "from 2009" the same -p "from 2009" the same
-p "to 2009" everything before january -p "to 2009" everything before january
1, 2009 1, 2009
@ -1117,6 +1139,7 @@ OPTIONS
2008/11/25" 2008/11/25"
-p "quarterly from starts on 2009/04/01, ends on 2009/06/30, -p "quarterly from starts on 2009/04/01, ends on 2009/06/30,
2009-05-05 to 2009-06-01" which are first and last days of Q2 2009 2009-05-05 to 2009-06-01" which are first and last days of Q2 2009
-p "yearly from starts on 2009/01/01, first day of 2009 -p "yearly from starts on 2009/01/01, first day of 2009
2009-12-29" 2009-12-29"
@ -1569,8 +1592,6 @@ OPTIONS
balance balance
(bs, bse, (bs, bse,
cf, is) cf, is)
balance sums of costs value at re- not sup- value at re- value at balance sums of costs value at re- not sup- value at re- value at
changes port end or ported port or jour- DATE/today of changes port end or ported port or jour- DATE/today of
today of sums nal end of sums of post- today of sums nal end of sums of post-
@ -1593,6 +1614,8 @@ OPTIONS
start postings be- postings be- start postings be- postings be-
fore report fore report fore report fore report
start start start start
balance sums of costs same as not sup- balance value at balance sums of costs same as not sup- balance value at
changes of postings --value=end ported change in DATE/today of changes of postings --value=end ported change in DATE/today of
(bal, is, in period each period, sums of post- (bal, is, in period each period, sums of post-