;update manuals

This commit is contained in:
Simon Michael 2020-11-17 07:29:57 -08:00
parent 541aa3ee5b
commit 3662977c84
21 changed files with 979 additions and 903 deletions

View File

@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion.
m4_define({{_version_}}, {{1.19.99}})m4_dnl
m4_dnl
m4_dnl Date to show in man pages. Updated by make setdate.
m4_define({{_monthyear_}}, {{October 2020}})m4_dnl
m4_define({{_monthyear_}}, {{November 2020}})m4_dnl

View File

@ -1,6 +1,6 @@
.\"t
.TH "hledger_csv" "5" "October 2020" "hledger 1.19.99" "hledger User Manuals"
.TH "hledger_csv" "5" "November 2020" "hledger 1.19.99" "hledger User Manuals"

View File

@ -959,4 +959,4 @@ SEE ALSO
hledger 1.19.99 October 2020 hledger_csv(5)
hledger 1.19.99 November 2020 hledger_csv(5)

View File

@ -1,6 +1,6 @@
.\"t
.TH "hledger_journal" "5" "October 2020" "hledger 1.19.99" "hledger User Manuals"
.TH "hledger_journal" "5" "November 2020" "hledger 1.19.99" "hledger User Manuals"
@ -587,33 +587,52 @@ commodity 1 000 000.9455
.PP
.SS Commodity display style
.PP
For each commodity, hledger chooses a consistent format to use when
For each commodity, hledger chooses a consistent style to use when
displaying amounts.
(Except price amounts, which are always displayed as written).
The display style is chosen as follows:
.IP \[bu] 2
If there is a commodity directive (or default commodity directive) for
the commodity, that format is used (see examples above).
the commodity, its style is used (see examples above).
.IP \[bu] 2
Otherwise the format of the first posting amount in that commodity seen
in the journal is used.
But the number of decimal places (\[dq]precision\[dq]) will be the
maximum from all posting amounts in that commodity.
Otherwise the style is inferred from the amounts in that commodity seen
in the journal.
.IP \[bu] 2
Or if there are no such amounts in the journal, a default format is used
Or if there are no such amounts in the journal, a default style is used
(like \f[C]$1000.00\f[R]).
.PP
Transaction prices don\[aq]t affect the amount display style directly,
but occasionally they can do so indirectly (eg when an posting\[aq]s
amount is inferred using a transaction price).
A style is inferred from the journal amounts in a commodity as follows:
.IP \[bu] 2
Use the general style (decimal mark, symbol placement) of the first
amount
.IP \[bu] 2
Use the first-seen digit group style (digit group mark, digit group
sizes), if any
.IP \[bu] 2
Use the maximum number of decimal places of all.
.PP
Transaction price amounts don\[aq]t affect the commodity display style
directly, but occasionally they can do so indirectly (eg when a
posting\[aq]s amount is inferred using a transaction price).
If you find this causing problems, use a commodity directive to fix the
display style.
.PP
In summary: amounts will be displayed much as they appear in your
journal, with the max observed number of decimal places.
If you want to see fewer decimal places in reports, use a commodity
directive to override that.
In summary, each commodity\[aq]s amounts will be normalised to
.IP \[bu] 2
the style declared by a \f[C]commodity\f[R] directive
.IP \[bu] 2
or, the style of the first posting amount in the journal, with the
first-seen digit group style and the maximum-seen number of decimal
places.
.PP
If reports are showing amounts in a way you don\[aq]t like (eg, with too
many decimal places), use a commodity directive to set your preferred
style.
.SS Rounding
.PP
Amounts are stored internally as decimal numbers with up to 255 decimal
places, and displayed with the number of decimal places specified by the
commodity display style.
Note, hledger uses banker\[aq]s rounding: it rounds to the nearest even
number, eg 0.5 displayed with zero decimal places is \[dq]0\[dq]).
(Guaranteed since hledger 1.17.1; in older versions this could vary if

View File

@ -488,6 +488,7 @@ EUR 1E3
* Digit group marks::
* Commodity display style::
* Rounding::

File: hledger_journal.info, Node: Digit group marks, Next: Commodity display style, Up: Amounts
@ -523,40 +524,62 @@ commodity INR 9,99,99,999.00
commodity 1 000 000.9455

File: hledger_journal.info, Node: Commodity display style, Prev: Digit group marks, Up: Amounts
File: hledger_journal.info, Node: Commodity display style, Next: Rounding, Prev: Digit group marks, Up: Amounts
1.8.2 Commodity display style
-----------------------------
For each commodity, hledger chooses a consistent format to use when
For each commodity, hledger chooses a consistent style to use when
displaying amounts. (Except price amounts, which are always displayed
as written). The display style is chosen as follows:
* If there is a commodity directive (or default commodity directive)
for the commodity, that format is used (see examples above).
for the commodity, its style is used (see examples above).
* Otherwise the format of the first posting amount in that commodity
seen in the journal is used. But the number of decimal places
("precision") will be the maximum from all posting amounts in that
commodity.
* Otherwise the style is inferred from the amounts in that commodity
seen in the journal.
* Or if there are no such amounts in the journal, a default format is
* Or if there are no such amounts in the journal, a default style is
used (like '$1000.00').
Transaction prices don't affect the amount display style directly,
but occasionally they can do so indirectly (eg when an posting's amount
is inferred using a transaction price). If you find this causing
problems, use a commodity directive to fix the display style.
A style is inferred from the journal amounts in a commodity as
follows:
In summary: amounts will be displayed much as they appear in your
journal, with the max observed number of decimal places. If you want to
see fewer decimal places in reports, use a commodity directive to
override that.
* Use the general style (decimal mark, symbol placement) of the first
amount
* Use the first-seen digit group style (digit group mark, digit group
sizes), if any
* Use the maximum number of decimal places of all.
Note, hledger uses banker's rounding: it rounds to the nearest even
number, eg 0.5 displayed with zero decimal places is "0"). (Guaranteed
since hledger 1.17.1; in older versions this could vary if hledger was
built with Decimal < 0.5.1.)
Transaction price amounts don't affect the commodity display style
directly, but occasionally they can do so indirectly (eg when a
posting's amount is inferred using a transaction price). If you find
this causing problems, use a commodity directive to fix the display
style.
In summary, each commodity's amounts will be normalised to
* the style declared by a 'commodity' directive
* or, the style of the first posting amount in the journal, with the
first-seen digit group style and the maximum-seen number of decimal
places.
If reports are showing amounts in a way you don't like (eg, with too
many decimal places), use a commodity directive to set your preferred
style.

File: hledger_journal.info, Node: Rounding, Prev: Commodity display style, Up: Amounts
1.8.3 Rounding
--------------
Amounts are stored internally as decimal numbers with up to 255 decimal
places, and displayed with the number of decimal places specified by the
commodity display style. Note, hledger uses banker's rounding: it
rounds to the nearest even number, eg 0.5 displayed with zero decimal
places is "0"). (Guaranteed since hledger 1.17.1; in older versions
this could vary if hledger was built with Decimal < 0.5.1.)

