;doc: update manuals

This commit is contained in:
Simon Michael 2024-01-12 13:52:11 -10:00
parent ebda894b23
commit 352b0bc1b5
13 changed files with 4475 additions and 4265 deletions

View File

@ -1,2 +1,2 @@
m4_dnl Date to show in man pages. Updated by "Shake manuals" m4_dnl Date to show in man pages. Updated by "Shake manuals"
m4_define({{_monthyear_}}, {{December 2023}})m4_dnl m4_define({{_monthyear_}}, {{January 2024}})m4_dnl

View File

@ -1,2 +1,2 @@
m4_dnl Date to show in man pages. Updated by "Shake manuals" m4_dnl Date to show in man pages. Updated by "Shake manuals"
m4_define({{_monthyear_}}, {{December 2023}})m4_dnl m4_define({{_monthyear_}}, {{January 2024}})m4_dnl

View File

@ -1,241 +1,241 @@
.TH "HLEDGER-UI" "1" "December 2023" "hledger-ui-1.32.99 " "hledger User Manuals" .TH "HLEDGER\-UI" "1" "January 2024" "hledger-ui-1.32.99 " "hledger User Manuals"
.SH NAME .SH NAME
hledger-ui - robust, friendly plain text accounting (TUI version) hledger\-ui \- robust, friendly plain text accounting (TUI version)
.SH SYNOPSIS .SH SYNOPSIS
\f[CR]hledger-ui [OPTS] [QUERYARGS]\f[R] \f[CR]hledger\-ui [OPTS] [QUERYARGS]\f[R]
.PD 0 .PD 0
.P .P
.PD .PD
\f[CR]hledger ui -- [OPTS] [QUERYARGS]\f[R] \f[CR]hledger ui \-\- [OPTS] [QUERYARGS]\f[R]
.SH DESCRIPTION .SH DESCRIPTION
This manual is for hledger\[aq]s terminal interface, version 1.32.99. This manual is for hledger\[aq]s terminal interface, version 1.32.99.
See also the hledger manual for common concepts and file formats. See also the hledger manual for common concepts and file formats.
.PP .PP
hledger is a robust, user-friendly, cross-platform set of programs for hledger is a robust, user\-friendly, cross\-platform set of programs for
tracking money, time, or any other commodity, using double-entry tracking money, time, or any other commodity, using double\-entry
accounting and a simple, editable file format. accounting and a simple, editable file format.
hledger is inspired by and largely compatible with ledger(1), and hledger is inspired by and largely compatible with ledger(1), and
largely interconvertible with beancount(1). largely interconvertible with beancount(1).
.PP .PP
hledger-ui is hledger\[aq]s terminal interface, providing an efficient hledger\-ui is hledger\[aq]s terminal interface, providing an efficient
full-window text UI for viewing accounts and transactions, and some full\-window text UI for viewing accounts and transactions, and some
limited data entry capability. limited data entry capability.
It is easier than hledger\[aq]s command-line interface, and sometimes It is easier than hledger\[aq]s command\-line interface, and sometimes
quicker and more convenient than the web interface. quicker and more convenient than the web interface.
.PP .PP
Like hledger, it reads from (and appends to) a journal file specified by Like hledger, it reads from (and appends to) a journal file specified by
the \f[CR]LEDGER_FILE\f[R] environment variable (defaulting to the \f[CR]LEDGER_FILE\f[R] environment variable (defaulting to
\f[CR]$HOME/.hledger.journal\f[R]); or you can specify files with \f[CR]$HOME/.hledger.journal\f[R]); or you can specify files with
\f[CR]-f\f[R] options. \f[CR]\-f\f[R] options.
It can also read timeclock files, timedot files, or any CSV/SSV/TSV file It can also read timeclock files, timedot files, or any CSV/SSV/TSV file
with a date field. with a date field.
(See hledger(1) -> Input for details.) (See hledger(1) \-> Input for details.)
.PP .PP
Unlike hledger, hledger-ui hides all future-dated transactions by Unlike hledger, hledger\-ui hides all future\-dated transactions by
default. default.
They can be revealed, along with any rule-generated periodic They can be revealed, along with any rule\-generated periodic
transactions, by pressing the F key (or starting with --forecast) to transactions, by pressing the F key (or starting with \-\-forecast) to
enable \[dq]forecast mode\[dq]. enable \[dq]forecast mode\[dq].
.SH OPTIONS .SH OPTIONS
Any QUERYARGS are interpreted as a hledger search query which filters Any QUERYARGS are interpreted as a hledger search query which filters
the data. the data.
.PP .PP
hledger-ui provides the following options: hledger\-ui provides the following options:
.TP .TP
\f[CR]-w --watch\f[R] \f[CR]\-w \-\-watch\f[R]
watch for data and date changes and reload automatically watch for data and date changes and reload automatically
.TP .TP
\f[CR]--theme=default|terminal|greenterm\f[R] \f[CR]\-\-theme=default|terminal|greenterm\f[R]
use this custom display theme use this custom display theme
.TP .TP
\f[CR]--menu\f[R] \f[CR]\-\-menu\f[R]
start in the menu screen start in the menu screen
.TP .TP
\f[CR]--cash\f[R] \f[CR]\-\-cash\f[R]
start in the cash accounts screen start in the cash accounts screen
.TP .TP
\f[CR]--bs\f[R] \f[CR]\-\-bs\f[R]
start in the balance sheet accounts screen start in the balance sheet accounts screen
.TP .TP
\f[CR]--is\f[R] \f[CR]\-\-is\f[R]
start in the income statement accounts screen start in the income statement accounts screen
.TP .TP
\f[CR]--all\f[R] \f[CR]\-\-all\f[R]
start in the all accounts screen start in the all accounts screen
.TP .TP
\f[CR]--register=ACCTREGEX\f[R] \f[CR]\-\-register=ACCTREGEX\f[R]
start in the (first) matched account\[aq]s register screen start in the (first) matched account\[aq]s register screen
.TP .TP
\f[CR]--change\f[R] \f[CR]\-\-change\f[R]
show period balances (changes) at startup instead of historical balances show period balances (changes) at startup instead of historical balances
.TP .TP
\f[CR]-l --flat\f[R] \f[CR]\-l \-\-flat\f[R]
show accounts as a flat list (default) show accounts as a flat list (default)
.TP .TP
\f[CR]-t --tree\f[R] \f[CR]\-t \-\-tree\f[R]
show accounts as a tree show accounts as a tree
.PP .PP
hledger-ui also supports many of hledger\[aq]s general options (and the hledger\-ui also supports many of hledger\[aq]s general options (and the
hledger manual\[aq]s command line tips also apply here): hledger manual\[aq]s command line tips also apply here):
.SS General help options .SS General help options
.TP .TP
\f[CR]-h --help\f[R] \f[CR]\-h \-\-help\f[R]
show general or COMMAND help show general or COMMAND help
.TP .TP
\f[CR]--man\f[R] \f[CR]\-\-man\f[R]
show general or COMMAND user manual with man show general or COMMAND user manual with man
.TP .TP
\f[CR]--info\f[R] \f[CR]\-\-info\f[R]
show general or COMMAND user manual with info show general or COMMAND user manual with info
.TP .TP
\f[CR]--version\f[R] \f[CR]\-\-version\f[R]
show general or ADDONCMD version show general or ADDONCMD version
.TP .TP
\f[CR]--debug[=N]\f[R] \f[CR]\-\-debug[=N]\f[R]
show debug output (levels 1-9, default: 1) show debug output (levels 1\-9, default: 1)
.SS General input options .SS General input options
.TP .TP
\f[CR]-f FILE --file=FILE\f[R] \f[CR]\-f FILE \-\-file=FILE\f[R]
use a different input file. use a different input file.
For stdin, use - (default: \f[CR]$LEDGER_FILE\f[R] or For stdin, use \- (default: \f[CR]$LEDGER_FILE\f[R] or
\f[CR]$HOME/.hledger.journal\f[R]) \f[CR]$HOME/.hledger.journal\f[R])
.TP .TP
\f[CR]--rules-file=RULESFILE\f[R] \f[CR]\-\-rules\-file=RULESFILE\f[R]
Conversion rules file to use when reading CSV (default: FILE.rules) Conversion rules file to use when reading CSV (default: FILE.rules)
.TP .TP
\f[CR]--separator=CHAR\f[R] \f[CR]\-\-separator=CHAR\f[R]
Field separator to expect when reading CSV (default: \[aq],\[aq]) Field separator to expect when reading CSV (default: \[aq],\[aq])
.TP .TP
\f[CR]--alias=OLD=NEW\f[R] \f[CR]\-\-alias=OLD=NEW\f[R]
rename accounts named OLD to NEW rename accounts named OLD to NEW
.TP .TP
\f[CR]--anon\f[R] \f[CR]\-\-anon\f[R]
anonymize accounts and payees anonymize accounts and payees
.TP .TP
\f[CR]--pivot FIELDNAME\f[R] \f[CR]\-\-pivot FIELDNAME\f[R]
use some other field or tag for the account name use some other field or tag for the account name
.TP .TP
\f[CR]-I --ignore-assertions\f[R] \f[CR]\-I \-\-ignore\-assertions\f[R]
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
.TP .TP
\f[CR]-s --strict\f[R] \f[CR]\-s \-\-strict\f[R]
do extra error checking (check that all posted accounts are declared) do extra error checking (check that all posted accounts are declared)
.SS General reporting options .SS General reporting options
.TP .TP
\f[CR]-b --begin=DATE\f[R] \f[CR]\-b \-\-begin=DATE\f[R]
include postings/txns on or after this date (will be adjusted to include postings/txns on or after this date (will be adjusted to
preceding subperiod start when using a report interval) preceding subperiod start when using a report interval)
.TP .TP
\f[CR]-e --end=DATE\f[R] \f[CR]\-e \-\-end=DATE\f[R]
include postings/txns before this date (will be adjusted to following include postings/txns before this date (will be adjusted to following
subperiod end when using a report interval) subperiod end when using a report interval)
.TP .TP
\f[CR]-D --daily\f[R] \f[CR]\-D \-\-daily\f[R]
multiperiod/multicolumn report by day multiperiod/multicolumn report by day
.TP .TP
\f[CR]-W --weekly\f[R] \f[CR]\-W \-\-weekly\f[R]
multiperiod/multicolumn report by week multiperiod/multicolumn report by week
.TP .TP
\f[CR]-M --monthly\f[R] \f[CR]\-M \-\-monthly\f[R]
multiperiod/multicolumn report by month multiperiod/multicolumn report by month
.TP .TP
\f[CR]-Q --quarterly\f[R] \f[CR]\-Q \-\-quarterly\f[R]
multiperiod/multicolumn report by quarter multiperiod/multicolumn report by quarter
.TP .TP
\f[CR]-Y --yearly\f[R] \f[CR]\-Y \-\-yearly\f[R]
multiperiod/multicolumn report by year multiperiod/multicolumn report by year
.TP .TP
\f[CR]-p --period=PERIODEXP\f[R] \f[CR]\-p \-\-period=PERIODEXP\f[R]
set start date, end date, and/or reporting interval all at once using set start date, end date, and/or reporting interval all at once using
period expressions syntax period expressions syntax
.TP .TP
\f[CR]--date2\f[R] \f[CR]\-\-date2\f[R]
match the secondary date instead (see command help for other effects) match the secondary date instead (see command help for other effects)
.TP .TP
\f[CR]--today=DATE\f[R] \f[CR]\-\-today=DATE\f[R]
override today\[aq]s date (affects relative smart dates, for override today\[aq]s date (affects relative smart dates, for
tests/examples) tests/examples)
.TP .TP
\f[CR]-U --unmarked\f[R] \f[CR]\-U \-\-unmarked\f[R]
include only unmarked postings/txns (can combine with -P or -C) include only unmarked postings/txns (can combine with \-P or \-C)
.TP .TP
\f[CR]-P --pending\f[R] \f[CR]\-P \-\-pending\f[R]
include only pending postings/txns include only pending postings/txns
.TP .TP
\f[CR]-C --cleared\f[R] \f[CR]\-C \-\-cleared\f[R]
include only cleared postings/txns include only cleared postings/txns
.TP .TP
\f[CR]-R --real\f[R] \f[CR]\-R \-\-real\f[R]
include only non-virtual postings include only non\-virtual postings
.TP .TP
\f[CR]-NUM --depth=NUM\f[R] \f[CR]\-NUM \-\-depth=NUM\f[R]
hide/aggregate accounts or postings more than NUM levels deep hide/aggregate accounts or postings more than NUM levels deep
.TP .TP
\f[CR]-E --empty\f[R] \f[CR]\-E \-\-empty\f[R]
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)
.TP .TP
\f[CR]-B --cost\f[R] \f[CR]\-B \-\-cost\f[R]
convert amounts to their cost/selling amount at transaction time convert amounts to their cost/selling amount at transaction time
.TP .TP
\f[CR]-V --market\f[R] \f[CR]\-V \-\-market\f[R]
convert amounts to their market value in default valuation commodities convert amounts to their market value in default valuation commodities
.TP .TP
\f[CR]-X --exchange=COMM\f[R] \f[CR]\-X \-\-exchange=COMM\f[R]
convert amounts to their market value in commodity COMM convert amounts to their market value in commodity COMM
.TP .TP
\f[CR]--value\f[R] \f[CR]\-\-value\f[R]
convert amounts to cost or market value, more flexibly than -B/-V/-X convert amounts to cost or market value, more flexibly than \-B/\-V/\-X
.TP .TP
\f[CR]--infer-equity\f[R] \f[CR]\-\-infer\-equity\f[R]
infer conversion equity postings from costs infer conversion equity postings from costs
.TP .TP
\f[CR]--infer-costs\f[R] \f[CR]\-\-infer\-costs\f[R]
infer costs from conversion equity postings infer costs from conversion equity postings
.TP .TP
\f[CR]--infer-market-prices\f[R] \f[CR]\-\-infer\-market\-prices\f[R]
use costs as additional market prices, as if they were P directives use costs as additional market prices, as if they were P directives
.TP .TP
\f[CR]--forecast\f[R] \f[CR]\-\-forecast\f[R]
generate transactions from periodic rules, generate transactions from periodic rules,
between the latest recorded txn and 6 months from today, between the latest recorded txn and 6 months from today,
or during the specified PERIOD (= is required). or during the specified PERIOD (= is required).
Auto posting rules will be applied to these transactions as well. Auto posting rules will be applied to these transactions as well.
Also, in hledger-ui make future-dated transactions visible. Also, in hledger\-ui make future\-dated transactions visible.
.TP .TP
\f[CR]--auto\f[R] \f[CR]\-\-auto\f[R]
generate extra postings by applying auto posting rules to all txns (not generate extra postings by applying auto posting rules to all txns (not
just forecast txns) just forecast txns)
.TP .TP
\f[CR]--verbose-tags\f[R] \f[CR]\-\-verbose\-tags\f[R]
add visible tags indicating transactions or postings which have been add visible tags indicating transactions or postings which have been
generated/modified generated/modified
.TP .TP
\f[CR]--commodity-style\f[R] \f[CR]\-\-commodity\-style\f[R]
Override the commodity style in the output for the specified commodity. Override the commodity style in the output for the specified commodity.
For example \[aq]EUR1.000,00\[aq]. For example \[aq]EUR1.000,00\[aq].
.TP .TP
\f[CR]--color=WHEN (or --colour=WHEN)\f[R] \f[CR]\-\-color=WHEN (or \-\-colour=WHEN)\f[R]
Should color-supporting commands use ANSI color codes in text output. Should color\-supporting commands use ANSI color codes in text output.
\[aq]auto\[aq] (default): whenever stdout seems to be a color-supporting \[aq]auto\[aq] (default): whenever stdout seems to be a
terminal. color\-supporting terminal.
\[aq]always\[aq] or \[aq]yes\[aq]: always, useful eg when piping output \[aq]always\[aq] or \[aq]yes\[aq]: always, useful eg when piping output
into \[aq]less -R\[aq]. into \[aq]less \-R\[aq].
\[aq]never\[aq] or \[aq]no\[aq]: never. \[aq]never\[aq] or \[aq]no\[aq]: never.
A NO_COLOR environment variable overrides this. A NO_COLOR environment variable overrides this.
.TP .TP
\f[CR]--pretty[=WHEN]\f[R] \f[CR]\-\-pretty[=WHEN]\f[R]
Show prettier output, e.g. Show prettier output, e.g.
using unicode box-drawing characters. using unicode box\-drawing characters.
Accepts \[aq]yes\[aq] (the default) or \[aq]no\[aq] (\[aq]y\[aq], Accepts \[aq]yes\[aq] (the default) or \[aq]no\[aq] (\[aq]y\[aq],
\[aq]n\[aq], \[aq]always\[aq], \[aq]never\[aq] also work). \[aq]n\[aq], \[aq]always\[aq], \[aq]never\[aq] also work).
If you provide an argument you must use \[aq]=\[aq], e.g. If you provide an argument you must use \[aq]=\[aq], e.g.
\[aq]--pretty=yes\[aq]. \[aq]\-\-pretty=yes\[aq].
.PP .PP
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
last one takes precedence. last one takes precedence.
@ -264,9 +264,9 @@ The cursor keys navigate: \f[CR]RIGHT\f[R] or \f[CR]ENTER\f[R] goes
deeper, \f[CR]LEFT\f[R] returns to the previous screen, deeper, \f[CR]LEFT\f[R] returns to the previous screen,
\f[CR]UP\f[R]/\f[CR]DOWN\f[R]/\f[CR]PGUP\f[R]/\f[CR]PGDN\f[R]/\f[CR]HOME\f[R]/\f[CR]END\f[R] \f[CR]UP\f[R]/\f[CR]DOWN\f[R]/\f[CR]PGUP\f[R]/\f[CR]PGDN\f[R]/\f[CR]HOME\f[R]/\f[CR]END\f[R]
move up and down through lists. move up and down through lists.
Emacs-style Emacs\-style
(\f[CR]CTRL-p\f[R]/\f[CR]CTRL-n\f[R]/\f[CR]CTRL-f\f[R]/\f[CR]CTRL-b\f[R]) (\f[CR]CTRL\-p\f[R]/\f[CR]CTRL\-n\f[R]/\f[CR]CTRL\-f\f[R]/\f[CR]CTRL\-b\f[R])
and VI-style (\f[CR]k\f[R],\f[CR]j\f[R],\f[CR]l\f[R],\f[CR]h\f[R]) and VI\-style (\f[CR]k\f[R],\f[CR]j\f[R],\f[CR]l\f[R],\f[CR]h\f[R])
movement keys are also supported. movement keys are also supported.
A tip: movement speed is limited by your keyboard repeat rate, to move A tip: movement speed is limited by your keyboard repeat rate, to move
faster you may want to adjust it. faster you may want to adjust it.
@ -274,36 +274,36 @@ faster you may want to adjust it.
.PP .PP
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). the transactions to be shown (by default, all are shown).
\f[CR]SHIFT-DOWN/UP\f[R] steps downward and upward through these \f[CR]SHIFT\-DOWN/UP\f[R] steps downward and upward through these
standard report period durations: year, quarter, month, week, day. standard report period durations: year, quarter, month, week, day.
Then, \f[CR]SHIFT-LEFT/RIGHT\f[R] moves to the previous/next period. Then, \f[CR]SHIFT\-LEFT/RIGHT\f[R] moves to the previous/next period.
\f[CR]T\f[R] sets the report period to today. \f[CR]T\f[R] sets the report period to today.
With the \f[CR]-w/--watch\f[R] option, when viewing a \[dq]current\[dq] With the \f[CR]\-w/\-\-watch\f[R] option, when viewing a
period (the current day, week, month, quarter, or year), the period will \[dq]current\[dq] period (the current day, week, month, quarter, or
move automatically to track the current date. year), the period will move automatically to track the current date.
To set a non-standard period, you can use \f[CR]/\f[R] and a To set a non\-standard period, you can use \f[CR]/\f[R] and a
\f[CR]date:\f[R] query. \f[CR]date:\f[R] query.
.PP .PP
(Mac users: SHIFT-DOWN/UP keys do not work by default in Terminal, as of (Mac users: SHIFT\-DOWN/UP keys do not work by default in Terminal, as
MacOS Monterey. of MacOS Monterey.
You can configure them as follows: open Terminal, press CMD-comma to You can configure them as follows: open Terminal, press CMD\-comma to
open preferences, click Profiles, select your current terminal profile open preferences, click Profiles, select your current terminal profile
on the left, click Keyboard on the right, click + and add this for on the left, click Keyboard on the right, click + and add this for
Shift-Down: \f[CR]\[rs]033[1;2B\f[R], click + and add this for Shift-Up: Shift\-Down: \f[CR]\[rs]033[1;2B\f[R], click + and add this for
\f[CR]\[rs]033[1;2A\f[R]. Shift\-Up: \f[CR]\[rs]033[1;2A\f[R].
Press the Escape key to enter the \f[CR]\[rs]033\f[R] part, you Press the Escape key to enter the \f[CR]\[rs]033\f[R] part, you
can\[aq]t type it directly.) can\[aq]t type it directly.)
.PP .PP
\f[CR]/\f[R] lets you set a general filter query limiting the data \f[CR]/\f[R] lets you set a general filter query limiting the data
shown, using the same query terms as in hledger and hledger-web. shown, using 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; While editing the query, you can use CTRL\-a/e/d/k, BS, cursor keys;
press \f[CR]ENTER\f[R] to set it, or \f[CR]ESCAPE\f[R]to cancel. press \f[CR]ENTER\f[R] to set it, or \f[CR]ESCAPE\f[R]to cancel.
There are also keys for quickly adjusting some common filters like There are also keys for quickly adjusting some common filters like
account depth and transaction status (see below). account depth and transaction status (see below).
\f[CR]BACKSPACE\f[R] or \f[CR]DELETE\f[R] removes all filters, showing \f[CR]BACKSPACE\f[R] or \f[CR]DELETE\f[R] removes all filters, showing
all transactions. all transactions.
.PP .PP
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 both ordinary transactions recorded in the journal, and periodic
transactions generated by rule. transactions generated by rule.
\f[CR]F\f[R] toggles forecast mode, in which future/forecasted \f[CR]F\f[R] toggles forecast mode, in which future/forecasted
@ -313,7 +313,7 @@ transactions are shown.
restoring the app\[aq]s initial state at startup. restoring the app\[aq]s initial state at startup.
Or, it cancels minibuffer data entry or the help dialog. Or, it cancels minibuffer data entry or the help dialog.
.PP .PP
\f[CR]CTRL-l\f[R] redraws the screen and centers the selection if \f[CR]CTRL\-l\f[R] redraws the screen and centers the selection if
possible (selections near the top won\[aq]t be centered, since we possible (selections near the top won\[aq]t be centered, since we
don\[aq]t scroll above the top). don\[aq]t scroll above the top).
.PP .PP
@ -325,17 +325,17 @@ screen and any previous screens.
Disabling balance assertions temporarily can be useful for Disabling balance assertions temporarily can be useful for
troubleshooting. troubleshooting.
.PP .PP
\f[CR]a\f[R] runs command-line hledger\[aq]s add command, and reloads \f[CR]a\f[R] runs command\-line hledger\[aq]s add command, and reloads
the updated file. the updated file.
This allows some basic data entry. This allows some basic data entry.
.PP .PP
\f[CR]A\f[R] is like \f[CR]a\f[R], but runs the hledger-iadd tool, which \f[CR]A\f[R] is like \f[CR]a\f[R], but runs the hledger\-iadd tool,
provides a terminal interface. which provides a terminal interface.
This key will be available if \f[CR]hledger-iadd\f[R] is installed in This key will be available if \f[CR]hledger\-iadd\f[R] is installed in
$path. $path.
.PP .PP
\f[CR]E\f[R] runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default \f[CR]E\f[R] runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default
(\f[CR]emacsclient -a \[dq]\[dq] -nw\f[R]) on the journal file. (\f[CR]emacsclient \-a \[dq]\[dq] \-nw\f[R]) on the journal file.
With some editors (emacs, vi), the cursor will be positioned at the With some editors (emacs, vi), the cursor will be positioned at the
current transaction when invoked from the register and transaction current transaction when invoked from the register and transaction
screens, and at the error location (if possible) when invoked from the screens, and at the error location (if possible) when invoked from the
@ -349,37 +349,37 @@ market value (see hledger manual > Valuation flag).
More specifically, More specifically,
.IP "1." 3 .IP "1." 3
By default, the \f[CR]V\f[R] key toggles showing end value By default, the \f[CR]V\f[R] key toggles showing end value
(\f[CR]--value=end\f[R]) on or off. (\f[CR]\-\-value=end\f[R]) on or off.
The valuation date will be the report end date if specified, otherwise The valuation date will be the report end date if specified, otherwise
today. today.
.IP "2." 3 .IP "2." 3
If you started hledger-ui with some other valuation (such as If you started hledger\-ui with some other valuation (such as
\f[CR]--value=then,EUR\f[R]), the \f[CR]V\f[R] key toggles that off or \f[CR]\-\-value=then,EUR\f[R]), the \f[CR]V\f[R] key toggles that off or
on. on.
.PP .PP
Cost/value tips: - When showing end value, you can change the report end Cost/value tips: \- When showing end value, you can change the report
date without restarting, by pressing \f[CR]/\f[R] and adding a query end date without restarting, by pressing \f[CR]/\f[R] and adding a query
like \f[CR]date:..YYYY-MM-DD\f[R]. like \f[CR]date:..YYYY\-MM\-DD\f[R].
- Either cost mode, or value mode, can be active, but not both at once. \- Either cost mode, or value mode, can be active, but not both at once.
Cost mode takes precedence. Cost mode takes precedence.
- There\[aq]s not yet any visual indicator that cost or value mode is \- There\[aq]s not yet any visual indicator that cost or value mode is
active, other than the amount values. active, other than the amount values.
.PP .PP
\f[CR]q\f[R] quits the application. \f[CR]q\f[R] quits the application.
.PP .PP
Additional screen-specific keys are described below. Additional screen\-specific keys are described below.
.SH SCREENS .SH SCREENS
At startup, hledger-ui shows a menu screen by default. At startup, hledger\-ui shows a menu screen by default.
From here you can navigate to other screens using the cursor keys: From here you can navigate to other screens using the cursor keys:
\f[CR]UP\f[R]/\f[CR]DOWN\f[R] to select, \f[CR]RIGHT\f[R] to move to the \f[CR]UP\f[R]/\f[CR]DOWN\f[R] to select, \f[CR]RIGHT\f[R] to move to the
selected screen, \f[CR]LEFT\f[R] to return to the previous screen. selected screen, \f[CR]LEFT\f[R] to return to the previous screen.
Or you can use \f[CR]ESC\f[R] to return directly to the top menu screen. Or you can use \f[CR]ESC\f[R] to return directly to the top menu screen.
.PP .PP
You can also use a command line flag to specific a different startup You can also use a command line flag to specific a different startup
screen (\f[CR]--cs\f[R], \f[CR]--bs\f[R], \f[CR]--is\f[R], screen (\f[CR]\-\-cs\f[R], \f[CR]\-\-bs\f[R], \f[CR]\-\-is\f[R],
\f[CR]--all\f[R], or \f[CR]--register=ACCT\f[R]). \f[CR]\-\-all\f[R], or \f[CR]\-\-register=ACCT\f[R]).
.SS Menu .SS Menu
This is the top-most screen. This is the top\-most screen.
From here you can navigate to several screens listing accounts of From here you can navigate to several screens listing accounts of
various types. various types.
Note some of these may not show anything until you have configured Note some of these may not show anything until you have configured
@ -427,8 +427,8 @@ This will be the running historical balance (what you would see on a
bank\[aq]s website, eg) if not disturbed by a query. bank\[aq]s website, eg) if not disturbed by a query.
.RE .RE
.PP .PP
Note, this screen combines each transaction\[aq]s in-period postings to Note, this screen combines each transaction\[aq]s in\-period postings to
a single line item, dated with the earliest in-period transaction or a single line item, dated with the earliest in\-period transaction or
posting date (like hledger\[aq]s \f[CR]aregister\f[R]). posting date (like hledger\[aq]s \f[CR]aregister\f[R]).
So custom posting dates can cause the running balance to be temporarily So custom posting dates can cause the running balance to be temporarily
inaccurate. inaccurate.
@ -453,8 +453,8 @@ activate all three, the filter is removed.)
\f[CR]R\f[R] toggles real mode, in which virtual postings are ignored. \f[CR]R\f[R] toggles real mode, in which virtual postings are ignored.
.PP .PP
\f[CR]z\f[R] toggles nonzero mode, in which only transactions posting a \f[CR]z\f[R] toggles nonzero mode, in which only transactions posting a
nonzero change are shown (hledger-ui shows zero items by default, unlike nonzero change are shown (hledger\-ui shows zero items by default,
command-line hledger). unlike command\-line hledger).
.PP .PP
Press \f[CR]RIGHT\f[R] to view the selected transaction in detail. Press \f[CR]RIGHT\f[R] to view the selected transaction in detail.
.SS Transaction .SS Transaction
@ -482,12 +482,12 @@ your text editor with the cursor positioned at the current transaction
if possible. if possible.
.PP .PP
This screen has a limitation with showing file updates: it will not show This screen has a limitation with showing file updates: it will not show
them until you exit and re-enter it. them until you exit and re\-enter it.
So eg to see the effect of using the \f[CR]E\f[R] key, currently you So eg to see the effect of using the \f[CR]E\f[R] key, currently you
must: - press \f[CR]E\f[R], edit and save the file, then exit the must: \- press \f[CR]E\f[R], edit and save the file, then exit the
editor, returning to hledger-ui - press \f[CR]g\f[R] to reload the file editor, returning to hledger\-ui \- press \f[CR]g\f[R] to reload the
(or use \f[CR]-w/--watch\f[R] mode) - press \f[CR]LEFT\f[R] then file (or use \f[CR]\-w/\-\-watch\f[R] mode) \- press \f[CR]LEFT\f[R]
\f[CR]RIGHT\f[R] to exit and re-enter the transaction screen. then \f[CR]RIGHT\f[R] to exit and re\-enter the transaction screen.
.SS Error .SS Error
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. when you press g to reload.
@ -496,35 +496,35 @@ normal operation.
(Or, you can press escape to cancel the reload attempt.) (Or, you can press escape to cancel the reload attempt.)
.SH TIPS .SH TIPS
.SS Watch mode .SS Watch mode
One of hledger-ui\[aq]s best features is the auto-reloading One of hledger\-ui\[aq]s best features is the auto\-reloading
\f[CR]-w/--watch\f[R] mode. \f[CR]\-w/\-\-watch\f[R] mode.
With this flag, it will update the display automatically whenever With this flag, it will update the display automatically whenever
changes are saved to the data files. changes are saved to the data files.
.PP .PP
This is very useful when reconciling. This is very useful when reconciling.
A good workflow is to have your bank\[aq]s online register open in a A good workflow is to have your bank\[aq]s online register open in a
browser window, for reference; the journal file open in an editor browser window, for reference; the journal file open in an editor
window; and hledger-ui in watch mode in a terminal window, eg: window; and hledger\-ui in watch mode in a terminal window, eg:
.IP .IP
.EX .EX
$ hledger-ui --watch --register checking -C $ hledger\-ui \-\-watch \-\-register checking \-C
.EE .EE
.PP .PP
As you mark things cleared in the editor, you can see the effect As you mark things cleared in the editor, you can see the effect
immediately without having to context switch. immediately without having to context switch.
This leaves more mental bandwidth for your accounting. This leaves more mental bandwidth for your accounting.
Of course you can still interact with hledger-ui when needed, eg to Of course you can still interact with hledger\-ui when needed, eg to
toggle cleared mode, or to explore the history. toggle cleared mode, or to explore the history.
.PP .PP
There are currently some limitations with \f[CR]--watch\f[R]: There are currently some limitations with \f[CR]\-\-watch\f[R]:
.PP .PP
It may not work correctly for you, depending on platform or system It may not work correctly for you, depending on platform or system
configuration. configuration.
(Eg #836.) (Eg #836.)
.PP .PP
At least on mac, there can be a slow build-up of CPU usage over time, At least on mac, there can be a slow build\-up of CPU usage over time,
until the program is restarted (or, suspending and restarting with until the program is restarted (or, suspending and restarting with
\f[CR]CTRL-z\f[R] \f[CR]fg\f[R] may be enough). \f[CR]CTRL\-z\f[R] \f[CR]fg\f[R] may be enough).
.PP .PP
It will not detect file changes made by certain editors, such as It will not detect file changes made by certain editors, such as
Jetbrains IDEs or \f[CR]gedit\f[R], or on certain less common Jetbrains IDEs or \f[CR]gedit\f[R], or on certain less common
@ -536,17 +536,17 @@ know.)
If you are viewing files mounted from another machine, the system clocks If you are viewing files mounted from another machine, the system clocks
on both machines should be roughly in agreement. on both machines should be roughly in agreement.
.SS Debug output .SS Debug output
You can add \f[CR]--debug[=N]\f[R] to the command line to log debug You can add \f[CR]\-\-debug[=N]\f[R] to the command line to log debug
output. output.
This will be logged to the file \f[CR]hledger-ui.log\f[R] in the current This will be logged to the file \f[CR]hledger\-ui.log\f[R] in the
directory. current directory.
N ranges from 1 (least output, the default) to 9 (maximum output). N ranges from 1 (least output, the default) to 9 (maximum output).
.SH ENVIRONMENT .SH ENVIRONMENT
\f[B]COLUMNS\f[R] The screen width to use. \f[B]COLUMNS\f[R] The screen width to use.
Default: the full terminal width. Default: the full terminal width.
.PP .PP
\f[B]LEDGER_FILE\f[R] The main journal file to use when not specified \f[B]LEDGER_FILE\f[R] The main journal file to use when not specified
with \f[CR]-f/--file\f[R]. with \f[CR]\-f/\-\-file\f[R].
Default: \f[CR]$HOME/.hledger.journal\f[R]. Default: \f[CR]$HOME/.hledger.journal\f[R].
.SH BUGS .SH BUGS
We welcome bug reports in the hledger issue tracker (shortcut: We welcome bug reports in the hledger issue tracker (shortcut:
@ -555,15 +555,16 @@ http://bugs.hledger.org), or on the #hledger chat or hledger mail list
.PP .PP
Some known issues: Some known issues:
.PP .PP
\f[CR]-f-\f[R] doesn\[aq]t work (hledger-ui can\[aq]t read from stdin). \f[CR]\-f\-\f[R] doesn\[aq]t work (hledger\-ui can\[aq]t read from
stdin).
.PP .PP
If you press \f[CR]g\f[R] with large files, there could be a noticeable If you press \f[CR]g\f[R] with large files, there could be a noticeable
pause. pause.
.PP .PP
The Transaction screen does not update from file changes until you exit The Transaction screen does not update from file changes until you exit
and re-endter it (see SCREENS > Transaction above). and re\-endter it (see SCREENS > Transaction above).
.PP .PP
\f[CR]--watch\f[R] is not yet fully robust on all platforms (see Watch \f[CR]\-\-watch\f[R] is not yet fully robust on all platforms (see Watch
mode above). mode above).

View File

@ -1,4 +1,4 @@
This is hledger-ui.info, produced by makeinfo version 7.0.3 from stdin. This is hledger-ui.info, produced by makeinfo version 7.1 from stdin.
INFO-DIR-SECTION User Applications INFO-DIR-SECTION User Applications
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
@ -673,47 +673,47 @@ above).
 
Tag Table: Tag Table:
Node: Top223 Node: Top221
Node: OPTIONS1832 Node: OPTIONS1830
Ref: #options1930 Ref: #options1928
Node: General help options2953 Node: General help options2951
Ref: #general-help-options3102 Ref: #general-help-options3100
Node: General input options3384 Node: General input options3382
Ref: #general-input-options3569 Ref: #general-input-options3567
Node: General reporting options4271 Node: General reporting options4269
Ref: #general-reporting-options4435 Ref: #general-reporting-options4433
Node: MOUSE7825 Node: MOUSE7823
Ref: #mouse7920 Ref: #mouse7918
Node: KEYS8157 Node: KEYS8155
Ref: #keys8250 Ref: #keys8248
Node: SCREENS12905 Node: SCREENS12903
Ref: #screens13003 Ref: #screens13001
Node: Menu13583 Node: Menu13581
Ref: #menu13676 Ref: #menu13674
Node: Cash accounts13871 Node: Cash accounts13869
Ref: #cash-accounts14013 Ref: #cash-accounts14011
Node: Balance sheet accounts14197 Node: Balance sheet accounts14195
Ref: #balance-sheet-accounts14378 Ref: #balance-sheet-accounts14376
Node: Income statement accounts14498 Node: Income statement accounts14496
Ref: #income-statement-accounts14684 Ref: #income-statement-accounts14682
Node: All accounts14848 Node: All accounts14846
Ref: #all-accounts14994 Ref: #all-accounts14992
Node: Register15176 Node: Register15174
Ref: #register15300 Ref: #register15298
Node: Transaction17584 Node: Transaction17582
Ref: #transaction17707 Ref: #transaction17705
Node: Error19124 Node: Error19122
Ref: #error19218 Ref: #error19216
Node: TIPS19462 Node: TIPS19460
Ref: #tips19561 Ref: #tips19559
Node: Watch mode19603 Node: Watch mode19601
Ref: #watch-mode19710 Ref: #watch-mode19708
Node: Debug output21169 Node: Debug output21167
Ref: #debug-output21280 Ref: #debug-output21278
Node: ENVIRONMENT21492 Node: ENVIRONMENT21490
Ref: #environment21602 Ref: #environment21600
Node: BUGS21793 Node: BUGS21791
Ref: #bugs21876 Ref: #bugs21874
 
End Tag Table End Tag Table

View File

@ -20,9 +20,9 @@ DESCRIPTION
hledger-ui is hledger's terminal interface, providing an efficient hledger-ui is hledger's terminal interface, providing an efficient
full-window text UI for viewing accounts and transactions, and some full-window text UI for viewing accounts and transactions, and some
limited data entry capability. It is easier than hledger's command- limited data entry capability. It is easier than hledger's com-
line interface, and sometimes quicker and more convenient than the web mand-line interface, and sometimes quicker and more convenient than the
interface. web interface.
Like hledger, it reads from (and appends to) a journal file specified Like hledger, it reads from (and appends to) a journal file specified
by the LEDGER_FILE environment variable (defaulting to by the LEDGER_FILE environment variable (defaulting to
@ -198,8 +198,8 @@ OPTIONS
generate transactions from periodic rules, between the latest generate transactions from periodic rules, between the latest
recorded txn and 6 months from today, or during the specified recorded txn and 6 months from today, or during the specified
PERIOD (= is required). Auto posting rules will be applied to PERIOD (= is required). Auto posting rules will be applied to
these transactions as well. Also, in hledger-ui make future- these transactions as well. Also, in hledger-ui make fu-
dated transactions visible. ture-dated transactions visible.
--auto generate extra postings by applying auto posting rules to all --auto generate extra postings by applying auto posting rules to all
txns (not just forecast txns) txns (not just forecast txns)
@ -214,9 +214,9 @@ OPTIONS
--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
supporting terminal. 'always' or 'yes': always, useful eg when color-supporting terminal. 'always' or 'yes': always, useful eg
piping output into 'less -R'. 'never' or 'no': never. A when piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this. NO_COLOR environment variable overrides this.
--pretty[=WHEN] --pretty[=WHEN]
@ -257,22 +257,22 @@ KEYS
that.) 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).
DOWN/UP steps downward and upward through these standard report period SHIFT-DOWN/UP steps downward and upward through these standard report
durations: year, quarter, month, week, day. Then, SHIFT-LEFT/RIGHT period durations: year, quarter, month, week, day. Then,
moves to the previous/next period. T sets the report period to today. SHIFT-LEFT/RIGHT moves to the previous/next period. T sets the report
With the -w/--watch option, when viewing a "current" period (the cur- period to today. With the -w/--watch option, when viewing a "current"
rent day, week, month, quarter, or year), the period will move automat- period (the current day, week, month, quarter, or year), the period
ically to track the current date. To set a non-standard period, you will move automatically to track the current date. To set a non-stan-
can use / and a date: query. dard period, you can use / and a date: query.
(Mac users: SHIFT-DOWN/UP keys do not work by default in Terminal, as (Mac users: SHIFT-DOWN/UP keys do not work by default in Terminal, as
of MacOS Monterey. You can configure them as follows: open Terminal, of MacOS Monterey. You can configure them as follows: open Terminal,
press CMD-comma to open preferences, click Profiles, select your cur- press CMD-comma to open preferences, click Profiles, select your cur-
rent terminal profile on the left, click Keyboard on the right, click + rent terminal profile on the left, click Keyboard on the right, click +
and add this for Shift-Down: \033[1;2B, click + and add this for Shift- and add this for Shift-Down: \033[1;2B, click + and add this for
Up: \033[1;2A. Press the Escape key to enter the \033 part, you can't Shift-Up: \033[1;2A. Press the Escape key to enter the \033 part, you
type it directly.) can't type it directly.)
/ 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
@ -446,8 +446,8 @@ SCREENS
show them until you exit and re-enter it. So eg to see the effect of show them until you exit and re-enter it. So eg to see the effect of
using the E key, currently you must: - press E, edit and save the file, using the E key, currently you must: - press E, edit and save the file,
then exit the editor, returning to hledger-ui - press g to reload the then exit the editor, returning to hledger-ui - press g to reload the
file (or use -w/--watch mode) - press LEFT then RIGHT to exit and re- file (or use -w/--watch mode) - press LEFT then RIGHT to exit and
enter the transaction screen. re-enter the transaction screen.
Error Error
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,
@ -537,4 +537,4 @@ LICENSE
SEE ALSO SEE ALSO
hledger(1), hledger-ui(1), hledger-web(1), ledger(1) hledger(1), hledger-ui(1), hledger-web(1), ledger(1)
hledger-ui-1.32.99 December 2023 HLEDGER-UI(1) hledger-ui-1.32.99 January 2024 HLEDGER-UI(1)

View File

@ -1,2 +1,2 @@
m4_dnl Date to show in man pages. Updated by "Shake manuals" m4_dnl Date to show in man pages. Updated by "Shake manuals"
m4_define({{_monthyear_}}, {{December 2023}})m4_dnl m4_define({{_monthyear_}}, {{January 2024}})m4_dnl

View File

@ -1,34 +1,34 @@
.TH "HLEDGER-WEB" "1" "December 2023" "hledger-web-1.32.99 " "hledger User Manuals" .TH "HLEDGER\-WEB" "1" "January 2024" "hledger-web-1.32.99 " "hledger User Manuals"
.SH NAME .SH NAME
hledger-web - robust, friendly plain text accounting (Web version) hledger\-web \- robust, friendly plain text accounting (Web version)
.SH SYNOPSIS .SH SYNOPSIS
\f[CR]hledger-web [--serve|--serve-api] [OPTS] [ARGS]\f[R] \f[CR]hledger\-web [\-\-serve|\-\-serve\-api] [OPTS] [ARGS]\f[R]
.PD 0 .PD 0
.P .P
.PD .PD
\f[CR]hledger web -- [--serve|--serve-api] [OPTS] [ARGS]\f[R] \f[CR]hledger web \-\- [\-\-serve|\-\-serve\-api] [OPTS] [ARGS]\f[R]
.SH DESCRIPTION .SH DESCRIPTION
This manual is for hledger\[aq]s web interface, version 1.32.99. This manual is for hledger\[aq]s web interface, version 1.32.99.
See also the hledger manual for common concepts and file formats. See also the hledger manual for common concepts and file formats.
.PP .PP
hledger is a robust, user-friendly, cross-platform set of programs for hledger is a robust, user\-friendly, cross\-platform set of programs for
tracking money, time, or any other commodity, using double-entry tracking money, time, or any other commodity, using double\-entry
accounting and a simple, editable file format. accounting and a simple, editable file format.
hledger is inspired by and largely compatible with ledger(1), and hledger is inspired by and largely compatible with ledger(1), and
largely interconvertible with beancount(1). largely interconvertible with beancount(1).
.PP .PP
hledger-web is a simple web application for browsing and adding hledger\-web is a simple web application for browsing and adding
transactions. transactions.
It provides a more user-friendly UI than the hledger CLI or hledger-ui It provides a more user\-friendly UI than the hledger CLI or hledger\-ui
TUI, showing more at once (accounts, the current account register, TUI, showing more at once (accounts, the current account register,
balance charts) and allowing history-aware data entry, interactive balance charts) and allowing history\-aware data entry, interactive
searching, and bookmarking. searching, and bookmarking.
.PP .PP
hledger-web also lets you share a journal with multiple users, or even hledger\-web also lets you share a journal with multiple users, or even
the public web. the public web.
There is no access control, so if you need that you should put it behind There is no access control, so if you need that you should put it behind
a suitable web proxy. a suitable web proxy.
@ -39,260 +39,262 @@ every edit.
Like hledger, it reads from (and appends to) a journal file specified by Like hledger, it reads from (and appends to) a journal file specified by
the \f[CR]LEDGER_FILE\f[R] environment variable (defaulting to the \f[CR]LEDGER_FILE\f[R] environment variable (defaulting to
\f[CR]$HOME/.hledger.journal\f[R]); or you can specify files with \f[CR]$HOME/.hledger.journal\f[R]); or you can specify files with
\f[CR]-f\f[R] options. \f[CR]\-f\f[R] options.
It can also read timeclock files, timedot files, or any CSV/SSV/TSV file It can also read timeclock files, timedot files, or any CSV/SSV/TSV file
with a date field. with a date field.
(See hledger(1) -> Input for details.) (See hledger(1) \-> Input for details.)
.PP .PP
hledger-web can be run in three modes: hledger\-web can be run in three modes:
.IP \[bu] 2 .IP \[bu] 2
Transient mode (the default): your default web browser will be opened to Transient mode (the default): your default web browser will be opened to
show the app if possible, and the app exits automatically after two show the app if possible, and the app exits automatically after two
minutes of inactivity (no requests received and no open browser windows minutes of inactivity (no requests received and no open browser windows
viewing it). viewing it).
.IP \[bu] 2 .IP \[bu] 2
With \f[CR]--serve\f[R]: the app runs without stopping, and without With \f[CR]\-\-serve\f[R]: the app runs without stopping, and without
opening a browser. opening a browser.
.IP \[bu] 2 .IP \[bu] 2
With \f[CR]--serve-api\f[R]: only the JSON API is served. With \f[CR]\-\-serve\-api\f[R]: only the JSON API is served.
.PP .PP
In all cases hledger-web runs as a foreground process, logging requests In all cases hledger\-web runs as a foreground process, logging requests
to stdout. to stdout.
.SH OPTIONS .SH OPTIONS
hledger-web provides the following options: hledger\-web provides the following options:
.TP .TP
\f[CR]--serve\f[R] \f[CR]\-\-serve\f[R]
serve and log requests, don\[aq]t browse or auto-exit after timeout serve and log requests, don\[aq]t browse or auto\-exit after timeout
.TP .TP
\f[CR]--serve-api\f[R] \f[CR]\-\-serve\-api\f[R]
like --serve, but serve only the JSON web API, not the web UI like \-\-serve, but serve only the JSON web API, not the web UI
.TP .TP
\f[CR]--allow=view|add|edit\f[R] \f[CR]\-\-allow=view|add|edit\f[R]
set the user\[aq]s access level for changing data (default: set the user\[aq]s access level for changing data (default:
\f[CR]add\f[R]). \f[CR]add\f[R]).
It also accepts \f[CR]sandstorm\f[R] for use on that platform (reads It also accepts \f[CR]sandstorm\f[R] for use on that platform (reads
permissions from the \f[CR]X-Sandstorm-Permissions\f[R] request header). permissions from the \f[CR]X\-Sandstorm\-Permissions\f[R] request
header).
.TP .TP
\f[CR]--cors=ORIGIN\f[R] \f[CR]\-\-cors=ORIGIN\f[R]
allow cross-origin requests from the specified origin; setting ORIGIN to allow cross\-origin requests from the specified origin; setting ORIGIN
\[dq]*\[dq] allows requests from any origin to \[dq]*\[dq] allows requests from any origin
.TP .TP
\f[CR]--host=IPADDR\f[R] \f[CR]\-\-host=IPADDR\f[R]
listen on this IP address (default: 127.0.0.1) listen on this IP address (default: 127.0.0.1)
.PP .PP
By default the server listens on IP address \f[CR]127.0.0.1\f[R], which By default the server listens on IP address \f[CR]127.0.0.1\f[R], which
is accessible only to requests from the local machine.. is accessible only to requests from the local machine..
You can use \f[CR]--host\f[R] to listen on a different address You can use \f[CR]\-\-host\f[R] to listen on a different address
configured on the machine, eg to allow access from other machines. configured on the machine, eg to allow access from other machines.
The special address \f[CR]0.0.0.0\f[R] causes it to listen on all The special address \f[CR]0.0.0.0\f[R] causes it to listen on all
addresses configured on the machine. addresses configured on the machine.
.TP .TP
\f[CR]--port=PORT\f[R] \f[CR]\-\-port=PORT\f[R]
listen on this TCP port (default: 5000) listen on this TCP port (default: 5000)
.PP .PP
Similarly, you can use \f[CR]--port\f[R] to listen on a TCP port other Similarly, you can use \f[CR]\-\-port\f[R] to listen on a TCP port other
than 5000. than 5000.
This is useful if you want to run multiple hledger-web instances on a This is useful if you want to run multiple hledger\-web instances on a
machine. machine.
.TP .TP
\f[CR]--socket=SOCKETFILE\f[R] \f[CR]\-\-socket=SOCKETFILE\f[R]
listen on the given unix socket instead of an IP address and port (unix listen on the given unix socket instead of an IP address and port (unix
only; implies --serve) only; implies \-\-serve)
.PP .PP
When \f[CR]--socket\f[R] is used, hledger-web creates and communicates When \f[CR]\-\-socket\f[R] is used, hledger\-web creates and
via a socket file instead of a TCP port. communicates via a socket file instead of a TCP port.
This can be more secure, respects unix file permissions, and makes This can be more secure, respects unix file permissions, and makes
certain use cases easier, such as running per-user instances behind an certain use cases easier, such as running per\-user instances behind an
nginx reverse proxy. nginx reverse proxy.
(Eg: (Eg:
\f[CR]proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;\f[R].) \f[CR]proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;\f[R].)
.TP .TP
\f[CR]--base-url=URL\f[R] \f[CR]\-\-base\-url=URL\f[R]
set the base url (default: http://IPADDR:PORT). set the base url (default: http://IPADDR:PORT).
.PP .PP
You can use \f[CR]--base-url\f[R] to change the protocol, hostname, port You can use \f[CR]\-\-base\-url\f[R] to change the protocol, hostname,
and path that appear in hledger-web\[aq]s hyperlinks. port and path that appear in hledger\-web\[aq]s hyperlinks.
This is useful eg when integrating hledger-web within a larger website. This is useful eg when integrating hledger\-web within a larger website.
The default is \f[CR]http://HOST:PORT/\f[R] using the server\[aq]s The default is \f[CR]http://HOST:PORT/\f[R] using the server\[aq]s
configured host address and TCP port (or \f[CR]http://HOST\f[R] if PORT configured host address and TCP port (or \f[CR]http://HOST\f[R] if PORT
is 80). is 80).
Note this affects url generation but not route parsing. Note this affects url generation but not route parsing.
.TP .TP
\f[CR]--test\f[R] \f[CR]\-\-test\f[R]
run hledger-web\[aq]s tests and exit. run hledger\-web\[aq]s tests and exit.
hspec test runner args may follow a --, eg: hledger-web --test -- --help hspec test runner args may follow a \-\-, eg: hledger\-web \-\-test \-\-
\-\-help
.PP .PP
hledger-web also supports many of hledger\[aq]s general options. hledger\-web also supports many of hledger\[aq]s general options.
Query options and arguments may be used to set an initial filter, which Query options and arguments may be used to set an initial filter, which
although not shown in the UI, will restrict the data shown, in addition although not shown in the UI, will restrict the data shown, in addition
to any search query entered in the UI. to any search query entered in the UI.
.SS General help options .SS General help options
.TP .TP
\f[CR]-h --help\f[R] \f[CR]\-h \-\-help\f[R]
show general or COMMAND help show general or COMMAND help
.TP .TP
\f[CR]--man\f[R] \f[CR]\-\-man\f[R]
show general or COMMAND user manual with man show general or COMMAND user manual with man
.TP .TP
\f[CR]--info\f[R] \f[CR]\-\-info\f[R]
show general or COMMAND user manual with info show general or COMMAND user manual with info
.TP .TP
\f[CR]--version\f[R] \f[CR]\-\-version\f[R]
show general or ADDONCMD version show general or ADDONCMD version
.TP .TP
\f[CR]--debug[=N]\f[R] \f[CR]\-\-debug[=N]\f[R]
show debug output (levels 1-9, default: 1) show debug output (levels 1\-9, default: 1)
.SS General input options .SS General input options
.TP .TP
\f[CR]-f FILE --file=FILE\f[R] \f[CR]\-f FILE \-\-file=FILE\f[R]
use a different input file. use a different input file.
For stdin, use - (default: \f[CR]$LEDGER_FILE\f[R] or For stdin, use \- (default: \f[CR]$LEDGER_FILE\f[R] or
\f[CR]$HOME/.hledger.journal\f[R]) \f[CR]$HOME/.hledger.journal\f[R])
.TP .TP
\f[CR]--rules-file=RULESFILE\f[R] \f[CR]\-\-rules\-file=RULESFILE\f[R]
Conversion rules file to use when reading CSV (default: FILE.rules) Conversion rules file to use when reading CSV (default: FILE.rules)
.TP .TP
\f[CR]--separator=CHAR\f[R] \f[CR]\-\-separator=CHAR\f[R]
Field separator to expect when reading CSV (default: \[aq],\[aq]) Field separator to expect when reading CSV (default: \[aq],\[aq])
.TP .TP
\f[CR]--alias=OLD=NEW\f[R] \f[CR]\-\-alias=OLD=NEW\f[R]
rename accounts named OLD to NEW rename accounts named OLD to NEW
.TP .TP
\f[CR]--anon\f[R] \f[CR]\-\-anon\f[R]
anonymize accounts and payees anonymize accounts and payees
.TP .TP
\f[CR]--pivot FIELDNAME\f[R] \f[CR]\-\-pivot FIELDNAME\f[R]
use some other field or tag for the account name use some other field or tag for the account name
.TP .TP
\f[CR]-I --ignore-assertions\f[R] \f[CR]\-I \-\-ignore\-assertions\f[R]
disable balance assertion checks (note: does not disable balance disable balance assertion checks (note: does not disable balance
assignments) assignments)
.TP .TP
\f[CR]-s --strict\f[R] \f[CR]\-s \-\-strict\f[R]
do extra error checking (check that all posted accounts are declared) do extra error checking (check that all posted accounts are declared)
.SS General reporting options .SS General reporting options
.TP .TP
\f[CR]-b --begin=DATE\f[R] \f[CR]\-b \-\-begin=DATE\f[R]
include postings/txns on or after this date (will be adjusted to include postings/txns on or after this date (will be adjusted to
preceding subperiod start when using a report interval) preceding subperiod start when using a report interval)
.TP .TP
\f[CR]-e --end=DATE\f[R] \f[CR]\-e \-\-end=DATE\f[R]
include postings/txns before this date (will be adjusted to following include postings/txns before this date (will be adjusted to following
subperiod end when using a report interval) subperiod end when using a report interval)
.TP .TP
\f[CR]-D --daily\f[R] \f[CR]\-D \-\-daily\f[R]
multiperiod/multicolumn report by day multiperiod/multicolumn report by day
.TP .TP
\f[CR]-W --weekly\f[R] \f[CR]\-W \-\-weekly\f[R]
multiperiod/multicolumn report by week multiperiod/multicolumn report by week
.TP .TP
\f[CR]-M --monthly\f[R] \f[CR]\-M \-\-monthly\f[R]
multiperiod/multicolumn report by month multiperiod/multicolumn report by month
.TP .TP
\f[CR]-Q --quarterly\f[R] \f[CR]\-Q \-\-quarterly\f[R]
multiperiod/multicolumn report by quarter multiperiod/multicolumn report by quarter
.TP .TP
\f[CR]-Y --yearly\f[R] \f[CR]\-Y \-\-yearly\f[R]
multiperiod/multicolumn report by year multiperiod/multicolumn report by year
.TP .TP
\f[CR]-p --period=PERIODEXP\f[R] \f[CR]\-p \-\-period=PERIODEXP\f[R]
set start date, end date, and/or reporting interval all at once using set start date, end date, and/or reporting interval all at once using
period expressions syntax period expressions syntax
.TP .TP
\f[CR]--date2\f[R] \f[CR]\-\-date2\f[R]
match the secondary date instead (see command help for other effects) match the secondary date instead (see command help for other effects)
.TP .TP
\f[CR]--today=DATE\f[R] \f[CR]\-\-today=DATE\f[R]
override today\[aq]s date (affects relative smart dates, for override today\[aq]s date (affects relative smart dates, for
tests/examples) tests/examples)
.TP .TP
\f[CR]-U --unmarked\f[R] \f[CR]\-U \-\-unmarked\f[R]
include only unmarked postings/txns (can combine with -P or -C) include only unmarked postings/txns (can combine with \-P or \-C)
.TP .TP
\f[CR]-P --pending\f[R] \f[CR]\-P \-\-pending\f[R]
include only pending postings/txns include only pending postings/txns
.TP .TP
\f[CR]-C --cleared\f[R] \f[CR]\-C \-\-cleared\f[R]
include only cleared postings/txns include only cleared postings/txns
.TP .TP
\f[CR]-R --real\f[R] \f[CR]\-R \-\-real\f[R]
include only non-virtual postings include only non\-virtual postings
.TP .TP
\f[CR]-NUM --depth=NUM\f[R] \f[CR]\-NUM \-\-depth=NUM\f[R]
hide/aggregate accounts or postings more than NUM levels deep hide/aggregate accounts or postings more than NUM levels deep
.TP .TP
\f[CR]-E --empty\f[R] \f[CR]\-E \-\-empty\f[R]
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)
.TP .TP
\f[CR]-B --cost\f[R] \f[CR]\-B \-\-cost\f[R]
convert amounts to their cost/selling amount at transaction time convert amounts to their cost/selling amount at transaction time
.TP .TP
\f[CR]-V --market\f[R] \f[CR]\-V \-\-market\f[R]
convert amounts to their market value in default valuation commodities convert amounts to their market value in default valuation commodities
.TP .TP
\f[CR]-X --exchange=COMM\f[R] \f[CR]\-X \-\-exchange=COMM\f[R]
convert amounts to their market value in commodity COMM convert amounts to their market value in commodity COMM
.TP .TP
\f[CR]--value\f[R] \f[CR]\-\-value\f[R]
convert amounts to cost or market value, more flexibly than -B/-V/-X convert amounts to cost or market value, more flexibly than \-B/\-V/\-X
.TP .TP
\f[CR]--infer-equity\f[R] \f[CR]\-\-infer\-equity\f[R]
infer conversion equity postings from costs infer conversion equity postings from costs
.TP .TP
\f[CR]--infer-costs\f[R] \f[CR]\-\-infer\-costs\f[R]
infer costs from conversion equity postings infer costs from conversion equity postings
.TP .TP
\f[CR]--infer-market-prices\f[R] \f[CR]\-\-infer\-market\-prices\f[R]
use costs as additional market prices, as if they were P directives use costs as additional market prices, as if they were P directives
.TP .TP
\f[CR]--forecast\f[R] \f[CR]\-\-forecast\f[R]
generate transactions from periodic rules, generate transactions from periodic rules,
between the latest recorded txn and 6 months from today, between the latest recorded txn and 6 months from today,
or during the specified PERIOD (= is required). or during the specified PERIOD (= is required).
Auto posting rules will be applied to these transactions as well. Auto posting rules will be applied to these transactions as well.
Also, in hledger-ui make future-dated transactions visible. Also, in hledger\-ui make future\-dated transactions visible.
.TP .TP
\f[CR]--auto\f[R] \f[CR]\-\-auto\f[R]
generate extra postings by applying auto posting rules to all txns (not generate extra postings by applying auto posting rules to all txns (not
just forecast txns) just forecast txns)
.TP .TP
\f[CR]--verbose-tags\f[R] \f[CR]\-\-verbose\-tags\f[R]
add visible tags indicating transactions or postings which have been add visible tags indicating transactions or postings which have been
generated/modified generated/modified
.TP .TP
\f[CR]--commodity-style\f[R] \f[CR]\-\-commodity\-style\f[R]
Override the commodity style in the output for the specified commodity. Override the commodity style in the output for the specified commodity.
For example \[aq]EUR1.000,00\[aq]. For example \[aq]EUR1.000,00\[aq].
.TP .TP
\f[CR]--color=WHEN (or --colour=WHEN)\f[R] \f[CR]\-\-color=WHEN (or \-\-colour=WHEN)\f[R]
Should color-supporting commands use ANSI color codes in text output. Should color\-supporting commands use ANSI color codes in text output.
\[aq]auto\[aq] (default): whenever stdout seems to be a color-supporting \[aq]auto\[aq] (default): whenever stdout seems to be a
terminal. color\-supporting terminal.
\[aq]always\[aq] or \[aq]yes\[aq]: always, useful eg when piping output \[aq]always\[aq] or \[aq]yes\[aq]: always, useful eg when piping output
into \[aq]less -R\[aq]. into \[aq]less \-R\[aq].
\[aq]never\[aq] or \[aq]no\[aq]: never. \[aq]never\[aq] or \[aq]no\[aq]: never.
A NO_COLOR environment variable overrides this. A NO_COLOR environment variable overrides this.
.TP .TP
\f[CR]--pretty[=WHEN]\f[R] \f[CR]\-\-pretty[=WHEN]\f[R]
Show prettier output, e.g. Show prettier output, e.g.
using unicode box-drawing characters. using unicode box\-drawing characters.
Accepts \[aq]yes\[aq] (the default) or \[aq]no\[aq] (\[aq]y\[aq], Accepts \[aq]yes\[aq] (the default) or \[aq]no\[aq] (\[aq]y\[aq],
\[aq]n\[aq], \[aq]always\[aq], \[aq]never\[aq] also work). \[aq]n\[aq], \[aq]always\[aq], \[aq]never\[aq] also work).
If you provide an argument you must use \[aq]=\[aq], e.g. If you provide an argument you must use \[aq]=\[aq], e.g.
\[aq]--pretty=yes\[aq]. \[aq]\-\-pretty=yes\[aq].
.PP .PP
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
last one takes precedence. last one takes precedence.
.PP .PP
Some reporting options can also be written as query arguments. Some reporting options can also be written as query arguments.
.SH PERMISSIONS .SH 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.
.PP .PP
You can restrict who can reach it by You can restrict who can reach it by
.IP \[bu] 2 .IP \[bu] 2
setting the IP address it listens on (see \f[CR]--host\f[R] above). setting the IP address it listens on (see \f[CR]\-\-host\f[R] above).
By default it listens on 127.0.0.1, accessible to all users on the local By default it listens on 127.0.0.1, accessible to all users on the local
machine. machine.
.IP \[bu] 2 .IP \[bu] 2
@ -302,22 +304,24 @@ custom firewall rules
.PP .PP
You can restrict what the users who reach it can do, by You can restrict what the users who reach it can do, by
.IP \[bu] 2 .IP \[bu] 2
using the \f[CR]--capabilities=CAP[,CAP..]\f[R] flag when you start it, using the \f[CR]\-\-capabilities=CAP[,CAP..]\f[R] flag when you start
enabling one or more of the following capabilities. it, enabling one or more of the following capabilities.
The default value is \f[CR]view,add\f[R]: The default value is \f[CR]view,add\f[R]:
.RS 2 .RS 2
.IP \[bu] 2 .IP \[bu] 2
\f[CR]view\f[R] - allows viewing the journal file and all included files \f[CR]view\f[R] \- allows viewing the journal file and all included
files
.IP \[bu] 2 .IP \[bu] 2
\f[CR]add\f[R] - allows adding new transactions to the main journal file \f[CR]add\f[R] \- allows adding new transactions to the main journal
file
.IP \[bu] 2 .IP \[bu] 2
\f[CR]manage\f[R] - allows editing, uploading or downloading the main or \f[CR]manage\f[R] \- allows editing, uploading or downloading the main
included files or included files
.RE .RE
.IP \[bu] 2 .IP \[bu] 2
using the \f[CR]--capabilities-header=HTTPHEADER\f[R] flag to specify a using the \f[CR]\-\-capabilities\-header=HTTPHEADER\f[R] flag to specify
HTTP header from which it will read capabilities to enable. a HTTP header from which it will read capabilities to enable.
hledger-web on Sandstorm uses the X-Sandstorm-Permissions header to hledger\-web on Sandstorm uses the X\-Sandstorm\-Permissions header to
integrate with Sandstorm\[aq]s permissions. integrate with Sandstorm\[aq]s permissions.
This is disabled by default. This is disabled by default.
.SH EDITING, UPLOADING, DOWNLOADING .SH EDITING, UPLOADING, DOWNLOADING
@ -330,35 +334,35 @@ any files it includes.
Note, unlike any other hledger command, in this mode you (or any Note, unlike any other hledger command, in this mode you (or any
visitor) can alter or wipe the data files. visitor) can alter or wipe the data files.
.PP .PP
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.) full, etc.)
hledger-web is not aware of version control systems, currently; if you hledger\-web is not aware of version control systems, currently; if you
use one, you\[aq]ll have to arrange to commit the changes yourself (eg use one, you\[aq]ll have to arrange to commit the changes yourself (eg
with a cron job or a file watcher like entr). with a cron job or a file watcher like entr).
.PP .PP
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. (eg with failing balance assertions) are prevented.
(Probably. (Probably.
This needs re-testing.) This needs re\-testing.)
.SH RELOADING .SH 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 data edit it directly, outside of hledger\-web), and it will show the new
when you reload the page or navigate to a new page. 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 If a change makes a file unparseable, hledger\-web will display an error
message until the file has been fixed. message until the file has been fixed.
.PP .PP
(Note: if you are viewing files mounted from another machine, make sure (Note: if you are viewing files mounted from another machine, make sure
that both machine clocks are roughly in step.) that both machine clocks are roughly in step.)
.SH JSON API .SH 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. be used to get data or add new transactions.
If you want the JSON API only, you can use the \f[CR]--serve-api\f[R] If you want the JSON API only, you can use the \f[CR]\-\-serve\-api\f[R]
flag. flag.
Eg: Eg:
.IP .IP
.EX .EX
$ hledger-web -f examples/sample.journal --serve-api $ hledger\-web \-f examples/sample.journal \-\-serve\-api
\&... \&...
.EE .EE
.PP .PP
@ -375,11 +379,11 @@ You can get JSON data from these routes:
.EE .EE
.PP .PP
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\[aq]s JSON does not include newlines, here we use python to (hledger\-web\[aq]s JSON does not include newlines, here we use python
prettify it): to prettify it):
.IP .IP
.EX .EX
$ 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
[ [
\[dq]assets\[dq], \[dq]assets\[dq],
\[dq]assets:bank\[dq], \[dq]assets:bank\[dq],
@ -400,12 +404,12 @@ $ curl -s http://127.0.0.1:5000/accountnames | python -m json.tool
Or all transactions: Or all transactions:
.IP .IP
.EX .EX
$ curl -s http://127.0.0.1:5000/transactions | python -m json.tool $ curl \-s http://127.0.0.1:5000/transactions | python \-m json.tool
[ [
{ {
\[dq]tcode\[dq]: \[dq]\[dq], \[dq]tcode\[dq]: \[dq]\[dq],
\[dq]tcomment\[dq]: \[dq]\[dq], \[dq]tcomment\[dq]: \[dq]\[dq],
\[dq]tdate\[dq]: \[dq]2008-01-01\[dq], \[dq]tdate\[dq]: \[dq]2008\-01\-01\[dq],
\[dq]tdate2\[dq]: null, \[dq]tdate2\[dq]: null,
\[dq]tdescription\[dq]: \[dq]income\[dq], \[dq]tdescription\[dq]: \[dq]income\[dq],
\[dq]tindex\[dq]: 1, \[dq]tindex\[dq]: 1,
@ -436,21 +440,21 @@ returns an AccountTransactionsReport, which consists of a report title
and a list of AccountTransactionsReportItem (etc). and a list of AccountTransactionsReportItem (etc).
.PP .PP
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
\f[CR]/add\f[R], if hledger-web was started with the \f[CR]add\f[R] \f[CR]/add\f[R], if hledger\-web was started with the \f[CR]add\f[R]
capability (enabled by default). capability (enabled by default).
The payload must be the full, exact JSON representation of a hledger The payload must be the full, exact JSON representation of a hledger
transaction (partial data won\[aq]t do). transaction (partial data won\[aq]t do).
You can get sample JSON from hledger-web\[aq]s \f[CR]/transactions\f[R] You can get sample JSON from hledger\-web\[aq]s \f[CR]/transactions\f[R]
or \f[CR]/accounttransactions\f[R], or you can export it with or \f[CR]/accounttransactions\f[R], or you can export it with
hledger-lib, eg like so: hledger\-lib, eg like so:
.IP .IP
.EX .EX
\&.../hledger$ stack ghci hledger-lib \&.../hledger$ stack ghci hledger\-lib
>>> writeJsonFile \[dq]txn.json\[dq] (head $ jtxns samplejournal) >>> writeJsonFile \[dq]txn.json\[dq] (head $ jtxns samplejournal)
>>> :q >>> :q
.EE .EE
.PP .PP
Here\[aq]s how it looks as of hledger-1.17 (remember, this JSON Here\[aq]s how it looks as of hledger\-1.17 (remember, this JSON
corresponds to hledger\[aq]s Transaction and related data types): corresponds to hledger\[aq]s Transaction and related data types):
.IP .IP
.EX .EX
@ -496,9 +500,9 @@ corresponds to hledger\[aq]s Transaction and related data types):
\[dq]aprice\[dq]: null, \[dq]aprice\[dq]: null,
\[dq]acommodity\[dq]: \[dq]$\[dq], \[dq]acommodity\[dq]: \[dq]$\[dq],
\[dq]aquantity\[dq]: { \[dq]aquantity\[dq]: {
\[dq]floatingPoint\[dq]: -1, \[dq]floatingPoint\[dq]: \-1,
\[dq]decimalPlaces\[dq]: 10, \[dq]decimalPlaces\[dq]: 10,
\[dq]decimalMantissa\[dq]: -10000000000 \[dq]decimalMantissa\[dq]: \-10000000000
}, },
\[dq]aismultiplier\[dq]: false, \[dq]aismultiplier\[dq]: false,
\[dq]astyle\[dq]: { \[dq]astyle\[dq]: {
@ -531,7 +535,7 @@ corresponds to hledger\[aq]s Transaction and related data types):
] ]
] ]
}, },
\[dq]tdate\[dq]: \[dq]2008-01-01\[dq], \[dq]tdate\[dq]: \[dq]2008\-01\-01\[dq],
\[dq]tcode\[dq]: \[dq]\[dq], \[dq]tcode\[dq]: \[dq]\[dq],
\[dq]tindex\[dq]: 1, \[dq]tindex\[dq]: 1,
\[dq]tprecedingcomment\[dq]: \[dq]\[dq], \[dq]tprecedingcomment\[dq]: \[dq]\[dq],
@ -545,11 +549,11 @@ And here\[aq]s how to test adding it with curl.
This should add a new entry to your journal: This should add a new entry to your journal:
.IP .IP
.EX .EX
$ curl http://127.0.0.1:5000/add -X PUT -H \[aq]Content-Type: application/json\[aq] --data-binary \[at]txn.json $ curl http://127.0.0.1:5000/add \-X PUT \-H \[aq]Content\-Type: application/json\[aq] \-\-data\-binary \[at]txn.json
.EE .EE
.SH DEBUG OUTPUT .SH DEBUG OUTPUT
.SS Debug output .SS Debug output
You can add \f[CR]--debug[=N]\f[R] to the command line to log debug You can add \f[CR]\-\-debug[=N]\f[R] to the command line to log debug
output. output.
N ranges from 1 (least output, the default) to 9 (maximum output). N ranges from 1 (least output, the default) to 9 (maximum output).
Typically you would start with 1 and increase until you are seeing Typically you would start with 1 and increase until you are seeing
@ -561,10 +565,10 @@ stderr, eg:
.PD 0 .PD 0
.P .P
.PD .PD
\f[CR]hledger-web --debug=3 2>hledger-web.log\f[R]. \f[CR]hledger\-web \-\-debug=3 2>hledger\-web.log\f[R].
.SH ENVIRONMENT .SH ENVIRONMENT
\f[B]LEDGER_FILE\f[R] The main journal file to use when not specified \f[B]LEDGER_FILE\f[R] The main journal file to use when not specified
with \f[CR]-f/--file\f[R]. with \f[CR]\-f/\-\-file\f[R].
Default: \f[CR]$HOME/.hledger.journal\f[R]. Default: \f[CR]$HOME/.hledger.journal\f[R].
.SH BUGS .SH BUGS
We welcome bug reports in the hledger issue tracker (shortcut: We welcome bug reports in the hledger issue tracker (shortcut:
@ -573,7 +577,7 @@ http://bugs.hledger.org), or on the #hledger chat or hledger mail list
.PP .PP
Some known issues: Some known issues:
.PP .PP
Does not work well on small screens, or in text-mode browsers. Does not work well on small screens, or in text\-mode browsers.
.SH AUTHORS .SH AUTHORS

View File

@ -1,4 +1,4 @@
This is hledger-web.info, produced by makeinfo version 7.0.3 from stdin. This is hledger-web.info, produced by makeinfo version 7.1 from stdin.
INFO-DIR-SECTION User Applications INFO-DIR-SECTION User Applications
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
@ -631,31 +631,31 @@ http://bugs.hledger.org), or on the #hledger chat or hledger mail list
 
Tag Table: Tag Table:
Node: Top225 Node: Top223
Node: OPTIONS2580 Node: OPTIONS2578
Ref: #options2685 Ref: #options2683
Node: General help options5259 Node: General help options5257
Ref: #general-help-options5409 Ref: #general-help-options5407
Node: General input options5691 Node: General input options5689
Ref: #general-input-options5877 Ref: #general-input-options5875
Node: General reporting options6579 Node: General reporting options6577
Ref: #general-reporting-options6744 Ref: #general-reporting-options6742
Node: PERMISSIONS10134 Node: PERMISSIONS10132
Ref: #permissions10273 Ref: #permissions10271
Node: EDITING UPLOADING DOWNLOADING11485 Node: EDITING UPLOADING DOWNLOADING11483
Ref: #editing-uploading-downloading11666 Ref: #editing-uploading-downloading11664
Node: RELOADING12500 Node: RELOADING12498
Ref: #reloading12634 Ref: #reloading12632
Node: JSON API13067 Node: JSON API13065
Ref: #json-api13182 Ref: #json-api13180
Node: DEBUG OUTPUT18670 Node: DEBUG OUTPUT18668
Ref: #debug-output18795 Ref: #debug-output18793
Node: Debug output18822 Node: Debug output18820
Ref: #debug-output-118923 Ref: #debug-output-118921
Node: ENVIRONMENT19340 Node: ENVIRONMENT19338
Ref: #environment19459 Ref: #environment19457
Node: BUGS19576 Node: BUGS19574
Ref: #bugs19660 Ref: #bugs19658
 
End Tag Table End Tag Table

View File

@ -238,8 +238,8 @@ OPTIONS
generate transactions from periodic rules, between the latest generate transactions from periodic rules, between the latest
recorded txn and 6 months from today, or during the specified recorded txn and 6 months from today, or during the specified
PERIOD (= is required). Auto posting rules will be applied to PERIOD (= is required). Auto posting rules will be applied to
these transactions as well. Also, in hledger-ui make future- these transactions as well. Also, in hledger-ui make fu-
dated transactions visible. ture-dated transactions visible.
--auto generate extra postings by applying auto posting rules to all --auto generate extra postings by applying auto posting rules to all
txns (not just forecast txns) txns (not just forecast txns)
@ -254,9 +254,9 @@ OPTIONS
--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
supporting terminal. 'always' or 'yes': always, useful eg when color-supporting terminal. 'always' or 'yes': always, useful eg
piping output into 'less -R'. 'never' or 'no': never. A when piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this. NO_COLOR environment variable overrides this.
--pretty[=WHEN] --pretty[=WHEN]
@ -551,4 +551,4 @@ LICENSE
SEE ALSO SEE ALSO
hledger(1), hledger-ui(1), hledger-web(1), ledger(1) hledger(1), hledger-ui(1), hledger-web(1), ledger(1)
hledger-web-1.32.99 December 2023 HLEDGER-WEB(1) hledger-web-1.32.99 January 2024 HLEDGER-WEB(1)

View File

@ -1,2 +1,2 @@
m4_dnl Date to show in man pages. Updated by "Shake manuals" m4_dnl Date to show in man pages. Updated by "Shake manuals"
m4_define({{_monthyear_}}, {{December 2023}})m4_dnl m4_define({{_monthyear_}}, {{January 2024}})m4_dnl

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -213,8 +213,8 @@ Commands
hledger ADDONCMD [-- ADDONCMDOPTS] [ADDONCMDARGS]. But note the double hledger ADDONCMD [-- ADDONCMDOPTS] [ADDONCMDARGS]. But note the double
hyphen argument, required before add-on-specific options. Eg: hledger hyphen argument, required before add-on-specific options. Eg: hledger
ui -- --watch or hledger web -- --serve. If this causes difficulty, ui -- --watch or hledger web -- --serve. If this causes difficulty,
you can always run the add-on directly, without using hledger: hledger- you can always run the add-on directly, without using hledger:
ui --watch or hledger-web --serve. hledger-ui --watch or hledger-web --serve.
Options Options
Run hledger -h to see general command line help, and general options Run hledger -h to see general command line help, and general options
@ -347,8 +347,8 @@ Options
generate transactions from periodic rules, between the latest generate transactions from periodic rules, between the latest
recorded txn and 6 months from today, or during the specified recorded txn and 6 months from today, or during the specified
PERIOD (= is required). Auto posting rules will be applied to PERIOD (= is required). Auto posting rules will be applied to
these transactions as well. Also, in hledger-ui make future- these transactions as well. Also, in hledger-ui make fu-
dated transactions visible. ture-dated transactions visible.
--auto generate extra postings by applying auto posting rules to all --auto generate extra postings by applying auto posting rules to all
txns (not just forecast txns) txns (not just forecast txns)
@ -363,9 +363,9 @@ Options
--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
supporting terminal. 'always' or 'yes': always, useful eg when color-supporting terminal. 'always' or 'yes': always, useful eg
piping output into 'less -R'. 'never' or 'no': never. A when piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this. NO_COLOR environment variable overrides this.
--pretty[=WHEN] --pretty[=WHEN]
@ -465,8 +465,8 @@ Command line tips
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
screen alignment should be preserved. on-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:
@ -669,8 +669,8 @@ Output
o Our JSON is rather large and verbose, since it is a faithful repre- o Our JSON is rather large and verbose, since it is a faithful repre-
sentation of hledger's internal data types. To understand the JSON, sentation of hledger's internal data types. To understand the JSON,
read the Haskell type definitions, which are mostly in read the Haskell type definitions, which are mostly in
https://github.com/simonmichael/hledger/blob/master/hledger- https://github.com/simonmichael/hledger/blob/mas-
lib/Hledger/Data/Types.hs. ter/hledger-lib/Hledger/Data/Types.hs.
o hledger represents quantities as Decimal values storing up to 255 o hledger represents quantities as Decimal values storing up to 255
significant digits, eg for repeating decimals. Such numbers can significant digits, eg for repeating decimals. Such numbers can
@ -1442,12 +1442,12 @@ Journal
Ledger assertions do not see the accumulated effect of repeated post- Ledger assertions do not see the accumulated effect of repeated post-
ings to the same account within a transaction.) ings to the same account within a transaction.)
So, hledger balance assertions keep working if you reorder differently- So, hledger balance assertions keep working if you reorder differ-
dated transactions within the journal. But if you reorder same-dated ently-dated transactions within the journal. But if you reorder
transactions or postings, assertions might break and require updating. same-dated transactions or postings, assertions might break and require
This order dependence does bring an advantage: precise control over the updating. This order dependence does bring an advantage: precise con-
order of postings and assertions within a day, so you can assert intra- trol over the order of postings and assertions within a day, so you can
day balances. assert intra-day balances.
Assertions and multiple included files Assertions and multiple included files
Multiple files included with the include directive are processed as if Multiple files included with the include directive are processed as if
@ -1666,8 +1666,8 @@ Journal
Directive effects Directive effects
Here are all hledger's directives, with their effects and scope sum- Here are all hledger's directives, with their effects and scope sum-
marised - nine main directives, plus four others which we consider non- marised - nine main directives, plus four others which we consider
essential: non-essential:
di- what it does ends di- what it does ends
rec- at rec- at
@ -1690,11 +1690,11 @@ Journal
(Ledger-compatible syntax). Command line equivalent: -c/--com- (Ledger-compatible syntax). Command line equivalent: -c/--com-
modity-style modity-style
deci- Declares the decimal mark, for parsing amounts of all commodi- Y deci- Declares the decimal mark, for parsing amounts of all commodi- Y
mal- ties in following entries until next decimal-mark or end of cur- mal-mark ties in following entries until next decimal-mark or end of cur-
mark rent file. Included files can override. Takes precedence over rent file. Included files can override. Takes precedence over
commodity and D. commodity and D.
in- Includes entries and directives from another file, as if they N include Includes entries and directives from another file, as if they N
clude were written inline. Command line alternative: multiple were written inline. Command line alternative: multiple
-f/--file -f/--file
payee Declares a payee name, for checking all entries in all files. N payee Declares a payee name, for checking all entries in all files. N
P Declares the market price of a commodity on some date, for value N P Declares the market price of a commodity on some date, for value N
@ -1944,8 +1944,8 @@ Journal
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
web. hledger-web.
Account aliases are very powerful. They are generally easy to use cor- Account aliases are very powerful. They are generally easy to use cor-
rectly, but you can also generate invalid account names with them; more rectly, but you can also generate invalid account names with them; more
@ -2284,12 +2284,18 @@ Journal
declare and check your tags . declare and check your tags .
Periodic transactions Periodic transactions
The ~ directive declares recurring transactions. Such directives allow The ~ directive declares a "periodic rule" which generates temporary
hledger to generate temporary future transactions (visible in reports, extra transactions, usually recurring at some interval, when hledger is
not in the journal file) to help with forecasting or budgeting. run with the --forecast flag. These "forecast transactions" are useful
for forecasting future activity. They exist only for the duration of
the report, and only when --forecast is used; they are not saved in the
journal file by hledger.
Periodic transactions can be a little tricky, so before you use them, Periodic rules also have a second use: with the --budget flag they set
read this whole section, or at least these tips: budget goals for budgeting.
Periodic rules can be a little tricky, so before you use them, read
this whole section, or at least the following 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.
@ -2375,49 +2381,45 @@ Journal
pression. pression.
Auto postings Auto postings
The = directive declares a rule for generating temporary extra postings The = directive declares an "auto posting rule", which adds extra post-
on transactions. Wherever the rule matches an existing posting, it can ings to existing transactions. (Remember, postings are the account
add one or more companion postings below that one, optionally influ- name & amount lines below a transaction's date & description.)
enced by the matched posting's amount. This can be useful for generat-
ing tax postings with a standard percentage, for example.
Note that depending on generated data is not ideal for financial In the journal, an auto posting rule looks quite like a transaction,
records (it's less portable, less future-proof, less auditable by oth- but instead of date and description it has = (mnemonic: "match") and a
ers, and less robust, since other features like balance assertions will query, like this:
depend on using or not using --auto).
An auto posting rule looks a bit like a transaction:
= QUERY = QUERY
ACCOUNT AMOUNT ACCOUNT AMOUNT
... ...
ACCOUNT [AMOUNT]
except the first line is an equals sign (mnemonic: = suggests match- Queries are just like command line queries; an account name substring
ing), followed by a query (which matches existing postings), and each is most common. Query terms containing spaces should be enclosed in
"posting" line describes a posting to be generated, and the posting single or double quotes.
amounts can be:
o a normal amount with a commodity symbol, eg $2. This will be used Each = rule works like this: when hledger is run with the --auto flag,
wherever the QUERY matches a posting in the journal, the rule's post-
ings are added to that transaction, immediately below the matched post-
ing. Note these generated postings are temporary, existing only for
the duration of the report, and only when --auto is used; they are not
saved in the journal file by hledger.
Generated postings' amounts can depend on the matched posting's amount.
So auto postings can be useful for, eg, adding tax postings with a
standard percentage. AMOUNT can be:
o a number with no commodity symbol, like 2. The matched posting's
commodity symbol will be added to this.
o a normal amount with a commodity symbol, like $2. This will be used
as-is. as-is.
o a number, eg 2. The commodity symbol (if any) from the matched post- o an asterisk followed by a number, like *2. This will multiply the
ing will be added to this. matched posting's amount (and total price, if any) by the number.
o a numeric multiplier, eg *2 (a star followed by a number N). The o an asterisk followed by an amount with commodity symbol, like *$2.
matched posting's amount (and total price, if any) will be multiplied This multiplies and also replaces the commodity symbol with this new
by N. one.
o a multiplier with a commodity symbol, eg *$2 (a star, number N, and
symbol S). The matched posting's amount will be multiplied by N, and
its commodity symbol will be replaced with S.
Any query term containing spaces must be enclosed in single or double
quotes, as on the command line. Eg, note the quotes around the second
query term below:
= expenses:groceries 'expenses:dining out'
(budget:funds:dining out) *-1
Some examples: Some examples:
@ -2450,6 +2452,14 @@ Journal
assets:checking:gifts -$20 assets:checking:gifts -$20
assets:checking $20 assets:checking $20
Note that depending fully on generated data such as this has some draw-
backs - it's less portable, less future-proof, less auditable by oth-
ers, and less robust (eg your balance assertions will depend on whether
you use or don't use --auto). An alternative is to use auto postings
in "one time" fashion - use them to help build a complex journal entry,
view it with hledger print --auto, and then copy that output into the
journal file to make it permanent.
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
@ -2542,9 +2552,9 @@ Journal
nancial data less portable, less future-proof, and less trustworthy in nancial data less portable, less future-proof, and less trustworthy in
an audit. an audit.
Balance assignments and prices Balance assignments and costs
A cost in a balance assignment will cause the calculated amount to have A cost in a balance assignment will cause the calculated amount to have
that price attached: that cost attached:
2019/1/1 2019/1/1
(a) = $1 @ 2 (a) = $1 @ 2
@ -2811,8 +2821,8 @@ CSV
ing on file extension ing on file extension
skip skip one or more header lines at start of file skip skip one or more header lines at start of file
date-format declare how to parse CSV dates/date-times date-format declare how to parse CSV dates/date-times
timezone declare the time zone of ambiguous CSV date- timezone declare the time zone of ambiguous CSV
times date-times
newest-first improve txn order when: there are multiple newest-first improve txn order when: there are multiple
records, newest first, all with the same date records, newest first, all with the same date
intra-day-reversed improve txn order when: same-day txns are in intra-day-reversed improve txn order when: same-day txns are in
@ -2943,10 +2953,10 @@ CSV
newest-first newest-first
hledger tries to ensure that the generated transactions will be ordered hledger tries to ensure that the generated transactions will be ordered
chronologically, including same-day transactions. Usually it can auto- chronologically, including same-day transactions. Usually it can
detect how the CSV records are ordered. But if it encounters CSV where auto-detect how the CSV records are ordered. But if it encounters CSV
all records are on the same date, it assumes that the records are old- where all records are on the same date, it assumes that the records are
est first. If in fact the CSV's records are normally newest first, oldest first. If in fact the CSV's records are normally newest first,
like: like:
2022-10-01, txn 3... 2022-10-01, txn 3...
@ -3139,9 +3149,9 @@ CSV
2. amount-in and amount-out work exactly like the above, but should be 2. amount-in and amount-out work exactly like the above, but should be
used when the CSV has two amount fields (such as "Debit" and used when the CSV has two amount fields (such as "Debit" and
"Credit", or "Inflow" and "Outflow"). Whichever field has a non- "Credit", or "Inflow" and "Outflow"). Whichever field has a
zero value will be used as the amount of the first and second post- non-zero value will be used as the amount of the first and second
ings. Here are some tips to avoid confusion: postings. Here are some tips to avoid confusion:
o It's not "amount-in for posting 1 and amount-out for posting 2", o It's not "amount-in for posting 1 and amount-out for posting 2",
it is "extract a single amount from the amount-in or amount-out it is "extract a single amount from the amount-in or amount-out
@ -3565,11 +3575,11 @@ CSV
c. If both fields can contain a non-zero value (or both can be c. If both fields can contain a non-zero value (or both can be
empty): empty):
The -in/-out rules normally choose the value which is non-zero/non- The -in/-out rules normally choose the value which is
empty. Some value pairs can be ambiguous, such as 1 and none. For non-zero/non-empty. Some value pairs can be ambiguous, such as 1
such cases, use conditional rules to help select the amount. Eg, and none. For such cases, use conditional rules to help select the
to handle the above you could select the value containing non-zero amount. Eg, to handle the above you could select the value con-
digits: taining non-zero digits:
fields date, description, in, out fields date, description, in, out
if %in [1-9] if %in [1-9]
@ -4021,12 +4031,12 @@ Timeclock
The time logging format of timeclock.el, as read by hledger. The time logging format of timeclock.el, as read by hledger.
hledger can read time logs in timeclock format. As with Ledger, these hledger can read time logs in timeclock format. As with Ledger, these
are (a subset of) timeclock.el's format, containing clock-in and clock- are (a subset of) timeclock.el's format, containing clock-in and
out entries as in the example below. The date is a simple date. The clock-out entries as in the example below. The date is a simple date.
time format is HH:MM[:SS][+-ZZZZ]. Seconds and timezone are optional. The time format is HH:MM[:SS][+-ZZZZ]. Seconds and timezone are op-
The timezone, if present, must be four digits and is ignored (currently tional. The timezone, if present, must be four digits and is ignored
the time is always interpreted as a local time). Lines beginning with (currently the time is always interpreted as a local time). Lines be-
# or ; or *, and blank lines, are ignored. ginning with # or ; or *, and blank lines, are ignored.
i 2015/03/30 09:00:00 some account optional description after 2 spaces ; optional comment, tags: i 2015/03/30 09:00:00 some account optional description after 2 spaces ; optional comment, tags:
o 2015/03/30 09:20:00 o 2015/03/30 09:20:00
@ -4056,8 +4066,8 @@ Timeclock
To generate time logs, ie to clock in and clock out, you could: To generate time logs, ie to clock in and clock out, you could:
o use emacs and the built-in timeclock.el, or the extended timeclock- o use emacs and the built-in timeclock.el, or the extended time-
x.el and perhaps the extras in ledgerutils.el clock-x.el and perhaps the extras in ledgerutils.el
o at the command line, use these bash aliases: shell alias ti="echo o at the command line, use these bash aliases: shell alias ti="echo
i `date '+%Y-%m-%d %H:%M:%S'` \$* >>$TIMELOG" alias to="echo o i `date '+%Y-%m-%d %H:%M:%S'` \$* >>$TIMELOG" alias to="echo o
@ -4575,8 +4585,8 @@ Time periods
Examples: Examples:
-p "every dates will be Mon, Wed, Fri; periods will be Mon- -p "every dates will be Mon, Wed, Fri; periods will be
mon,wed,fri" Tue, Wed-Thu, Fri-Sun mon,wed,fri" Mon-Tue, Wed-Thu, Fri-Sun
-p "every weekday" dates will be Mon, Tue, Wed, Thu, Fri; periods will -p "every weekday" dates will be Mon, Tue, Wed, Thu, Fri; periods will
be Mon, Tue, Wed, Thu, Fri-Sun be Mon, Tue, Wed, Thu, Fri-Sun
-p "every weekend- dates will be Sat, Sun; periods will be Sat, Sun-Fri -p "every weekend- dates will be Sat, Sun; periods will be Sat, Sun-Fri
@ -4591,50 +4601,60 @@ Depth
Queries Queries
One of hledger's strengths is being able to quickly report on a precise One of hledger's strengths is being able to quickly report on a precise
subset of your data. Most hledger commands accept optional query argu- subset of your data. Most hledger commands accept query arguments, to
ments to restrict their scope. The syntax is as follows: restrict their scope. Multiple query terms can be provided to build up
a more complex query.
o Zero or more space-separated query terms. These are most often ac- o By default, a query term is interpreted as a case-insensitive sub-
count name substrings: string pattern for matching account names:
utilities food:groceries car:fuel
dining groceries
o Patterns containing spaces or other special characters must be en-
closed in single or double quotes:
o Terms with spaces or other special characters should be enclosed in 'personal care'
quotes: o These patterns are actually regular expressions, so you can add reg-
exp metacharacters for more precision (see "Regular expressions"
above for details):
"personal care" '^expenses\b'
'food$'
o Regular expressions are also supported: 'fuel|repair'
'accounts (payable|receivable)'
"^expenses\b" o To match something other than account name, add one of the query type
"accounts (payable|receivable)" prefixes described in "Query types" below:
o Add a query type prefix to match other parts of the data:
date:202312- date:202312-
status: status:
desc:amazon desc:amazon
cur:USD cur:USD
"amt:>0" cur:\\$
amt:'>0'
o Add a not: prefix to negate: o Add a not: prefix to negate a term:
not:status:'*'
not:desc:'opening|closing'
not:cur:USD not:cur:USD
o Terms with different types are AND-ed, terms with the same type are
o Multiple unlike terms are AND-ed, multiple like terms are OR-ed OR-ed (mostly; see "Combining query terms" below). The following
query:
date:2022 desc:amazon desc:amzn date:2022 desc:amazon desc:amzn
(all transactions with "amazon" or "amzn" in description during 2022)
is interpreted as:
date is in 2022 AND ( transaction description contains "amazon" OR
"amzn" )
Query types Query types
Here are the types of query term available. Remember these can also be Here are the types of query term available. Remember these can also be
prefixed with not: to convert them into a negative match. prefixed with not: to convert them into a negative match.
acct:REGEX, REGEX acct:REGEX or REGEX
Match account names containing this (case insensitive) regular expres- Match account names containing this case insensitive regular expres-
sion. This is the default query type when there is no prefix, and reg- sion. This is the default query type, so we usually don't bother writ-
ular expression syntax is typically not needed, so usually we just ing the "acct:" prefix.
write an account name substring, like expenses or food.
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 equal to, less than, or Match postings with a single-commodity amount equal to, less than, or
@ -4883,8 +4903,7 @@ Forecasting
temporary "forecast transactions" for reporting purposes, according to temporary "forecast transactions" for reporting purposes, according to
periodic transaction rules defined in the journal. Each rule can gen- periodic transaction rules defined in the journal. Each rule can gen-
erate multiple recurring transactions, so by changing one rule you can erate multiple recurring transactions, so by changing one rule you can
change many forecasted transactions. (These same rules can also gener- change many forecasted transactions.
ate budget goals, described in Budgeting.)
Forecast transactions usually start after ordinary transactions end. Forecast transactions usually start after ordinary transactions end.
By default, they begin after your latest-dated ordinary transaction, or By default, they begin after your latest-dated ordinary transaction, or
@ -5210,8 +5229,6 @@ Cost reporting
Downsides: Downsides:
o This was added in hledger-1.29 and is still somewhat experimental.
o The precise format of the journal entry becomes more important. If o The precise format of the journal entry becomes more important. If
hledger can't detect and match up the cost and equity postings, it hledger can't detect and match up the cost and equity postings, it
will give a transaction balancing error. will give a transaction balancing error.
@ -5840,8 +5857,8 @@ PART 4: COMMANDS
It shows a flat list by default. With --tree, it uses indentation to It shows a flat list by default. With --tree, it uses indentation to
show the account hierarchy. In flat mode you can add --drop N to omit show the account hierarchy. In flat mode you can add --drop N to omit
the first few account name components. Account names can be depth- the first few account name components. Account names can be
clipped with depth:N or --depth N or -N. depth-clipped with depth:N or --depth N or -N.
With --types, it also shows each account's type, if it's known. (See With --types, it also shows each account's type, if it's known. (See
Declaring accounts > Account types.) Declaring accounts > Account types.)
@ -5959,8 +5976,11 @@ PART 4: COMMANDS
Starting the next transaction (. or ctrl-D/ctrl-C to quit) Starting the next transaction (. or ctrl-D/ctrl-C to quit)
Date [2015/05/22]: <CTRL-D> $ Date [2015/05/22]: <CTRL-D> $
On Microsoft Windows, the add command makes sure that no part of the If you enter a number with no commodity symbol, and you have declared a
file path ends with a period, as that would cause problems (#1056). default commodity with a D directive, you might expect add to add this
symbol for you. It does not do this; we assume that if you are using a
D directive you prefer not to see the commodity symbol repeated on
amounts in the journal.
aregister aregister
(areg) (areg)
@ -6388,7 +6408,7 @@ PART 4: COMMANDS
-E/--empty is used. -E/--empty is used.
o Amounts with many commodities are shown in abbreviated form, unless o Amounts with many commodities are shown in abbreviated form, unless
--no-elide is used. (experimental) --no-elide is used.
o Average and/or total columns can be added with the -A/--average and o Average and/or total columns can be added with the -A/--average and
-T/--row-total flags. -T/--row-total flags.
@ -6545,24 +6565,24 @@ PART 4: COMMANDS
For reference, here is what the combinations of accumulation and valua- For reference, here is what the combinations of accumulation and valua-
tion show: tion show:
Valua- no valuation --value= then --value= end --value= YYYY- Valua- no valuation --value= then --value= end --value=
tion:> MM-DD /now tion:> YYYY-MM-DD
Accumu- Accumu- /now
lation:v lation:v
----------------------------------------------------------------------------------- -----------------------------------------------------------------------------------
--change change in period sum of posting- period-end DATE-value of --change change in period sum of post- period-end DATE-value of
date market val- value of change change in pe- ing-date market value of change change in pe-
ues in period in period riod values in period in period riod
--cumu- change from re- sum of posting- period-end DATE-value of --cumu- change from re- sum of post- period-end DATE-value of
lative port start to date market val- value of change change from lative port start to ing-date market value of change change from
period end ues from report from report report start period end values from re- from report report start
start to period start to period to period end port start to pe- start to period to period end
end end riod end end
--his- change from sum of posting- period-end DATE-value of --his- change from sum of post- period-end DATE-value of
torical journal start to date market val- value of change change from torical journal start to ing-date market value of change change from
/-H period end (his- ues from journal from journal journal start /-H period end (his- values from jour- from journal journal start
torical end bal- start to period start to period to period end torical end bal- nal start to pe- start to period to period end
ance) end end ance) riod end end
Budget report Budget report
The --budget report type is like a regular balance report, but with two The --budget report type is like a regular balance report, but with two
@ -6868,9 +6888,9 @@ PART 4: COMMANDS
o Tidy layout produces normalised "tidy data", where every variable has o Tidy layout produces normalised "tidy data", where every variable has
its own column and each row represents a single data point. See its own column and each row represents a single data point. See
https://cran.r-project.org/web/packages/tidyr/vignettes/tidy- https://cran.r-project.org/web/packages/tidyr/vi-
data.html for more. This is the easiest kind of data for other soft- gnettes/tidy-data.html for more. This is the easiest kind of data
ware to consume. Here's how it looks: for other software to consume. Here's how it looks:
$ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -Y -O csv --layout=tidy $ hledger -f examples/bcexample.hledger bal assets:us:etrade -3 -Y -O csv --layout=tidy
"account","period","start_date","end_date","commodity","value" "account","period","start_date","end_date","commodity","value"
@ -6966,8 +6986,7 @@ PART 4: COMMANDS
flipped. flipped.
This command also supports the output destination and output format op- This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, html, and (exper- tions The output formats supported are txt, csv, tsv, html, and json.
imental) json.
balancesheetequity balancesheetequity
(bse) (bse)
@ -7062,8 +7081,7 @@ PART 4: COMMANDS
not:receivable, but with smarter account detection. not:receivable, but with smarter account detection.
This command also supports the output destination and output format op- This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, html, and (exper- tions The output formats supported are txt, csv, tsv, html, and json.
imental) json.
check check
Check for various kinds of errors in your data. Check for various kinds of errors in your data.
@ -7155,50 +7173,75 @@ PART 4: COMMANDS
close close
(equity) (equity)
Generate transactions which transfer account balances to and/or from A transaction-generating command which generates several kinds of
another account (typically equity). This can be useful for migrating "closing" and/or "opening" transactions useful in certain situations.
balances to a new journal file, or for merging earnings into equity at It prints one or two transactions to stdout, but does not write them to
end of accounting period. the journal file; you can append or copy them there when you are happy
with the output.
By default, it prints a transaction that zeroes out ALE accounts (as- This command is most often used when migrating balances to a new jour-
set, liability, equity accounts; this requires account types to be con- nal file, at the start of a new financial year. It can also be used to
figured); or if ACCTQUERY is provided, the accounts matched by that. "retain earnings" (transfer revenues and expenses to equity), or as a
sort of generic mover of balances from any group of accounts to some
other account. So it currently has six modes, selected by a mode flag.
Use only one of these flags at a time:
(experimental) 1. With --close (or no mode flag) it prints a "closing balances" trans-
action that zeroes out all the asset, liability, and equity account
This command has four main modes, corresponding to the most common use balances, by default (this requires inferred or declared account
cases: types). Or, it will zero out the accounts matched by any ACCTQUERY
arguments you provide. All of the balances are transferred to a
1. With --close (default), it prints a "closing balances" transaction special "opening/closing balances" equity account.
that zeroes out ALE (asset, liability, equity) accounts by default
(this requires account types to be inferred or declared); or, the
accounts matched by the provided ACCTQUERY arguments.
2. With --open, it prints an opposite "opening balances" transaction 2. With --open, it prints an opposite "opening balances" transaction
that restores those balances from zero. This is similar to Ledger's that restores the same account balances, starting from zero. This
equity command. mode is similar to Ledger's equity command.
3. With --migrate, it prints both the closing and opening transactions. 3. With --migrate, it prints both the closing and opening transactions
This is the preferred way to migrate balances to a new file: run above. This is a common way to migrate balances to a new file at
hledger close --migrate, add the closing transaction at the end of year end; run hledger close --migrate -e NEWYEAR (-e influences the
the old file, and add the opening transaction at the start of the transaction date) and add the closing transaction at the end of the
new file. The matching closing/opening transactions cancel each old file, and the opening transaction at the start of the new file.
other out, preserving correct balances during multi-file reporting. Doing this means you can include past year files in your reports at
any time without disturbing asset/liability/equity balances, because
the closing balances transaction cancels out the following opening
balances transaction. You will sometimes need to exclude these
transactions from reports, eg to see an end of year balance sheet; a
not:opening/closing query argument should do. You should probably
also use this query when close-ing, to exclude the "opening/closing
balances" account which might otherwise cause problems. Or you can
just migrate assets and liabilities: hledger close type:AL. Most
people don't need to migrate equity. And revenues and expenses usu-
ally should not be migrated.
4. With --retain, it prints a "retain earnings" transaction that trans- 4. With --assert it prints a "closing balances" transaction that just
fers RX (revenue and expense) balances to equity:retained earnings. asserts the current balances, without changing them. This can be
Businesses traditionally do this at the end of each accounting pe- useful as documention and to guard against errors and changes.
riod; it is less necessary with computer-based accounting, but it
could still be useful if you want to see the accounting equation
(A=L+E) satisfied.
In all modes, the defaults can be overridden: 5. With --assign it prints an "opening balances" transaction that re-
stores the account balances using balance assignments. Balance as-
signments work regardless of any previous balance, so a preceding
closing balances transaction is not needed. This is an alternative
to --close and --open: at year end, hledger close --assert -e
NEWYEAR in the old file (optional, but useful for error checking),
and hledger close --assign -e NEWYEAR in the new file. This might
be more convenient, eg if you are often doing cleanups or fixes
which would break closing/opening transactions.
6. With --retain, it prints a "retain earnings" transaction that trans-
fers revenue and expense balances to equity:retained earnings. This
is a traditional end-of-period bookkeeping operation also called
"closing the books"; in personal accounting you probably will not
need this but it could be useful if you want to see the accounting
equation (A=L+E) balanced.
In all modes, the following things can be overridden:
o the transaction descriptions can be changed with --close-desc=DESC o the transaction descriptions can be changed with --close-desc=DESC
and --open-desc=DESC and --open-desc=DESC
o the account to transfer to/from can be changed with --close-acct=ACCT o the account to transfer to and from can be changed with
and --open-acct=ACCT --close-acct=ACCT and --open-acct=ACCT
o the accounts to be closed/opened can be changed with ACCTQUERY (ac- o the accounts to be closed/opened can be changed with ACCTQUERY (ac-
count query arguments). count query arguments).
@ -7246,8 +7289,8 @@ PART 4: COMMANDS
assets:bank:checking -5 ; date: 2023-01-02 assets:bank:checking -5 ; date: 2023-01-02
To solve that you can transfer the money to and from a temporary ac- To solve that you can transfer the money to and from a temporary ac-
count, in effect splitting the multi-day transaction into two single- count, in effect splitting the multi-day transaction into two sin-
day transactions: gle-day transactions:
; in 2022.journal: ; in 2022.journal:
2022-12-30 a purchase made in december, cleared in january 2022-12-30 a purchase made in december, cleared in january
@ -7620,8 +7663,7 @@ PART 4: COMMANDS
sign flipped. sign flipped.
This command also supports the output destination and output format op- This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, html, and (exper- tions The output formats supported are txt, csv, tsv, html, and json.
imental) json.
notes notes
List the unique notes that appear in transactions. List the unique notes that appear in transactions.
@ -7781,14 +7823,14 @@ PART 4: COMMANDS
tions The output formats supported are txt, beancount, csv, tsv, json tions The output formats supported are txt, beancount, csv, tsv, json
and sql. and sql.
Experimental: The beancount format tries to produce Beancount-compati- The beancount format tries to produce Beancount-compatible output, as
ble output, as follows: follows:
o Transaction and postings with unmarked status are converted to o Transaction and postings with unmarked status are converted to
cleared (*) status. cleared (*) status.
o Transactions' payee and note are backslash-escaped and double-quote- o Transactions' payee and note are backslash-escaped and dou-
escaped and wrapped in double quotes. ble-quote-escaped and wrapped in double quotes.
o Transaction tags are copied to Beancount #tag format. o Transaction tags are copied to Beancount #tag format.
@ -7970,8 +8012,7 @@ PART 4: COMMANDS
$ hledger reg -w $COLUMNS,40 # use terminal width, & description width 40 $ hledger reg -w $COLUMNS,40 # use terminal width, & description width 40
This command also supports the output destination and output format op- This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, and (experimen- tions The output formats supported are txt, csv, tsv, and json.
tal) json.
rewrite rewrite
Print all transactions, rewriting the postings of matched transactions. Print all transactions, rewriting the postings of matched transactions.
@ -8249,12 +8290,12 @@ PART 4: COMMANDS
compensating for the effect that deposits and withdrawas have on the compensating for the effect that deposits and withdrawas have on the
apparent rate of growth of your investment. apparent rate of growth of your investment.
TWR represents your investment as an imaginary "unit fund" where in- TWR represents your investment as an imaginary "unit fund" where
flows/ out-flows lead to buying or selling "units" of your investment in-flows/ out-flows lead to buying or selling "units" of your invest-
and changes in its value change the value of "investment unit". Change ment and changes in its value change the value of "investment unit".
in "unit price" over the reporting period gives you rate of return of Change in "unit price" over the reporting period gives you rate of re-
your investment, and make TWR less sensitive than IRR to the effects of turn of your investment, and make TWR less sensitive than IRR to the
cash in-flows and out-flows. effects of cash in-flows and out-flows.
References: References:
@ -8301,8 +8342,8 @@ PART 4: COMMANDS
Run time : 0.12 s Run time : 0.12 s
Throughput : 8342 txns/s Throughput : 8342 txns/s
This command supports the -o/--output-file option (but not -O/--output- This command supports the -o/--output-file option (but not -O/--out-
format selection). put-format selection).
tags tags
List the tags used in the journal, or their values. List the tags used in the journal, or their values.
@ -8845,4 +8886,4 @@ LICENSE
SEE ALSO SEE ALSO
hledger(1), hledger-ui(1), hledger-web(1), ledger(1) hledger(1), hledger-ui(1), hledger-web(1), ledger(1)
hledger-1.32.99 December 2023 HLEDGER(1) hledger-1.32.99 January 2024 HLEDGER(1)