File: hledger_journal.info, Node: Transaction prices, Next: Lot prices and lot dates, Prev: Amounts, Up: Transactions
@ -1889,96 +1912,98 @@ Node: Account names15177
Ref: #account-names15318
Node: Amounts15805
Ref: #amounts15944
Node: Digit group marks17055
Ref: #digit-group-marks17206
Node: Commodity display style18144
Ref: #commodity-display-style18307
Node: Transaction prices19711
Ref: #transaction-prices19883
Node: Lot prices and lot dates22314
Ref: #lot-prices-and-lot-dates22511
Node: Balance assertions22999
Ref: #balance-assertions23185
Node: Assertions and ordering24218
Ref: #assertions-and-ordering24406
Node: Assertions and included files25106
Ref: #assertions-and-included-files25349
Node: Assertions and multiple -f options25682
Ref: #assertions-and-multiple--f-options25938
Node: Assertions and commodities26070
Ref: #assertions-and-commodities26302
Node: Assertions and prices27459
Ref: #assertions-and-prices27673
Node: Assertions and subaccounts28113
Ref: #assertions-and-subaccounts28342
Node: Assertions and virtual postings28666
Ref: #assertions-and-virtual-postings28908
Node: Assertions and precision29050
Ref: #assertions-and-precision29243
Node: Balance assignments29510
Ref: #balance-assignments29684
Node: Balance assignments and prices30848
Ref: #balance-assignments-and-prices31020
Node: Directives31244
Ref: #directives31403
Node: Directives and multiple files36901
Ref: #directives-and-multiple-files37084
Node: Comment blocks37748
Ref: #comment-blocks37931
Node: Including other files38107
Ref: #including-other-files38287
Node: Default year39211
Ref: #default-year39380
Node: Declaring commodities39787
Ref: #declaring-commodities39970
Node: Default commodity41775
Ref: #default-commodity41961
Node: Declaring market prices42850
Ref: #declaring-market-prices43045
Node: Declaring accounts43902
Ref: #declaring-accounts44088
Node: Account comments45013
Ref: #account-comments45176
Node: Account subdirectives45600
Ref: #account-subdirectives45795
Node: Account types46108
Ref: #account-types46292
Node: Account display order49338
Ref: #account-display-order49508
Node: Rewriting accounts50659
Ref: #rewriting-accounts50844
Node: Basic aliases51601
Ref: #basic-aliases51747
Node: Regex aliases52451
Ref: #regex-aliases52623
Node: Combining aliases53342
Ref: #combining-aliases53535
Node: Aliases and multiple files54811
Ref: #aliases-and-multiple-files55020
Node: end aliases55599
Ref: #end-aliases55756
Node: Default parent account55857
Ref: #default-parent-account56025
Node: Periodic transactions56909
Ref: #periodic-transactions57084
Node: Periodic rule syntax58956
Ref: #periodic-rule-syntax59162
Node: Two spaces between period expression and description!59866
Ref: #two-spaces-between-period-expression-and-description60185
Node: Forecasting with periodic transactions60869
Ref: #forecasting-with-periodic-transactions61174
Node: Budgeting with periodic transactions63229
Ref: #budgeting-with-periodic-transactions63468
Node: Auto postings63877
Ref: #auto-postings64017
Node: Auto postings and multiple files66196
Ref: #auto-postings-and-multiple-files66400
Node: Auto postings and dates66609
Ref: #auto-postings-and-dates66883
Node: Auto postings and transaction balancing / inferred amounts / balance assertions67058
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions67409
Node: Auto posting tags67751
Ref: #auto-posting-tags67966
Node: Digit group marks17068
Ref: #digit-group-marks17219
Node: Commodity display style18157
Ref: #commodity-display-style18337
Node: Rounding19880
Ref: #rounding20004
Node: Transaction prices20416
Ref: #transaction-prices20588
Node: Lot prices and lot dates23019
Ref: #lot-prices-and-lot-dates23216
Node: Balance assertions23704
Ref: #balance-assertions23890
Node: Assertions and ordering24923
Ref: #assertions-and-ordering25111
Node: Assertions and included files25811
Ref: #assertions-and-included-files26054
Node: Assertions and multiple -f options26387
Ref: #assertions-and-multiple--f-options26643
Node: Assertions and commodities26775
Ref: #assertions-and-commodities27007
Node: Assertions and prices28164
Ref: #assertions-and-prices28378
Node: Assertions and subaccounts28818
Ref: #assertions-and-subaccounts29047
Node: Assertions and virtual postings29371
Ref: #assertions-and-virtual-postings29613
Node: Assertions and precision29755
Ref: #assertions-and-precision29948
Node: Balance assignments30215
Ref: #balance-assignments30389
Node: Balance assignments and prices31553
Ref: #balance-assignments-and-prices31725
Node: Directives31949
Ref: #directives32108
Node: Directives and multiple files37606
Ref: #directives-and-multiple-files37789
Node: Comment blocks38453
Ref: #comment-blocks38636
Node: Including other files38812
Ref: #including-other-files38992
Node: Default year39916
Ref: #default-year40085
Node: Declaring commodities40492
Ref: #declaring-commodities40675
Node: Default commodity42480
Ref: #default-commodity42666
Node: Declaring market prices43555
Ref: #declaring-market-prices43750
Node: Declaring accounts44607
Ref: #declaring-accounts44793
Node: Account comments45718
Ref: #account-comments45881
Node: Account subdirectives46305
Ref: #account-subdirectives46500
Node: Account types46813
Ref: #account-types46997
Node: Account display order50043
Ref: #account-display-order50213
Node: Rewriting accounts51364
Ref: #rewriting-accounts51549
Node: Basic aliases52306
Ref: #basic-aliases52452
Node: Regex aliases53156
Ref: #regex-aliases53328
Node: Combining aliases54047
Ref: #combining-aliases54240
Node: Aliases and multiple files55516
Ref: #aliases-and-multiple-files55725
Node: end aliases56304
Ref: #end-aliases56461
Node: Default parent account56562
Ref: #default-parent-account56730
Node: Periodic transactions57614
Ref: #periodic-transactions57789
Node: Periodic rule syntax59661
Ref: #periodic-rule-syntax59867
Node: Two spaces between period expression and description!60571
Ref: #two-spaces-between-period-expression-and-description60890
Node: Forecasting with periodic transactions61574
Ref: #forecasting-with-periodic-transactions61879
Node: Budgeting with periodic transactions63934
Ref: #budgeting-with-periodic-transactions64173
Node: Auto postings64582
Ref: #auto-postings64722
Node: Auto postings and multiple files66901
Ref: #auto-postings-and-multiple-files67105
Node: Auto postings and dates67314
Ref: #auto-postings-and-dates67588
Node: Auto postings and transaction balancing / inferred amounts / balance assertions67763
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions68114
Node: Auto posting tags68456
Ref: #auto-posting-tags68671

End Tag Table

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
.TH "hledger_timeclock" "5" "October 2020" "hledger 1.19.99" "hledger User Manuals"
.TH "hledger_timeclock" "5" "November 2020" "hledger 1.19.99" "hledger User Manuals"

View File

@ -78,4 +78,4 @@ SEE ALSO
hledger 1.19.99 October 2020 hledger_timeclock(5)
hledger 1.19.99 November 2020 hledger_timeclock(5)

View File

@ -1,5 +1,5 @@
.TH "hledger_timedot" "5" "October 2020" "hledger 1.19.99" "hledger User Manuals"
.TH "hledger_timedot" "5" "November 2020" "hledger 1.19.99" "hledger User Manuals"

View File

@ -161,4 +161,4 @@ SEE ALSO
hledger 1.19.99 October 2020 hledger_timedot(5)
hledger 1.19.99 November 2020 hledger_timedot(5)

View File

@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion.
m4_define({{_version_}}, {{1.19.99}})m4_dnl
m4_dnl
m4_dnl Date to show in man pages. Updated by make setdate.
m4_define({{_monthyear_}}, {{October 2020}})m4_dnl
m4_define({{_monthyear_}}, {{November 2020}})m4_dnl

View File

@ -1,5 +1,5 @@
.TH "hledger-ui" "1" "October 2020" "hledger-ui 1.19.99" "hledger User Manuals"
.TH "hledger-ui" "1" "November 2020" "hledger-ui 1.19.99" "hledger User Manuals"

View File

@ -456,4 +456,4 @@ SEE ALSO
hledger-ui 1.19.99 October 2020 hledger-ui(1)
hledger-ui 1.19.99 November 2020 hledger-ui(1)

View File

@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion.
m4_define({{_version_}}, {{1.19.99}})m4_dnl
m4_dnl
m4_dnl Date to show in man pages. Updated by make setdate.
m4_define({{_monthyear_}}, {{October 2020}})m4_dnl
m4_define({{_monthyear_}}, {{November 2020}})m4_dnl

View File

@ -1,5 +1,5 @@
.TH "hledger-web" "1" "October 2020" "hledger-web 1.19.99" "hledger User Manuals"
.TH "hledger-web" "1" "November 2020" "hledger-web 1.19.99" "hledger User Manuals"
@ -88,6 +88,10 @@ enable the view, add, and/or manage capabilities (default: view,add)
\f[B]\f[CB]--capabilities-header=HTTPHEADER\f[B]\f[R]
read capabilities to enable from a HTTP header, like
X-Sandstorm-Permissions (default: disabled)
.TP
\f[B]\f[CB]--test\f[B]\f[R]
run hledger-web\[aq]s tests and exit.
hspec test runner args may follow a --, eg: hledger-web --test -- --help
.PP
hledger input options:
.TP

View File

@ -97,6 +97,10 @@ before options, as shown in the synopsis above.
read capabilities to enable from a HTTP header, like
X-Sandstorm-Permissions (default: disabled)
'--test'
run hledger-web's tests and exit. hspec test runner args may
follow a -, eg: hledger-web -test - -help
hledger input options:
@ -583,20 +587,20 @@ Tag Table:
Node: Top72
Node: OPTIONS1752
Ref: #options1857
Node: PERMISSIONS8737
Ref: #permissions8876
Node: EDITING UPLOADING DOWNLOADING10088
Ref: #editing-uploading-downloading10269
Node: RELOADING11103
Ref: #reloading11237
Node: JSON API11670
Ref: #json-api11784
Node: ENVIRONMENT17274
Ref: #environment17390
Node: FILES18123
Ref: #files18223
Node: BUGS18436
Ref: #bugs18514
Node: PERMISSIONS8861
Ref: #permissions9000
Node: EDITING UPLOADING DOWNLOADING10212
Ref: #editing-uploading-downloading10393
Node: RELOADING11227
Ref: #reloading11361
Node: JSON API11794
Ref: #json-api11908
Node: ENVIRONMENT17398
Ref: #environment17514
Node: FILES18247
Ref: #files18347
Node: BUGS18560
Ref: #bugs18638

End Tag Table

View File

@ -80,6 +80,9 @@ OPTIONS
read capabilities to enable from a HTTP header, like X-Sand-
storm-Permissions (default: disabled)
--test run hledger-web's tests and exit. hspec test runner args may
follow a --, eg: hledger-web --test -- --help
hledger input options:
-f FILE --file=FILE
@ -87,7 +90,7 @@ OPTIONS
$LEDGER_FILE or $HOME/.hledger.journal)
--rules-file=RULESFILE
Conversion rules file to use when reading CSV (default:
Conversion rules file to use when reading CSV (default:
FILE.rules)
--separator=CHAR
@ -129,7 +132,7 @@ OPTIONS
multiperiod/multicolumn report by year
-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
--date2
@ -152,21 +155,21 @@ OPTIONS
hide/aggregate accounts or postings more than NUM levels deep
-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)
-B --cost
convert amounts to their cost/selling amount at transaction time
-V --market
convert amounts to their market value in default valuation com-
convert amounts to their market value in default valuation com-
modities
-X --exchange=COMM
convert amounts to their market value in commodity COMM
--value
convert amounts to cost or market value, more flexibly than
convert amounts to cost or market value, more flexibly than
-B/-V/-X
--infer-value
@ -175,15 +178,15 @@ OPTIONS
--auto apply automated posting rules to modify transactions.
--forecast
generate future transactions from periodic transaction rules,
for the next 6 months or till report end date. In hledger-ui,
generate future transactions from periodic transaction rules,
for the next 6 months or till report end date. In hledger-ui,
also make ordinary future transactions visible.
--color=WHEN (or --colour=WHEN)
Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A
Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this.
When a reporting option appears more than once in the command line, the
@ -203,54 +206,54 @@ OPTIONS
show debug output (levels 1-9, default: 1)
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.)
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
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
browser windows viewing it). With --serve, it just runs the web app
without exiting, and logs requests to the console. With --serve-api,
only the JSON web api (see below) is served, with the usual HTML
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
without exiting, and logs requests to the console. With --serve-api,
only the JSON web api (see below) is served, with the usual HTML
server-side web UI disabled.
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
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
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.
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
for communication. This is an alternative way of running multiple
hledger-web instances behind a reverse proxy that handles authentica-
tion for different users. The path can be derived in a predictable
it creates an AF_UNIX socket file at the supplied path and uses that
for communication. This is an alternative way of running multiple
hledger-web instances behind a reverse proxy that handles authentica-
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
reverse proxy can use the variable $remote_user to derive a path from
the username used in a HTTP basic authentication. The following
proxy_pass directive allows access to all hledger-web instances that
reverse proxy can use the variable $remote_user to derive a path from
the username used in a HTTP basic authentication. The following
proxy_pass directive allows access to all hledger-web instances that
created a socket in /tmp/hledger/:
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
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).
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.
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.
You can restrict who can reach it by
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-
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-
chine.
o putting it behind an authenticating proxy, using eg apache or nginx
@ -260,44 +263,44 @@ PERMISSIONS
You can restrict what the users who reach it can do, by
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:
o view - allows viewing the journal file and all included files
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
o using the --capabilities-header=HTTPHEADER flag to specify a HTTP
header from which it will read capabilities to enable. hledger-web
on Sandstorm uses the X-Sandstorm-Permissions header to integrate
o using the --capabilities-header=HTTPHEADER flag to specify a HTTP
header from which it will read capabilities to enable. hledger-web
on Sandstorm uses the X-Sandstorm-Permissions header to integrate
with Sandstorm's permissions. This is disabled by default.
EDITING, UPLOADING, DOWNLOADING
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
let you edit, upload, or download the journal file or any files it in-
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
let you edit, upload, or download the journal file or any files it in-
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.
Normally whenever a file is changed in this way, hledger-web saves a
numbered backup (assuming file permissions allow it, the disk is not
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
Normally whenever a file is changed in this way, hledger-web saves a
numbered backup (assuming file permissions allow it, the disk is not
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
yourself (eg with a cron job or a file watcher like entr).
Changes which would leave the journal file(s) unparseable or non-valid
(eg with failing balance assertions) are prevented. (Probably. This
Changes which would leave the journal file(s) unparseable or non-valid
(eg with failing balance assertions) are prevented. (Probably. This
needs re-testing.)
RELOADING
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
data when you reload the page or navigate to a new page. If a change
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
makes a file unparseable, hledger-web will display an error message un-
til the file has been fixed.
@ -305,8 +308,8 @@ RELOADING
that both machine clocks are roughly in step.)
JSON API
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
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
only, you can use the --serve-api flag. Eg:
$ hledger-web -f examples/sample.journal --serve-api
@ -323,7 +326,7 @@ JSON API
/accounttransactions/ACCOUNTNAME
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):
$ curl -s http://127.0.0.1:5000/accountnames | python -m json.tool
@ -364,25 +367,25 @@ JSON API
"aprice": null,
...
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
on the various data types, eg Transaction. And for a higher level un-
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
on the various data types, eg Transaction. And for a higher level un-
derstanding, see the journal manual.
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
at the source for the appropriate handler to see what it returns. Eg
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
for /accounttransactions it's getAccounttransactionsR, returning a "ac-
countTransactionsReport ...". Looking up the haddock for that we can
see that /accounttransactions returns an AccountTransactionsReport,
which consists of a report title and a list of AccountTransactionsRe-
countTransactionsReport ...". Looking up the haddock for that we can
see that /accounttransactions returns an AccountTransactionsReport,
which consists of a report title and a list of AccountTransactionsRe-
portItem (etc).
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
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
default). The payload must be the full, exact JSON representation of a
hledger transaction (partial data won't do). You can get sample JSON
from hledger-web's /transactions or /accounttransactions, or you can
hledger transaction (partial data won't do). You can get sample JSON
from hledger-web's /transactions or /accounttransactions, or you can
export it with hledger-lib, eg like so:
.../hledger$ stack ghci hledger-lib
@ -478,22 +481,22 @@ JSON API
"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:
$ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json
ENVIRONMENT
LEDGER_FILE The journal file path when not specified with -f. Default:
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
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-
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-
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
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-
vironment.plist file containing
@ -504,13 +507,13 @@ ENVIRONMENT
To see the effect you may need to killall Dock, or reboot.
FILES
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
BUGS
The need to precede options with -- when invoked from hledger is awk-
The need to precede options with -- when invoked from hledger is awk-
ward.
-f- doesn't work (hledger-web can't read from stdin).
@ -524,7 +527,7 @@ 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)
@ -538,7 +541,7 @@ COPYRIGHT
SEE ALSO
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1)
@ -546,4 +549,4 @@ SEE ALSO
hledger-web 1.19.99 October 2020 hledger-web(1)
hledger-web 1.19.99 November 2020 hledger-web(1)

View File

@ -4,4 +4,4 @@ m4_dnl Program version. Updated by make setversion.
m4_define({{_version_}}, {{1.19.99}})m4_dnl
m4_dnl
m4_dnl Date to show in man pages. Updated by make setdate.
m4_define({{_monthyear_}}, {{October 2020}})m4_dnl
m4_define({{_monthyear_}}, {{November 2020}})m4_dnl

View File

@ -1,6 +1,6 @@
.\"t
.TH "hledger" "1" "October 2020" "hledger 1.19.99" "hledger User Manuals"
.TH "hledger" "1" "November 2020" "hledger 1.19.99" "hledger User Manuals"
@ -2115,7 +2115,7 @@ Related: #329, #1083.
.PP
.TS
tab(@);
lw(7.4n) lw(11.7n) lw(19.6n) lw(6.8n) lw(19.6n) lw(5.0n).
lw(10.6n) lw(13.2n) lw(13.4n) lw(11.0n) lw(13.4n) lw(8.2n).
T{
Report type
T}@T{
@ -2152,7 +2152,7 @@ T}@T{
value at DATE/today
T}
T{
balance assertions / assignments
balance assertions/assignments
T}@T{
unchanged
T}@T{
@ -2180,7 +2180,7 @@ T}@T{
T}@T{
T}
T{
starting balance (with -H)
starting balance (-H)
T}@T{
cost
T}@T{
@ -2193,7 +2193,7 @@ T}@T{
value at DATE/today
T}
T{
posting amounts (no report interval)
posting amounts
T}@T{
cost
T}@T{
@ -2206,7 +2206,7 @@ T}@T{
value at DATE/today
T}
T{
summary posting amounts (with report interval)
summary posting amounts with report interval
T}@T{
summarised cost
T}@T{
@ -2239,7 +2239,7 @@ T}@T{
T}@T{
T}
T{
\f[B]balance (bs, bse, cf, is..)\f[R]
\f[B]balance (bs, bse, cf, is)\f[R]
T}@T{
T}@T{
T}@T{
@ -2247,7 +2247,7 @@ T}@T{
T}@T{
T}
T{
balances (no report interval)
balance changes
T}@T{
sums of costs
T}@T{
@ -2260,40 +2260,48 @@ T}@T{
value at DATE/today of sums of postings
T}
T{
balances changes (with report interval)
budget amounts (--budget)
T}@T{
sums of costs of postings in interval
like balance changes
T}@T{
value at period ends of sums of postings before period end minus value
at period starts of sums of all postings before period start
like balance changes
T}@T{
not supported
T}@T{
value at period ends of sums of postings before period end minus value
at period starts of sums of all postings before period start
like balances
T}@T{
value at DATE/today of sums of postings
like balance changes
T}
T{
end balances (with report interval and --cumulative or -H)
grand total
T}@T{
sums of costs of postings from report start (or before report start with
-H) and interval end
sum of displayed values
T}@T{
value at period ends of sums of all postings before period end (minus
value at report start of of sums of all postings before report start
with --cumulative)
sum of displayed values
T}@T{
not supported
T}@T{
value at period ends of sums of all postings before period end (minus
value at report start of of sums of all postings before report start
with --cumulative)
sum of displayed values
T}@T{
value at DATE/today of sums of postings
sum of displayed values
T}
T{
starting balances (with report interval and -H)
T}@T{
T}@T{
T}@T{
T}@T{
T}@T{
T}
T{
\f[B]balance (bs, bse, cf, is) with report interval\f[R]
T}@T{
T}@T{
T}@T{
T}@T{
T}@T{
T}
T{
starting balances (-H)
T}@T{
sums of costs of postings before report start
T}@T{
@ -2306,43 +2314,56 @@ T}@T{
sums of postings before report start
T}
T{
budget amounts with --budget
balance changes (bal, is, bs --change, cf --change)
T}@T{
like balances
sums of costs of postings in period
T}@T{
like balances
same as --value=end
T}@T{
not supported
T}@T{
like balances
balance change in each period, valued at period ends
T}@T{
like balances
value at DATE/today of sums of postings
T}
T{
grand total (no report interval)
end balances (bal -H, is --H, bs, cf)
T}@T{
sum of displayed values
sums of costs of postings from before report start to period end
T}@T{
sum of displayed values
same as --value=end
T}@T{
not supported
T}@T{
sum of displayed values
period end balances, valued at period ends
T}@T{
sum of displayed values
value at DATE/today of sums of postings
T}
T{
row totals/averages (with report interval)
budget amounts (--budget)
T}@T{
sums/averages of displayed values
like balance changes/end balances
T}@T{
sums/averages of displayed values
like balance changes/end balances
T}@T{
not supported
T}@T{
sums/averages of displayed values
like balances
T}@T{
sums/averages of displayed values
like balance changes/end balances
T}
T{
row totals, row averages (-T, -A)
T}@T{
sums, averages of displayed values
T}@T{
sums, averages of displayed values
T}@T{
not supported
T}@T{
sums, averages of displayed values
T}@T{
sums, averages of displayed values
T}
T{
column totals
@ -2358,17 +2379,17 @@ T}@T{
sums of displayed values
T}
T{
grand total/average
grand total, grand average
T}@T{
sum/average of column totals
sum, average of column totals
T}@T{
sum/average of column totals
sum, average of column totals
T}@T{
not supported
T}@T{
sum/average of column totals
sum, average of column totals
T}@T{
sum/average of column totals
sum, average of column totals
T}
T{
T}@T{
@ -2379,6 +2400,9 @@ T}@T{
T}
.TE
.PP
\f[C]--cumulative\f[R] is omitted to save space, it works like
\f[C]-H\f[R] but with a zero starting balance.
.PP
\f[B]Glossary:\f[R]
.TP
\f[I]cost\f[R]
@ -4451,6 +4475,9 @@ time-weighted rate of return (TWR) for your investments for the time
period requested.
Both rates of return are annualized before display, regardless of the
length of reporting interval.
.PP
An example:
https://github.com/simonmichael/hledger/blob/master/examples/roi-unrealised.ledger
.SS stats
.PP
stats

View File

@ -1786,103 +1786,96 @@ sideways.) It may be useful when troubleshooting. If you find
problems, please report them, ideally with a reproducible example.
Related: #329, #1083.
Report '-B', '-V', '-X' '--value=then''--value=end' '--value=DATE',
type '--value=cost' '--value=now'
------------------------------------------------------------------------------
Report '-B', '-V', '-X' '--value=then''--value=end' '--value=DATE',
type '--value=cost' '--value=now'
--------------------------------------------------------------------------------
*print*
posting cost value at report value value at report or value
amounts end or today at journal end at
posting DATE/today
date
balance unchanged unchanged unchangedunchanged unchanged
assertions
/
assignments
posting cost value at value at value at value
amounts report end posting report or at
or today date journal end DATE/today
balance unchanged unchanged unchanged unchanged unchanged
assertions/assignments
*register*
starting cost value at day not value at day value
balance before report or supportedbefore report or at
(with journal start journal start DATE/today
-H)
posting cost value at report value value at report or value
amounts end or today at journal end at
(no posting DATE/today
report date
interval)
summary summarised value at period sum value at period value
posting cost ends of ends at
amounts postings DATE/today
(with in
report interval,
interval) valued
at
interval
start
running sum/average sum/average of sum/averagesum/average of sum/average
total/averageof displayed values of displayed values of
displayed displayed displayed
values values values
starting cost value at day not value at day value
balance before supported before at
(-H) report or report or DATE/today
journal journal
start start
posting cost value at value at value at value
amounts report end posting report or at
or today date journal end DATE/today
summary summarised value at sum of value at value
posting cost period ends postings period ends at
amounts in DATE/today
with interval,
report valued at
interval interval
start
running sum/average sum/average sum/average sum/average sum/average
total/averageof displayed of displayed of of displayed of
values values displayed values displayed
values values
*balance
(bs,
bse,
cf,
is..)*
balances sums of value at report not value at report or value
(no costs end or today of supportedjournal end of at
report sums of postings sums of postings DATE/today
interval) of
sums
of
postings
balances sums of value at period not value at period value
changes costs of ends of sums of supportedends of sums of at
(with postings postings before postings before DATE/today
report in period end minus period end minus of
interval)interval value at period value at period sums
starts of sums of starts of sums of of
all postings all postings postings
before period before period
start start
end sums of value at period not value at period value
balances costs of ends of sums of supportedends of sums of at
(with postings all postings all postings DATE/today
report from before period end before period end of
interval report (minus value at (minus value at sums
and start (or report start of of report start of of of
-cumulativebefore sums of all sums of all postings
or -H) report postings before postings before
start with report start with report start with
-H) and -cumulative) -cumulative)
interval
end
starting sums of value at report not value at report sums
balances costs of start of sums of supportedstart of sums of of
(with postings all postings all postings postings
report before before report before report before
interval report start start report
and start start
-H)
budget like like balances not like balances like
amounts balances supported balances
(bs, bse,
cf, is)*
balance sums of value at not value at value
changes costs report end supported report or at
or today of journal end DATE/today
sums of of sums of of sums
postings postings of
postings
budget like balance like balance not like like
amounts changes changes supported balances balance
(-budget) changes
grand sum of sum of not sum of sum of
total displayed displayed supported displayed displayed
values values values values
*balance
(bs, bse,
cf, is)
with
-budget
grand sum of sum of displayed not sum of displayed sum
total displayed values supportedvalues of
(no values displayed
report values
interval)
row sums/averagessums/averages of not sums/averages of sums/averages
totals/averagesof displayed values supporteddisplayed values of
(with displayed displayed
report values values
interval)
column sums of sums of displayed not sums of displayed sums
totals displayed values supportedvalues of
values displayed
values
grand sum/average sum/average of not sum/average of sum/average
total/averageof columncolumn totals supportedcolumn totals of
totals column
totals
report
interval*
starting sums of value at not value at sums of
balances costs of report start supported report start postings
(-H) postings of sums of of sums of before
before all postings all postings report
report start before before start
report start report start
balance sums of same as not balance value
changes costs of -value=end supported change in at
(bal, is, postings in each period, DATE/today
bs period valued at of sums
-change, period ends of
cf postings
-change)
end sums of same as not period end value
balances costs of -value=end supported balances, at
(bal -H, postings valued at DATE/today
is -H, from before period ends of sums
bs, cf) report start of
to period postings
end
budget like balance like balance not like like
amounts changes/end changes/end supported balances balance
(-budget) balances balances changes/end
balances
row sums, sums, not sums, sums,
totals, averages of averages of supported averages of averages
row displayed displayed displayed of
averages values values values displayed
(-T, -A) values
column sums of sums of not sums of sums of
totals displayed displayed supported displayed displayed
values values values values
grand sum, average sum, average not sum, average sum,
total, of column of column supported of column average
grand totals totals totals of
average column
totals
'--cumulative' is omitted to save space, it works like '-H' but with
a zero starting balance.
*Glossary:*
@ -3810,6 +3803,9 @@ time-weighted rate of return (TWR) for your investments for the time
period requested. Both rates of return are annualized before display,
regardless of the length of reporting interval.
An example:
https://github.com/simonmichael/hledger/blob/master/examples/roi-unrealised.ledger

File: hledger.info, Node: stats, Next: tags, Prev: roi, Up: COMMANDS
@ -4198,126 +4194,126 @@ Node: More valuation examples57470
Ref: #more-valuation-examples57679
Node: Effect of valuation on reports59684
Ref: #effect-of-valuation-on-reports59872
Node: COMMANDS67137
Ref: #commands67245
Node: accounts68353
Ref: #accounts68451
Node: activity69150
Ref: #activity69260
Node: add69643
Ref: #add69744
Node: aregister72537
Ref: #aregister72649
Node: aregister and custom posting dates74022
Ref: #aregister-and-custom-posting-dates74195
Ref: #output-format-174788
Node: balance75193
Ref: #balance75310
Node: Classic balance report76790
Ref: #classic-balance-report76963
Node: Customising the classic balance report78287
Ref: #customising-the-classic-balance-report78515
Node: Colour support80591
Ref: #colour-support80758
Node: Flat mode80854
Ref: #flat-mode81002
Node: Depth limited balance reports81415
Ref: #depth-limited-balance-reports81600
Node: Percentages82056
Ref: #percentages82213
Node: Sorting by amount83350
Ref: #sorting-by-amount83516
Node: Multicolumn balance report84010
Ref: #multicolumn-balance-report84196
Node: Budget report89793
Ref: #budget-report89936
Node: Nested budgets95202
Ref: #nested-budgets95314
Ref: #output-format-298797
Node: balancesheet98994
Ref: #balancesheet99130
Node: balancesheetequity100642
Ref: #balancesheetequity100791
Node: cashflow101867
Ref: #cashflow101995
Node: check-dates103211
Ref: #check-dates103338
Node: check-dupes103617
Ref: #check-dupes103743
Node: close104036
Ref: #close104144
Node: close usage105666
Ref: #close-usage105759
Node: codes108572
Ref: #codes108680
Node: commodities109392
Ref: #commodities109519
Node: descriptions109601
Ref: #descriptions109729
Node: diff110033
Ref: #diff110139
Node: files111186
Ref: #files111286
Node: help111433
Ref: #help111533
Node: import112614
Ref: #import112728
Node: Importing balance assignments113650
Ref: #importing-balance-assignments113831
Node: Commodity display styles114480
Ref: #commodity-display-styles114651
Node: incomestatement114780
Ref: #incomestatement114913
Node: notes116258
Ref: #notes116371
Node: payees116739
Ref: #payees116845
Node: prices117265
Ref: #prices117371
Node: print117712
Ref: #print117822
Node: print-unique122618
Ref: #print-unique122744
Node: register123029
Ref: #register123156
Node: Custom register output127605
Ref: #custom-register-output127734
Node: register-match129071
Ref: #register-match129205
Node: rewrite129556
Ref: #rewrite129671
Node: Re-write rules in a file131526
Ref: #re-write-rules-in-a-file131660
Node: Diff output format132870
Ref: #diff-output-format133039
Node: rewrite vs print --auto134131
Ref: #rewrite-vs.-print---auto134310
Node: roi134866
Ref: #roi134964
Node: stats135976
Ref: #stats136075
Node: tags136863
Ref: #tags136961
Node: test137480
Ref: #test137588
Node: Add-on commands138335
Ref: #add-on-commands138452
Node: ui139795
Ref: #ui139883
Node: web139937
Ref: #web140040
Node: iadd140156
Ref: #iadd140267
Node: interest140349
Ref: #interest140456
Node: ENVIRONMENT140696
Ref: #environment140808
Node: FILES141793
Ref: #files-1141896
Node: LIMITATIONS142109
Ref: #limitations142228
Node: TROUBLESHOOTING142970
Ref: #troubleshooting143083
Node: COMMANDS66891
Ref: #commands66999
Node: accounts68107
Ref: #accounts68205
Node: activity68904
Ref: #activity69014
Node: add69397
Ref: #add69498
Node: aregister72291
Ref: #aregister72403
Node: aregister and custom posting dates73776
Ref: #aregister-and-custom-posting-dates73949
Ref: #output-format-174542
Node: balance74947
Ref: #balance75064
Node: Classic balance report76544
Ref: #classic-balance-report76717
Node: Customising the classic balance report78041
Ref: #customising-the-classic-balance-report78269
Node: Colour support80345
Ref: #colour-support80512
Node: Flat mode80608
Ref: #flat-mode80756
Node: Depth limited balance reports81169
Ref: #depth-limited-balance-reports81354
Node: Percentages81810
Ref: #percentages81967
Node: Sorting by amount83104
Ref: #sorting-by-amount83270
Node: Multicolumn balance report83764
Ref: #multicolumn-balance-report83950
Node: Budget report89547
Ref: #budget-report89690
Node: Nested budgets94956
Ref: #nested-budgets95068
Ref: #output-format-298551
Node: balancesheet98748
Ref: #balancesheet98884
Node: balancesheetequity100396
Ref: #balancesheetequity100545
Node: cashflow101621
Ref: #cashflow101749
Node: check-dates102965
Ref: #check-dates103092
Node: check-dupes103371
Ref: #check-dupes103497
Node: close103790
Ref: #close103898
Node: close usage105420
Ref: #close-usage105513
Node: codes108326
Ref: #codes108434
Node: commodities109146
Ref: #commodities109273
Node: descriptions109355
Ref: #descriptions109483
Node: diff109787
Ref: #diff109893
Node: files110940
Ref: #files111040
Node: help111187
Ref: #help111287
Node: import112368
Ref: #import112482
Node: Importing balance assignments113404
Ref: #importing-balance-assignments113585
Node: Commodity display styles114234
Ref: #commodity-display-styles114405
Node: incomestatement114534
Ref: #incomestatement114667
Node: notes116012
Ref: #notes116125
Node: payees116493
Ref: #payees116599
Node: prices117019
Ref: #prices117125
Node: print117466
Ref: #print117576
Node: print-unique122372
Ref: #print-unique122498
Node: register122783
Ref: #register122910
Node: Custom register output127359
Ref: #custom-register-output127488
Node: register-match128825
Ref: #register-match128959
Node: rewrite129310
Ref: #rewrite129425
Node: Re-write rules in a file131280
Ref: #re-write-rules-in-a-file131414
Node: Diff output format132624
Ref: #diff-output-format132793
Node: rewrite vs print --auto133885
Ref: #rewrite-vs.-print---auto134064
Node: roi134620
Ref: #roi134718
Node: stats135829
Ref: #stats135928
Node: tags136716
Ref: #tags136814
Node: test137333
Ref: #test137441
Node: Add-on commands138188
Ref: #add-on-commands138305
Node: ui139648
Ref: #ui139736
Node: web139790
Ref: #web139893
Node: iadd140009
Ref: #iadd140120
Node: interest140202
Ref: #interest140309
Node: ENVIRONMENT140549
Ref: #environment140661
Node: FILES141646
Ref: #files-1141749
Node: LIMITATIONS141962
Ref: #limitations142081
Node: TROUBLESHOOTING142823
Ref: #troubleshooting142936

End Tag Table

View File

@ -1533,112 +1533,90 @@ OPTIONS
problems, please report them, ideally with a reproducible example. Re-
lated: #329, #1083.
Report -B, -V, -X --value=then --value=end --value=DATE,
type --value=cost --value=now
-----------------------------------------------------------------------------------------------------
Report type -B, -V, -X --value=then --value=end --value=DATE,
--value=cost --value=now
--------------------------------------------------------------------------------------------
print
posting cost value at report end value at value at report or value at
amounts or today posting date journal end DATE/today
balance unchanged unchanged unchanged unchanged unchanged
asser-
tions /
assign-
ments
posting cost value at re- value at value at re- value at
amounts port end or posting date port or jour- DATE/today
today nal end
balance as- unchanged unchanged unchanged unchanged unchanged
ser-
tions/as-
signments
regis-
ter
start- cost value at day before not sup- value at day before value at
ing report or journal ported report or journal DATE/today
balance start start
(with
-H)
register
starting cost value at day not sup- value at day value at
balance before report ported before report DATE/today
(-H) or journal or journal
start start
posting cost value at re- value at value at re- value at
amounts port end or posting date port or jour- DATE/today
today nal end
posting cost value at report end value at value at report or value at
amounts or today posting date journal end DATE/today
(no re-
port
inter-
val)
summary summarised value at period ends sum of post- value at period ends value at
posting cost ings in in- DATE/today
amounts terval, val-
(with ued at in-
report terval start
inter-
val)
running sum/average sum/average of dis- sum/average sum/average of dis- sum/average
to- of displayed played values of displayed played values of displayed
tal/av- values values values
erage
summary summarised value at pe- sum of post- value at pe- value at
posting cost riod ends ings in in- riod ends DATE/today
amounts terval, val-
with report ued at in-
interval terval start
running to- sum/average sum/average sum/average sum/average sum/average
tal/average of displayed of displayed of displayed of displayed of displayed
values values values values values
balance
(bs,
bse,
cf,
is..)
bal- sums of value at report end not sup- value at report or value at
ances costs or today of sums of ported journal end of sums DATE/today of
(no re- postings of postings sums of post-
port ings
inter-
val)
bal- sums of value at period ends not sup- value at period ends value at
ances costs of of sums of postings ported of sums of postings DATE/today of
changes postings in before period end before period end sums of post-
(with interval minus value at pe- minus value at pe- ings
report riod starts of sums riod starts of sums
inter- of all postings be- of all postings be-
val) fore period start fore period start
end sums of value at period ends not sup- value at period ends value at
bal- costs of of sums of all post- ported of sums of all post- DATE/today of
ances postings ings before period ings before period sums of post-
(with from report end (minus value at end (minus value at ings
report start (or report start of of report start of of
inter- before re- sums of all postings sums of all postings
val and port start before report start before report start
--cumu- with -H) and with --cumulative) with --cumulative)
lative interval end
or -H)
start- sums of value at report not sup- value at report sums of post-
ing costs of start of sums of all ported start of sums of all ings before
bal- postings be- postings before re- postings before re- report start
ances fore report port start port start
(with start
report
inter-
val and
-H)
budget like bal- like balances not sup- like balances like balances
amounts ances ported
with
--bud-
get
grand sum of dis- sum of displayed not sup- sum of displayed sum of dis-
total played val- values ported values played values
(no re- ues
port
inter-
val)
(bs, bse,
cf, is)
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
today of sums nal end of sums of post-
of postings sums of post- ings
ings
budget like balance like balance not sup- like balances like balance
amounts changes changes ported changes
(--budget)
grand total sum of dis- sum of dis- not sup- sum of dis- sum of dis-
played values played values ported played values played values
balance
(bs, bse,
cf, is)
with report
interval
starting sums of costs value at re- not sup- value at re- sums of post-
balances of postings port start of ported port start of ings before
(-H) before report sums of all sums of all report start
start postings be- postings be-
fore report fore report
start start
balance sums of costs same as not sup- balance value at
changes of postings --value=end ported change in DATE/today of
(bal, is, in period each period, sums of post-
bs valued at pe- ings
--change, riod ends
cf
--change)
end bal- sums of costs same as not sup- period end value at
ances (bal of postings --value=end ported balances, DATE/today of
-H, is --H, from before valued at pe- sums of post-
bs, cf) report start riod ends ings
to period end
budget like balance like balance not sup- like balances like balance
amounts changes/end changes/end ported changes/end
(--budget) balances balances balances
row totals, sums, aver- sums, aver- not sup- sums, aver- sums, aver-
row aver- ages of dis- ages of dis- ported ages of dis- ages of dis-
ages (-T, played values played values played values played values
-A)
column to- sums of dis- sums of dis- not sup- sums of dis- sums of dis-
tals played values played values ported played values played values
grand to- sum, average sum, average not sup- sum, average sum, average
tal, grand of column to- of column to- ported of column to- of column to-
average tals tals tals tals
row to- sums/aver- sums/averages of not sup- sums/averages of sums/averages
tals/av- ages of dis- displayed values ported displayed values of displayed
erages played val- values
(with ues
report
inter-
val)
column sums of dis- sums of displayed not sup- sums of displayed sums of dis-
totals played val- values ported values played values
ues
grand sum/average sum/average of col- not sup- sum/average of col- sum/average
to- of column umn totals ported umn totals of column to-
tal/av- totals tals
erage
--cumulative is omitted to save space, it works like -H but with a zero
starting balance.
Glossary:
@ -3257,12 +3235,15 @@ COMMANDS
period requested. Both rates of return are annualized before display,
regardless of the length of reporting interval.
An example: https://github.com/simonmichael/hledger/blob/master/exam-
ples/roi-unrealised.ledger
stats
stats
Show some journal statistics.
The stats command displays summary information for the whole journal,
or a matched part of it. With a reporting interval, it shows a report
The stats command displays summary information for the whole journal,
or a matched part of it. With a reporting interval, it shows a report
for each report period.
Example:
@ -3280,35 +3261,35 @@ COMMANDS
Commodities : 1 ($)
Market prices : 12 ($)
This command also supports output destination and output format selec-
This command also supports output destination and output format selec-
tion.
tags
tags
List the unique tag names used in the journal. With a TAGREGEX argu-
List the unique tag names used in the journal. With a TAGREGEX argu-
ment, only tag names matching the regular expression (case insensitive)
are shown. With QUERY arguments, only transactions matching the query
are shown. With QUERY arguments, only transactions matching the query
are considered.
With the --values flag, the tags' unique values are listed instead.
With --parsed flag, all tags or values are shown in the order they are
With --parsed flag, all tags or values are shown in the order they are
parsed from the input data, including duplicates.
With -E/--empty, any blank/empty values will also be shown, otherwise
With -E/--empty, any blank/empty values will also be shown, otherwise
they are omitted.
test
test
Run built-in unit tests.
This command runs the unit tests built in to hledger and hledger-lib,
printing the results on stdout. If any test fails, the exit code will
This command runs the unit tests built in to hledger and hledger-lib,
printing the results on stdout. If any test fails, the exit code will
be non-zero.
This is mainly used by hledger developers, but you can also use it to
sanity-check the installed hledger executable on your platform. All
tests are expected to pass - if you ever see a failure, please report
This is mainly used by hledger developers, but you can also use it to
sanity-check the installed hledger executable on your platform. All
tests are expected to pass - if you ever see a failure, please report
as a bug!
This command also accepts tasty test runner options, written after a --
@ -3317,35 +3298,35 @@ COMMANDS
$ hledger test -- -pData.Amount --color=never
For help on these, see https://github.com/feuerbach/tasty#options (--
For help on these, see https://github.com/feuerbach/tasty#options (--
--help currently doesn't show them).
Add-on commands
hledger also searches for external add-on commands, and will include
hledger also searches for external add-on commands, and will include
these in the commands list. These are programs or scripts in your PATH
whose name starts with hledger- and ends with a recognised file exten-
whose name starts with hledger- and ends with a recognised file exten-
sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh).
Add-ons can be invoked like any hledger command, but there are a few
Add-ons can be invoked like any hledger command, but there are a few
things to be aware of. Eg if the hledger-web add-on is installed,
o hledger -h web shows hledger's help, while hledger web -h shows
o hledger -h web shows hledger's help, while hledger web -h shows
hledger-web's help.
o Flags specific to the add-on must have a preceding -- to hide them
from hledger. So hledger web --serve --port 9000 will be rejected;
o Flags specific to the add-on must have a preceding -- to hide them
from hledger. So hledger web --serve --port 9000 will be rejected;
you must use hledger web -- --serve --port 9000.
o You can always run add-ons directly if preferred: hledger-web --serve
--port 9000.
Add-ons are a relatively easy way to add local features or experiment
with new ideas. They can be written in any language, but haskell
scripts have a big advantage: they can use the same hledger (and
haskell) library functions that built-in commands do, for command-line
Add-ons are a relatively easy way to add local features or experiment
with new ideas. They can be written in any language, but haskell
scripts have a big advantage: they can use the same hledger (and
haskell) library functions that built-in commands do, for command-line
options, journal parsing, reporting, etc.
Two important add-ons are the hledger-ui and hledger-web user inter-
Two important add-ons are the hledger-ui and hledger-web user inter-
faces. These are maintained and released along with hledger:
ui
@ -3364,20 +3345,20 @@ COMMANDS
hledger-interest generates interest transactions for an account accord-
ing to various schemes.
A few more experimental or old add-ons can be found in hledger's bin/
A few more experimental or old add-ons can be found in hledger's bin/
directory. These are typically prototypes and not guaranteed to work.
ENVIRONMENT
LEDGER_FILE The journal file path when not specified with -f. Default:
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
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-
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-
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
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-
vironment.plist file containing
@ -3387,21 +3368,21 @@ ENVIRONMENT
To see the effect you may need to killall Dock, or reboot.
COLUMNS The screen width used by the register command. Default: the
COLUMNS The screen width used by the register command. Default: the
full terminal width.
NO_COLOR If this variable exists with any value, hledger will not use
ANSI color codes in terminal output. This overrides the
NO_COLOR If this variable exists with any value, hledger will not use
ANSI color codes in terminal output. This overrides the
--color/--colour option.
FILES
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
LIMITATIONS
The need to precede addon command options with -- when invoked from
The need to precede addon command options with -- when invoked from
hledger is awkward.
When input data contains non-ascii characters, a suitable system locale
@ -3417,36 +3398,36 @@ LIMITATIONS
In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger
add.
Not all of Ledger's journal file syntax is supported. See file format
Not all of Ledger's journal file syntax is supported. See file format
differences.
On large data files, hledger is slower and uses more memory than
On large data files, hledger is slower and uses more memory than
Ledger.
TROUBLESHOOTING
Here are some issues you might encounter when you run hledger (and re-
member you can also seek help from the IRC channel, mail list or bug
Here are some issues you might encounter when you run hledger (and re-
member you can also seek help from the IRC channel, mail list or bug
tracker):
Successfully installed, but "No command 'hledger' found"
stack and cabal install binaries into a special directory, which should
be added to your PATH environment variable. Eg on unix-like systems,
be added to your PATH environment variable. Eg on unix-like systems,
that is ~/.local/bin and ~/.cabal/bin respectively.
I set a custom LEDGER_FILE, but hledger is still using the default file
LEDGER_FILE should be a real environment variable, not just a shell
variable. The command env | grep LEDGER_FILE should show it. You may
LEDGER_FILE should be a real environment variable, not just a shell
variable. The command env | grep LEDGER_FILE should show it. You may
need to use export. Here's an explanation.
Getting errors like "Illegal byte sequence" or "Invalid or incomplete
multibyte or wide character" or "commitAndReleaseBuffer: invalid argu-
Getting errors like "Illegal byte sequence" or "Invalid or incomplete
multibyte or wide character" or "commitAndReleaseBuffer: invalid argu-
ment (invalid character)"
Programs compiled with GHC (hledger, haskell build tools, etc.) need to
have a UTF-8-aware locale configured in the environment, otherwise they
will fail with these kinds of errors when they encounter non-ascii
will fail with these kinds of errors when they encounter non-ascii
characters.
To fix it, set the LANG environment variable to some locale which sup-
To fix it, set the LANG environment variable to some locale which sup-
ports UTF-8. The locale you choose must be installed on your system.
Here's an example of setting LANG temporarily, on Ubuntu GNU/Linux:
@ -3461,8 +3442,8 @@ TROUBLESHOOTING
POSIX
$ LANG=en_US.utf8 hledger -f my.journal print # ensure it is used for this command
If available, C.UTF-8 will also work. If your preferred locale isn't
listed by locale -a, you might need to install it. Eg on Ubuntu/De-
If available, C.UTF-8 will also work. If your preferred locale isn't
listed by locale -a, you might need to install it. Eg on Ubuntu/De-
bian:
$ apt-get install language-pack-fr
@ -3482,8 +3463,8 @@ TROUBLESHOOTING
$ echo "export LANG=en_US.utf8" >>~/.bash_profile
$ bash --login
Exact spelling and capitalisation may be important. Note the differ-
ence on MacOS (UTF-8, not utf8). Some platforms (eg ubuntu) allow
Exact spelling and capitalisation may be important. Note the differ-
ence on MacOS (UTF-8, not utf8). Some platforms (eg ubuntu) allow
variant spellings, but others (eg macos) require it to be exact:
$ locale -a | grep -iE en_us.*utf
@ -3493,7 +3474,7 @@ TROUBLESHOOTING
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)
@ -3507,7 +3488,7 @@ COPYRIGHT
SEE ALSO
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1)
@ -3515,4 +3496,4 @@ SEE ALSO
hledger 1.19.99 October 2020 hledger(1)
hledger 1.19.99 November 2020 hledger(1)