;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_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_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
hledger-ui - robust, friendly plain text accounting (TUI version)
hledger\-ui \- robust, friendly plain text accounting (TUI version)
.SH SYNOPSIS
\f[CR]hledger-ui [OPTS] [QUERYARGS]\f[R]
\f[CR]hledger\-ui [OPTS] [QUERYARGS]\f[R]
.PD 0
.P
.PD
\f[CR]hledger ui -- [OPTS] [QUERYARGS]\f[R]
\f[CR]hledger ui \-\- [OPTS] [QUERYARGS]\f[R]
.SH DESCRIPTION
This manual is for hledger\[aq]s terminal interface, version 1.32.99.
See also the hledger manual for common concepts and file formats.
.PP
hledger is a robust, user-friendly, cross-platform set of programs for
tracking money, time, or any other commodity, using double-entry
hledger is a robust, user\-friendly, cross\-platform set of programs for
tracking money, time, or any other commodity, using double\-entry
accounting and a simple, editable file format.
hledger is inspired by and largely compatible with ledger(1), and
largely interconvertible with beancount(1).
.PP
hledger-ui is hledger\[aq]s terminal interface, providing an efficient
full-window text UI for viewing accounts and transactions, and some
hledger\-ui is hledger\[aq]s terminal interface, providing an efficient
full\-window text UI for viewing accounts and transactions, and some
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.
.PP
Like hledger, it reads from (and appends to) a journal file specified by
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]-f\f[R] options.
\f[CR]\-f\f[R] options.
It can also read timeclock files, timedot files, or any CSV/SSV/TSV file
with a date field.
(See hledger(1) -> Input for details.)
(See hledger(1) \-> Input for details.)
.PP
Unlike hledger, hledger-ui hides all future-dated transactions by
Unlike hledger, hledger\-ui hides all future\-dated transactions by
default.
They can be revealed, along with any rule-generated periodic
transactions, by pressing the F key (or starting with --forecast) to
They can be revealed, along with any rule\-generated periodic
transactions, by pressing the F key (or starting with \-\-forecast) to
enable \[dq]forecast mode\[dq].
.SH OPTIONS
Any QUERYARGS are interpreted as a hledger search query which filters
the data.
.PP
hledger-ui provides the following options:
hledger\-ui provides the following options:
.TP
\f[CR]-w --watch\f[R]
\f[CR]\-w \-\-watch\f[R]
watch for data and date changes and reload automatically
.TP
\f[CR]--theme=default|terminal|greenterm\f[R]
\f[CR]\-\-theme=default|terminal|greenterm\f[R]
use this custom display theme
.TP
\f[CR]--menu\f[R]
\f[CR]\-\-menu\f[R]
start in the menu screen
.TP
\f[CR]--cash\f[R]
\f[CR]\-\-cash\f[R]
start in the cash accounts screen
.TP
\f[CR]--bs\f[R]
\f[CR]\-\-bs\f[R]
start in the balance sheet accounts screen
.TP
\f[CR]--is\f[R]
\f[CR]\-\-is\f[R]
start in the income statement accounts screen
.TP
\f[CR]--all\f[R]
\f[CR]\-\-all\f[R]
start in the all accounts screen
.TP
\f[CR]--register=ACCTREGEX\f[R]
\f[CR]\-\-register=ACCTREGEX\f[R]
start in the (first) matched account\[aq]s register screen
.TP
\f[CR]--change\f[R]
\f[CR]\-\-change\f[R]
show period balances (changes) at startup instead of historical balances
.TP
\f[CR]-l --flat\f[R]
\f[CR]\-l \-\-flat\f[R]
show accounts as a flat list (default)
.TP
\f[CR]-t --tree\f[R]
\f[CR]\-t \-\-tree\f[R]
show accounts as a tree
.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):
.SS General help options
.TP
\f[CR]-h --help\f[R]
\f[CR]\-h \-\-help\f[R]
show general or COMMAND help
.TP
\f[CR]--man\f[R]
\f[CR]\-\-man\f[R]
show general or COMMAND user manual with man
.TP
\f[CR]--info\f[R]
\f[CR]\-\-info\f[R]
show general or COMMAND user manual with info
.TP
\f[CR]--version\f[R]
\f[CR]\-\-version\f[R]
show general or ADDONCMD version
.TP
\f[CR]--debug[=N]\f[R]
show debug output (levels 1-9, default: 1)
\f[CR]\-\-debug[=N]\f[R]
show debug output (levels 1\-9, default: 1)
.SS General input options
.TP
\f[CR]-f FILE --file=FILE\f[R]
\f[CR]\-f FILE \-\-file=FILE\f[R]
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])
.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)
.TP
\f[CR]--separator=CHAR\f[R]
\f[CR]\-\-separator=CHAR\f[R]
Field separator to expect when reading CSV (default: \[aq],\[aq])
.TP
\f[CR]--alias=OLD=NEW\f[R]
\f[CR]\-\-alias=OLD=NEW\f[R]
rename accounts named OLD to NEW
.TP
\f[CR]--anon\f[R]
\f[CR]\-\-anon\f[R]
anonymize accounts and payees
.TP
\f[CR]--pivot FIELDNAME\f[R]
\f[CR]\-\-pivot FIELDNAME\f[R]
use some other field or tag for the account name
.TP
\f[CR]-I --ignore-assertions\f[R]
\f[CR]\-I \-\-ignore\-assertions\f[R]
disable balance assertion checks (note: does not disable balance
assignments)
.TP
\f[CR]-s --strict\f[R]
\f[CR]\-s \-\-strict\f[R]
do extra error checking (check that all posted accounts are declared)
.SS General reporting options
.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
preceding subperiod start when using a report interval)
.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
subperiod end when using a report interval)
.TP
\f[CR]-D --daily\f[R]
\f[CR]\-D \-\-daily\f[R]
multiperiod/multicolumn report by day
.TP
\f[CR]-W --weekly\f[R]
\f[CR]\-W \-\-weekly\f[R]
multiperiod/multicolumn report by week
.TP
\f[CR]-M --monthly\f[R]
\f[CR]\-M \-\-monthly\f[R]
multiperiod/multicolumn report by month
.TP
\f[CR]-Q --quarterly\f[R]
\f[CR]\-Q \-\-quarterly\f[R]
multiperiod/multicolumn report by quarter
.TP
\f[CR]-Y --yearly\f[R]
\f[CR]\-Y \-\-yearly\f[R]
multiperiod/multicolumn report by year
.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
period expressions syntax
.TP
\f[CR]--date2\f[R]
\f[CR]\-\-date2\f[R]
match the secondary date instead (see command help for other effects)
.TP
\f[CR]--today=DATE\f[R]
\f[CR]\-\-today=DATE\f[R]
override today\[aq]s date (affects relative smart dates, for
tests/examples)
.TP
\f[CR]-U --unmarked\f[R]
include only unmarked postings/txns (can combine with -P or -C)
\f[CR]\-U \-\-unmarked\f[R]
include only unmarked postings/txns (can combine with \-P or \-C)
.TP
\f[CR]-P --pending\f[R]
\f[CR]\-P \-\-pending\f[R]
include only pending postings/txns
.TP
\f[CR]-C --cleared\f[R]
\f[CR]\-C \-\-cleared\f[R]
include only cleared postings/txns
.TP
\f[CR]-R --real\f[R]
include only non-virtual postings
\f[CR]\-R \-\-real\f[R]
include only non\-virtual postings
.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
.TP
\f[CR]-E --empty\f[R]
show items with zero amount, normally hidden (and vice-versa in
hledger-ui/hledger-web)
\f[CR]\-E \-\-empty\f[R]
show items with zero amount, normally hidden (and vice\-versa in
hledger\-ui/hledger\-web)
.TP
\f[CR]-B --cost\f[R]
\f[CR]\-B \-\-cost\f[R]
convert amounts to their cost/selling amount at transaction time
.TP
\f[CR]-V --market\f[R]
\f[CR]\-V \-\-market\f[R]
convert amounts to their market value in default valuation commodities
.TP
\f[CR]-X --exchange=COMM\f[R]
\f[CR]\-X \-\-exchange=COMM\f[R]
convert amounts to their market value in commodity COMM
.TP
\f[CR]--value\f[R]
convert amounts to cost or market value, more flexibly than -B/-V/-X
\f[CR]\-\-value\f[R]
convert amounts to cost or market value, more flexibly than \-B/\-V/\-X
.TP
\f[CR]--infer-equity\f[R]
\f[CR]\-\-infer\-equity\f[R]
infer conversion equity postings from costs
.TP
\f[CR]--infer-costs\f[R]
\f[CR]\-\-infer\-costs\f[R]
infer costs from conversion equity postings
.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
.TP
\f[CR]--forecast\f[R]
\f[CR]\-\-forecast\f[R]
generate transactions from periodic rules,
between the latest recorded txn and 6 months from today,
or during the specified PERIOD (= is required).
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
\f[CR]--auto\f[R]
\f[CR]\-\-auto\f[R]
generate extra postings by applying auto posting rules to all txns (not
just forecast txns)
.TP
\f[CR]--verbose-tags\f[R]
\f[CR]\-\-verbose\-tags\f[R]
add visible tags indicating transactions or postings which have been
generated/modified
.TP
\f[CR]--commodity-style\f[R]
\f[CR]\-\-commodity\-style\f[R]
Override the commodity style in the output for the specified commodity.
For example \[aq]EUR1.000,00\[aq].
.TP
\f[CR]--color=WHEN (or --colour=WHEN)\f[R]
Should color-supporting commands use ANSI color codes in text output.
\[aq]auto\[aq] (default): whenever stdout seems to be a color-supporting
terminal.
\f[CR]\-\-color=WHEN (or \-\-colour=WHEN)\f[R]
Should color\-supporting commands use ANSI color codes in text output.
\[aq]auto\[aq] (default): whenever stdout seems to be a
color\-supporting terminal.
\[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.
A NO_COLOR environment variable overrides this.
.TP
\f[CR]--pretty[=WHEN]\f[R]
\f[CR]\-\-pretty[=WHEN]\f[R]
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],
\[aq]n\[aq], \[aq]always\[aq], \[aq]never\[aq] also work).
If you provide an argument you must use \[aq]=\[aq], e.g.
\[aq]--pretty=yes\[aq].
\[aq]\-\-pretty=yes\[aq].
.PP
When a reporting option appears more than once in the command line, the
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,
\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.
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])
and VI-style (\f[CR]k\f[R],\f[CR]j\f[R],\f[CR]l\f[R],\f[CR]h\f[R])
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])
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.
A tip: movement speed is limited by your keyboard repeat rate, to move
faster you may want to adjust it.
@ -274,36 +274,36 @@ faster you may want to adjust it.
.PP
With shift pressed, the cursor keys adjust the report period, limiting
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.
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.
With the \f[CR]-w/--watch\f[R] option, when viewing a \[dq]current\[dq]
period (the current day, week, month, quarter, or year), the period will
move automatically to track the current date.
To set a non-standard period, you can use \f[CR]/\f[R] and a
With the \f[CR]\-w/\-\-watch\f[R] option, when viewing a
\[dq]current\[dq] period (the current day, week, month, quarter, or
year), the period will move automatically to track the current date.
To set a non\-standard period, you can use \f[CR]/\f[R] and a
\f[CR]date:\f[R] query.
.PP
(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, press CMD-comma to
(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, press CMD\-comma to
open preferences, click Profiles, select your current terminal profile
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:
\f[CR]\[rs]033[1;2A\f[R].
Shift\-Down: \f[CR]\[rs]033[1;2B\f[R], click + and add this for
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
can\[aq]t type it directly.)
.PP
\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.
While editing the query, you can use CTRL-a/e/d/k, BS, cursor keys;
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;
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
account depth and transaction status (see below).
\f[CR]BACKSPACE\f[R] or \f[CR]DELETE\f[R] removes all filters, showing
all transactions.
.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
transactions generated by rule.
\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.
Or, it cancels minibuffer data entry or the help dialog.
.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
don\[aq]t scroll above the top).
.PP
@ -325,17 +325,17 @@ screen and any previous screens.
Disabling balance assertions temporarily can be useful for
troubleshooting.
.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.
This allows some basic data entry.
.PP
\f[CR]A\f[R] is like \f[CR]a\f[R], but runs the hledger-iadd tool, which
provides a terminal interface.
This key will be available if \f[CR]hledger-iadd\f[R] is installed in
\f[CR]A\f[R] is like \f[CR]a\f[R], but runs the hledger\-iadd tool,
which provides a terminal interface.
This key will be available if \f[CR]hledger\-iadd\f[R] is installed in
$path.
.PP
\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
current transaction when invoked from the register and transaction
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,
.IP "1." 3
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
today.
.IP "2." 3
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
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
on.
.PP
Cost/value tips: - When showing end value, you can change the report end
date without restarting, by pressing \f[CR]/\f[R] and adding a query
like \f[CR]date:..YYYY-MM-DD\f[R].
- Either cost mode, or value mode, can be active, but not both at once.
Cost/value tips: \- When showing end value, you can change the report
end date without restarting, by pressing \f[CR]/\f[R] and adding a query
like \f[CR]date:..YYYY\-MM\-DD\f[R].
\- Either cost mode, or value mode, can be active, but not both at once.
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.
.PP
\f[CR]q\f[R] quits the application.
.PP
Additional screen-specific keys are described below.
Additional screen\-specific keys are described below.
.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:
\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.
Or you can use \f[CR]ESC\f[R] to return directly to the top menu screen.
.PP
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],
\f[CR]--all\f[R], or \f[CR]--register=ACCT\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]).
.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
various types.
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.
.RE
.PP
Note, this screen combines each transaction\[aq]s in-period postings to
a single line item, dated with the earliest in-period transaction or
Note, this screen combines each transaction\[aq]s in\-period postings to
a single line item, dated with the earliest in\-period transaction or
posting date (like hledger\[aq]s \f[CR]aregister\f[R]).
So custom posting dates can cause the running balance to be temporarily
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.
.PP
\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
command-line hledger).
nonzero change are shown (hledger\-ui shows zero items by default,
unlike command\-line hledger).
.PP
Press \f[CR]RIGHT\f[R] to view the selected transaction in detail.
.SS Transaction
@ -482,12 +482,12 @@ your text editor with the cursor positioned at the current transaction
if possible.
.PP
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
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
(or use \f[CR]-w/--watch\f[R] mode) - press \f[CR]LEFT\f[R] then
\f[CR]RIGHT\f[R] to exit and re-enter the transaction screen.
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 (or use \f[CR]\-w/\-\-watch\f[R] mode) \- press \f[CR]LEFT\f[R]
then \f[CR]RIGHT\f[R] to exit and re\-enter the transaction screen.
.SS Error
This screen will appear if there is a problem, such as a parse error,
when you press g to reload.
@ -496,35 +496,35 @@ normal operation.
(Or, you can press escape to cancel the reload attempt.)
.SH TIPS
.SS Watch mode
One of hledger-ui\[aq]s best features is the auto-reloading
\f[CR]-w/--watch\f[R] mode.
One of hledger\-ui\[aq]s best features is the auto\-reloading
\f[CR]\-w/\-\-watch\f[R] mode.
With this flag, it will update the display automatically whenever
changes are saved to the data files.
.PP
This is very useful when reconciling.
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
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
.EX
$ hledger-ui --watch --register checking -C
$ hledger\-ui \-\-watch \-\-register checking \-C
.EE
.PP
As you mark things cleared in the editor, you can see the effect
immediately without having to context switch.
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.
.PP
There are currently some limitations with \f[CR]--watch\f[R]:
There are currently some limitations with \f[CR]\-\-watch\f[R]:
.PP
It may not work correctly for you, depending on platform or system
configuration.
(Eg #836.)
.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
\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
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
@ -536,17 +536,17 @@ know.)
If you are viewing files mounted from another machine, the system clocks
on both machines should be roughly in agreement.
.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.
This will be logged to the file \f[CR]hledger-ui.log\f[R] in the current
directory.
This will be logged to the file \f[CR]hledger\-ui.log\f[R] in the
current directory.
N ranges from 1 (least output, the default) to 9 (maximum output).
.SH ENVIRONMENT
\f[B]COLUMNS\f[R] The screen width to use.
Default: the full terminal width.
.PP
\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].
.SH BUGS
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
Some known issues:
.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
If you press \f[CR]g\f[R] with large files, there could be a noticeable
pause.
.PP
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
\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).

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
START-INFO-DIR-ENTRY
@ -673,47 +673,47 @@ above).

Tag Table:
Node: Top223
Node: OPTIONS1832
Ref: #options1930
Node: General help options2953
Ref: #general-help-options3102
Node: General input options3384
Ref: #general-input-options3569
Node: General reporting options4271
Ref: #general-reporting-options4435
Node: MOUSE7825
Ref: #mouse7920
Node: KEYS8157
Ref: #keys8250
Node: SCREENS12905
Ref: #screens13003
Node: Menu13583
Ref: #menu13676
Node: Cash accounts13871
Ref: #cash-accounts14013
Node: Balance sheet accounts14197
Ref: #balance-sheet-accounts14378
Node: Income statement accounts14498
Ref: #income-statement-accounts14684
Node: All accounts14848
Ref: #all-accounts14994
Node: Register15176
Ref: #register15300
Node: Transaction17584
Ref: #transaction17707
Node: Error19124
Ref: #error19218
Node: TIPS19462
Ref: #tips19561
Node: Watch mode19603
Ref: #watch-mode19710
Node: Debug output21169
Ref: #debug-output21280
Node: ENVIRONMENT21492
Ref: #environment21602
Node: BUGS21793
Ref: #bugs21876
Node: Top221
Node: OPTIONS1830
Ref: #options1928
Node: General help options2951
Ref: #general-help-options3100
Node: General input options3382
Ref: #general-input-options3567
Node: General reporting options4269
Ref: #general-reporting-options4433
Node: MOUSE7823
Ref: #mouse7918
Node: KEYS8155
Ref: #keys8248
Node: SCREENS12903
Ref: #screens13001
Node: Menu13581
Ref: #menu13674
Node: Cash accounts13869
Ref: #cash-accounts14011
Node: Balance sheet accounts14195
Ref: #balance-sheet-accounts14376
Node: Income statement accounts14496
Ref: #income-statement-accounts14682
Node: All accounts14846
Ref: #all-accounts14992
Node: Register15174
Ref: #register15298
Node: Transaction17582
Ref: #transaction17705
Node: Error19122
Ref: #error19216
Node: TIPS19460
Ref: #tips19559
Node: Watch mode19601
Ref: #watch-mode19708
Node: Debug output21167
Ref: #debug-output21278
Node: ENVIRONMENT21490
Ref: #environment21600
Node: BUGS21791
Ref: #bugs21874

End Tag Table

View File

@ -20,9 +20,9 @@ DESCRIPTION
hledger-ui is hledger's terminal interface, providing an efficient
full-window text UI for viewing accounts and transactions, and some
limited data entry capability. It is easier than hledger's command-
line interface, and sometimes quicker and more convenient than the web
interface.
limited data entry capability. It is easier than hledger's com-
mand-line interface, and sometimes quicker and more convenient than the
web interface.
Like hledger, it reads from (and appends to) a journal file specified
by the LEDGER_FILE environment variable (defaulting to
@ -198,8 +198,8 @@ OPTIONS
generate transactions from periodic rules, between the latest
recorded txn and 6 months from today, or during the specified
PERIOD (= is required). Auto posting rules will be applied to
these transactions as well. Also, in hledger-ui make future-
dated transactions visible.
these transactions as well. Also, in hledger-ui make fu-
ture-dated transactions visible.
--auto generate extra postings by applying auto posting rules to all
txns (not just forecast txns)
@ -214,9 +214,9 @@ OPTIONS
--color=WHEN (or --colour=WHEN)
Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A
output. 'auto' (default): whenever stdout seems to be a
color-supporting terminal. 'always' or 'yes': always, useful eg
when piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this.
--pretty[=WHEN]
@ -257,22 +257,22 @@ KEYS
that.)
With shift pressed, the cursor keys adjust the report period, limiting
the transactions to be shown (by default, all are shown). SHIFT-
DOWN/UP steps downward and upward through these standard report period
durations: year, quarter, month, week, day. Then, SHIFT-LEFT/RIGHT
moves to the previous/next period. T sets the report period to today.
With the -w/--watch option, when viewing a "current" period (the cur-
rent day, week, month, quarter, or year), the period will move automat-
ically to track the current date. To set a non-standard period, you
can use / and a date: query.
the transactions to be shown (by default, all are shown).
SHIFT-DOWN/UP steps downward and upward through these standard report
period durations: year, quarter, month, week, day. Then,
SHIFT-LEFT/RIGHT moves to the previous/next period. T sets the report
period to today. With the -w/--watch option, when viewing a "current"
period (the current day, week, month, quarter, or year), the period
will move automatically to track the current date. To set a non-stan-
dard period, you can use / and a date: query.
(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,
press CMD-comma to open preferences, click Profiles, select your cur-
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-
Up: \033[1;2A. Press the Escape key to enter the \033 part, you can't
type it directly.)
and add this for Shift-Down: \033[1;2B, click + and add this for
Shift-Up: \033[1;2A. Press the Escape key to enter the \033 part, you
can't type it directly.)
/ 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
@ -446,8 +446,8 @@ SCREENS
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,
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-
enter the transaction screen.
file (or use -w/--watch mode) - press LEFT then RIGHT to exit and
re-enter the transaction screen.
Error
This screen will appear if there is a problem, such as a parse error,
@ -537,4 +537,4 @@ LICENSE
SEE ALSO
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_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
hledger-web - robust, friendly plain text accounting (Web version)
hledger\-web \- robust, friendly plain text accounting (Web version)
.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
.P
.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
This manual is for hledger\[aq]s web interface, version 1.32.99.
See also the hledger manual for common concepts and file formats.
.PP
hledger is a robust, user-friendly, cross-platform set of programs for
tracking money, time, or any other commodity, using double-entry
hledger is a robust, user\-friendly, cross\-platform set of programs for
tracking money, time, or any other commodity, using double\-entry
accounting and a simple, editable file format.
hledger is inspired by and largely compatible with ledger(1), and
largely interconvertible with beancount(1).
.PP
hledger-web is a simple web application for browsing and adding
hledger\-web is a simple web application for browsing and adding
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,
balance charts) and allowing history-aware data entry, interactive
balance charts) and allowing history\-aware data entry, interactive
searching, and bookmarking.
.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.
There is no access control, so if you need that you should put it behind
a suitable web proxy.
@ -39,260 +39,262 @@ every edit.
Like hledger, it reads from (and appends to) a journal file specified by
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]-f\f[R] options.
\f[CR]\-f\f[R] options.
It can also read timeclock files, timedot files, or any CSV/SSV/TSV file
with a date field.
(See hledger(1) -> Input for details.)
(See hledger(1) \-> Input for details.)
.PP
hledger-web can be run in three modes:
hledger\-web can be run in three modes:
.IP \[bu] 2
Transient mode (the default): your default web browser will be opened to
show the app if possible, and the app exits automatically after two
minutes of inactivity (no requests received and no open browser windows
viewing it).
.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.
.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
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.
.SH OPTIONS
hledger-web provides the following options:
hledger\-web provides the following options:
.TP
\f[CR]--serve\f[R]
serve and log requests, don\[aq]t browse or auto-exit after timeout
\f[CR]\-\-serve\f[R]
serve and log requests, don\[aq]t browse or auto\-exit after timeout
.TP
\f[CR]--serve-api\f[R]
like --serve, but serve only the JSON web API, not the web UI
\f[CR]\-\-serve\-api\f[R]
like \-\-serve, but serve only the JSON web API, not the web UI
.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:
\f[CR]add\f[R]).
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
\f[CR]--cors=ORIGIN\f[R]
allow cross-origin requests from the specified origin; setting ORIGIN to
\[dq]*\[dq] allows requests from any origin
\f[CR]\-\-cors=ORIGIN\f[R]
allow cross\-origin requests from the specified origin; setting ORIGIN
to \[dq]*\[dq] allows requests from any origin
.TP
\f[CR]--host=IPADDR\f[R]
\f[CR]\-\-host=IPADDR\f[R]
listen on this IP address (default: 127.0.0.1)
.PP
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..
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.
The special address \f[CR]0.0.0.0\f[R] causes it to listen on all
addresses configured on the machine.
.TP
\f[CR]--port=PORT\f[R]
\f[CR]\-\-port=PORT\f[R]
listen on this TCP port (default: 5000)
.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.
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.
.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
only; implies --serve)
only; implies \-\-serve)
.PP
When \f[CR]--socket\f[R] is used, hledger-web creates and communicates
via a socket file instead of a TCP port.
When \f[CR]\-\-socket\f[R] is used, hledger\-web creates and
communicates via a socket file instead of a TCP port.
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.
(Eg:
\f[CR]proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;\f[R].)
.TP
\f[CR]--base-url=URL\f[R]
\f[CR]\-\-base\-url=URL\f[R]
set the base url (default: http://IPADDR:PORT).
.PP
You can use \f[CR]--base-url\f[R] to change the protocol, hostname, port
and path that appear in hledger-web\[aq]s hyperlinks.
This is useful eg when integrating hledger-web within a larger website.
You can use \f[CR]\-\-base\-url\f[R] to change the protocol, hostname,
port and path that appear in hledger\-web\[aq]s hyperlinks.
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
configured host address and TCP port (or \f[CR]http://HOST\f[R] if PORT
is 80).
Note this affects url generation but not route parsing.
.TP
\f[CR]--test\f[R]
run hledger-web\[aq]s tests and exit.
hspec test runner args may follow a --, eg: hledger-web --test -- --help
\f[CR]\-\-test\f[R]
run hledger\-web\[aq]s tests and exit.
hspec test runner args may follow a \-\-, eg: hledger\-web \-\-test \-\-
\-\-help
.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
although not shown in the UI, will restrict the data shown, in addition
to any search query entered in the UI.
.SS General help options
.TP
\f[CR]-h --help\f[R]
\f[CR]\-h \-\-help\f[R]
show general or COMMAND help
.TP
\f[CR]--man\f[R]
\f[CR]\-\-man\f[R]
show general or COMMAND user manual with man
.TP
\f[CR]--info\f[R]
\f[CR]\-\-info\f[R]
show general or COMMAND user manual with info
.TP
\f[CR]--version\f[R]
\f[CR]\-\-version\f[R]
show general or ADDONCMD version
.TP
\f[CR]--debug[=N]\f[R]
show debug output (levels 1-9, default: 1)
\f[CR]\-\-debug[=N]\f[R]
show debug output (levels 1\-9, default: 1)
.SS General input options
.TP
\f[CR]-f FILE --file=FILE\f[R]
\f[CR]\-f FILE \-\-file=FILE\f[R]
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])
.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)
.TP
\f[CR]--separator=CHAR\f[R]
\f[CR]\-\-separator=CHAR\f[R]
Field separator to expect when reading CSV (default: \[aq],\[aq])
.TP
\f[CR]--alias=OLD=NEW\f[R]
\f[CR]\-\-alias=OLD=NEW\f[R]
rename accounts named OLD to NEW
.TP
\f[CR]--anon\f[R]
\f[CR]\-\-anon\f[R]
anonymize accounts and payees
.TP
\f[CR]--pivot FIELDNAME\f[R]
\f[CR]\-\-pivot FIELDNAME\f[R]
use some other field or tag for the account name
.TP
\f[CR]-I --ignore-assertions\f[R]
\f[CR]\-I \-\-ignore\-assertions\f[R]
disable balance assertion checks (note: does not disable balance
assignments)
.TP
\f[CR]-s --strict\f[R]
\f[CR]\-s \-\-strict\f[R]
do extra error checking (check that all posted accounts are declared)
.SS General reporting options
.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
preceding subperiod start when using a report interval)
.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
subperiod end when using a report interval)
.TP
\f[CR]-D --daily\f[R]
\f[CR]\-D \-\-daily\f[R]
multiperiod/multicolumn report by day
.TP
\f[CR]-W --weekly\f[R]
\f[CR]\-W \-\-weekly\f[R]
multiperiod/multicolumn report by week
.TP
\f[CR]-M --monthly\f[R]
\f[CR]\-M \-\-monthly\f[R]
multiperiod/multicolumn report by month
.TP
\f[CR]-Q --quarterly\f[R]
\f[CR]\-Q \-\-quarterly\f[R]
multiperiod/multicolumn report by quarter
.TP
\f[CR]-Y --yearly\f[R]
\f[CR]\-Y \-\-yearly\f[R]
multiperiod/multicolumn report by year
.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
period expressions syntax
.TP
\f[CR]--date2\f[R]
\f[CR]\-\-date2\f[R]
match the secondary date instead (see command help for other effects)
.TP
\f[CR]--today=DATE\f[R]
\f[CR]\-\-today=DATE\f[R]
override today\[aq]s date (affects relative smart dates, for
tests/examples)
.TP
\f[CR]-U --unmarked\f[R]
include only unmarked postings/txns (can combine with -P or -C)
\f[CR]\-U \-\-unmarked\f[R]
include only unmarked postings/txns (can combine with \-P or \-C)
.TP
\f[CR]-P --pending\f[R]
\f[CR]\-P \-\-pending\f[R]
include only pending postings/txns
.TP
\f[CR]-C --cleared\f[R]
\f[CR]\-C \-\-cleared\f[R]
include only cleared postings/txns
.TP
\f[CR]-R --real\f[R]
include only non-virtual postings
\f[CR]\-R \-\-real\f[R]
include only non\-virtual postings
.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
.TP
\f[CR]-E --empty\f[R]
show items with zero amount, normally hidden (and vice-versa in
hledger-ui/hledger-web)
\f[CR]\-E \-\-empty\f[R]
show items with zero amount, normally hidden (and vice\-versa in
hledger\-ui/hledger\-web)
.TP
\f[CR]-B --cost\f[R]
\f[CR]\-B \-\-cost\f[R]
convert amounts to their cost/selling amount at transaction time
.TP
\f[CR]-V --market\f[R]
\f[CR]\-V \-\-market\f[R]
convert amounts to their market value in default valuation commodities
.TP
\f[CR]-X --exchange=COMM\f[R]
\f[CR]\-X \-\-exchange=COMM\f[R]
convert amounts to their market value in commodity COMM
.TP
\f[CR]--value\f[R]
convert amounts to cost or market value, more flexibly than -B/-V/-X
\f[CR]\-\-value\f[R]
convert amounts to cost or market value, more flexibly than \-B/\-V/\-X
.TP
\f[CR]--infer-equity\f[R]
\f[CR]\-\-infer\-equity\f[R]
infer conversion equity postings from costs
.TP
\f[CR]--infer-costs\f[R]
\f[CR]\-\-infer\-costs\f[R]
infer costs from conversion equity postings
.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
.TP
\f[CR]--forecast\f[R]
\f[CR]\-\-forecast\f[R]
generate transactions from periodic rules,
between the latest recorded txn and 6 months from today,
or during the specified PERIOD (= is required).
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
\f[CR]--auto\f[R]
\f[CR]\-\-auto\f[R]
generate extra postings by applying auto posting rules to all txns (not
just forecast txns)
.TP
\f[CR]--verbose-tags\f[R]
\f[CR]\-\-verbose\-tags\f[R]
add visible tags indicating transactions or postings which have been
generated/modified
.TP
\f[CR]--commodity-style\f[R]
\f[CR]\-\-commodity\-style\f[R]
Override the commodity style in the output for the specified commodity.
For example \[aq]EUR1.000,00\[aq].
.TP
\f[CR]--color=WHEN (or --colour=WHEN)\f[R]
Should color-supporting commands use ANSI color codes in text output.
\[aq]auto\[aq] (default): whenever stdout seems to be a color-supporting
terminal.
\f[CR]\-\-color=WHEN (or \-\-colour=WHEN)\f[R]
Should color\-supporting commands use ANSI color codes in text output.
\[aq]auto\[aq] (default): whenever stdout seems to be a
color\-supporting terminal.
\[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.
A NO_COLOR environment variable overrides this.
.TP
\f[CR]--pretty[=WHEN]\f[R]
\f[CR]\-\-pretty[=WHEN]\f[R]
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],
\[aq]n\[aq], \[aq]always\[aq], \[aq]never\[aq] also work).
If you provide an argument you must use \[aq]=\[aq], e.g.
\[aq]--pretty=yes\[aq].
\[aq]\-\-pretty=yes\[aq].
.PP
When a reporting option appears more than once in the command line, the
last one takes precedence.
.PP
Some reporting options can also be written as query arguments.
.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.
.PP
You can restrict who can reach it by
.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
machine.
.IP \[bu] 2
@ -302,22 +304,24 @@ custom firewall rules
.PP
You can restrict what the users who reach it can do, by
.IP \[bu] 2
using the \f[CR]--capabilities=CAP[,CAP..]\f[R] flag when you start it,
enabling one or more of the following capabilities.
using the \f[CR]\-\-capabilities=CAP[,CAP..]\f[R] flag when you start
it, enabling one or more of the following capabilities.
The default value is \f[CR]view,add\f[R]:
.RS 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
\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
\f[CR]manage\f[R] - allows editing, uploading or downloading the main or
included files
\f[CR]manage\f[R] \- allows editing, uploading or downloading the main
or included files
.RE
.IP \[bu] 2
using the \f[CR]--capabilities-header=HTTPHEADER\f[R] flag to specify a
HTTP header from which it will read capabilities to enable.
hledger-web on Sandstorm uses the X-Sandstorm-Permissions header to
using the \f[CR]\-\-capabilities\-header=HTTPHEADER\f[R] flag to specify
a HTTP header from which it will read capabilities to enable.
hledger\-web on Sandstorm uses the X\-Sandstorm\-Permissions header to
integrate with Sandstorm\[aq]s permissions.
This is disabled by default.
.SH EDITING, UPLOADING, DOWNLOADING
@ -330,35 +334,35 @@ any files it includes.
Note, unlike any other hledger command, in this mode you (or any
visitor) can alter or wipe the data files.
.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
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
with a cron job or a file watcher like entr).
.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.
(Probably.
This needs re-testing.)
This needs re\-testing.)
.SH RELOADING
hledger-web detects changes made to the files by other means (eg if you
edit it directly, outside of hledger-web), and it will show the new data
when you reload the page or navigate to a new page.
If a change makes a file unparseable, hledger-web will display an error
hledger\-web detects changes made to the files by other means (eg if you
edit it directly, outside of hledger\-web), and it will show the new
data when you reload the page or navigate to a new page.
If a change makes a file unparseable, hledger\-web will display an error
message until the file has been fixed.
.PP
(Note: if you are viewing files mounted from another machine, make sure
that both machine clocks are roughly in step.)
.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.
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.
Eg:
.IP
.EX
$ hledger-web -f examples/sample.journal --serve-api
$ hledger\-web \-f examples/sample.journal \-\-serve\-api
\&...
.EE
.PP
@ -375,11 +379,11 @@ You can get JSON data from these routes:
.EE
.PP
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
prettify it):
(hledger\-web\[aq]s JSON does not include newlines, here we use python
to prettify it):
.IP
.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:bank\[dq],
@ -400,12 +404,12 @@ $ curl -s http://127.0.0.1:5000/accountnames | python -m json.tool
Or all transactions:
.IP
.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]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]tdescription\[dq]: \[dq]income\[dq],
\[dq]tindex\[dq]: 1,
@ -436,21 +440,21 @@ returns an AccountTransactionsReport, which consists of a report title
and a list of AccountTransactionsReportItem (etc).
.PP
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).
The payload must be the full, exact JSON representation of a hledger
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
hledger-lib, eg like so:
hledger\-lib, eg like so:
.IP
.EX
\&.../hledger$ stack ghci hledger-lib
\&.../hledger$ stack ghci hledger\-lib
>>> writeJsonFile \[dq]txn.json\[dq] (head $ jtxns samplejournal)
>>> :q
.EE
.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):
.IP
.EX
@ -496,9 +500,9 @@ corresponds to hledger\[aq]s Transaction and related data types):
\[dq]aprice\[dq]: null,
\[dq]acommodity\[dq]: \[dq]$\[dq],
\[dq]aquantity\[dq]: {
\[dq]floatingPoint\[dq]: -1,
\[dq]floatingPoint\[dq]: \-1,
\[dq]decimalPlaces\[dq]: 10,
\[dq]decimalMantissa\[dq]: -10000000000
\[dq]decimalMantissa\[dq]: \-10000000000
},
\[dq]aismultiplier\[dq]: false,
\[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]tindex\[dq]: 1,
\[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:
.IP
.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
.SH 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.
N ranges from 1 (least output, the default) to 9 (maximum output).
Typically you would start with 1 and increase until you are seeing
@ -561,10 +565,10 @@ stderr, eg:
.PD 0
.P
.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
\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].
.SH BUGS
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
Some known issues:
.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

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
START-INFO-DIR-ENTRY
@ -631,31 +631,31 @@ http://bugs.hledger.org), or on the #hledger chat or hledger mail list

Tag Table:
Node: Top225
Node: OPTIONS2580
Ref: #options2685
Node: General help options5259
Ref: #general-help-options5409
Node: General input options5691
Ref: #general-input-options5877
Node: General reporting options6579
Ref: #general-reporting-options6744
Node: PERMISSIONS10134
Ref: #permissions10273
Node: EDITING UPLOADING DOWNLOADING11485
Ref: #editing-uploading-downloading11666
Node: RELOADING12500
Ref: #reloading12634
Node: JSON API13067
Ref: #json-api13182
Node: DEBUG OUTPUT18670
Ref: #debug-output18795
Node: Debug output18822
Ref: #debug-output-118923
Node: ENVIRONMENT19340
Ref: #environment19459
Node: BUGS19576
Ref: #bugs19660
Node: Top223
Node: OPTIONS2578
Ref: #options2683
Node: General help options5257
Ref: #general-help-options5407
Node: General input options5689
Ref: #general-input-options5875
Node: General reporting options6577
Ref: #general-reporting-options6742
Node: PERMISSIONS10132
Ref: #permissions10271
Node: EDITING UPLOADING DOWNLOADING11483
Ref: #editing-uploading-downloading11664
Node: RELOADING12498
Ref: #reloading12632
Node: JSON API13065
Ref: #json-api13180
Node: DEBUG OUTPUT18668
Ref: #debug-output18793
Node: Debug output18820
Ref: #debug-output-118921
Node: ENVIRONMENT19338
Ref: #environment19457
Node: BUGS19574
Ref: #bugs19658

End Tag Table

View File

@ -238,8 +238,8 @@ OPTIONS
generate transactions from periodic rules, between the latest
recorded txn and 6 months from today, or during the specified
PERIOD (= is required). Auto posting rules will be applied to
these transactions as well. Also, in hledger-ui make future-
dated transactions visible.
these transactions as well. Also, in hledger-ui make fu-
ture-dated transactions visible.
--auto generate extra postings by applying auto posting rules to all
txns (not just forecast txns)
@ -254,9 +254,9 @@ OPTIONS
--color=WHEN (or --colour=WHEN)
Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A
output. 'auto' (default): whenever stdout seems to be a
color-supporting terminal. 'always' or 'yes': always, useful eg
when piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this.
--pretty[=WHEN]
@ -551,4 +551,4 @@ LICENSE
SEE ALSO
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_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
hyphen argument, required before add-on-specific options. Eg: hledger
ui -- --watch or hledger web -- --serve. If this causes difficulty,
you can always run the add-on directly, without using hledger: hledger-
ui --watch or hledger-web --serve.
you can always run the add-on directly, without using hledger:
hledger-ui --watch or hledger-web --serve.
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
recorded txn and 6 months from today, or during the specified
PERIOD (= is required). Auto posting rules will be applied to
these transactions as well. Also, in hledger-ui make future-
dated transactions visible.
these transactions as well. Also, in hledger-ui make fu-
ture-dated transactions visible.
--auto generate extra postings by applying auto posting rules to all
txns (not just forecast txns)
@ -363,9 +363,9 @@ Options
--color=WHEN (or --colour=WHEN)
Should color-supporting commands use ANSI color codes in text
output. 'auto' (default): whenever stdout seems to be a color-
supporting terminal. 'always' or 'yes': always, useful eg when
piping output into 'less -R'. 'never' or 'no': never. A
output. 'auto' (default): whenever stdout seems to be a
color-supporting terminal. 'always' or 'yes': always, useful eg
when piping output into 'less -R'. 'never' or 'no': never. A
NO_COLOR environment variable overrides this.
--pretty[=WHEN]
@ -465,8 +465,8 @@ Command line tips
line, by all hledger tools (add, iadd, hledger-web's search/add/edit
forms, etc.)
o they should be displayed correctly by all hledger tools, and on-
screen alignment should be preserved.
o they should be displayed correctly by all hledger tools, and
on-screen alignment should be preserved.
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-
sentation of hledger's internal data types. To understand the JSON,
read the Haskell type definitions, which are mostly in
https://github.com/simonmichael/hledger/blob/master/hledger-
lib/Hledger/Data/Types.hs.
https://github.com/simonmichael/hledger/blob/mas-
ter/hledger-lib/Hledger/Data/Types.hs.
o hledger represents quantities as Decimal values storing up to 255
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-
ings to the same account within a transaction.)
So, hledger balance assertions keep working if you reorder differently-
dated transactions within the journal. But if you reorder same-dated
transactions or postings, assertions might break and require updating.
This order dependence does bring an advantage: precise control over the
order of postings and assertions within a day, so you can assert intra-
day balances.
So, hledger balance assertions keep working if you reorder differ-
ently-dated transactions within the journal. But if you reorder
same-dated transactions or postings, assertions might break and require
updating. This order dependence does bring an advantage: precise con-
trol over the order of postings and assertions within a day, so you can
assert intra-day balances.
Assertions and multiple included files
Multiple files included with the include directive are processed as if
@ -1666,8 +1666,8 @@ Journal
Directive effects
Here are all hledger's directives, with their effects and scope sum-
marised - nine main directives, plus four others which we consider non-
essential:
marised - nine main directives, plus four others which we consider
non-essential:
di- what it does ends
rec- at
@ -1690,11 +1690,11 @@ Journal
(Ledger-compatible syntax). Command line equivalent: -c/--com-
modity-style
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-
mark rent file. Included files can override. Takes precedence over
mal-mark ties in following entries until next decimal-mark or end of cur-
rent file. Included files can override. Takes precedence over
commodity and D.
in- Includes entries and directives from another file, as if they N
clude were written inline. Command line alternative: multiple
include Includes entries and directives from another file, as if they N
were written inline. Command line alternative: multiple
-f/--file
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
@ -1944,8 +1944,8 @@ Journal
o customising reports
Account aliases also rewrite account names in account directives. They
do not affect account names being entered via hledger add or hledger-
web.
do not affect account names being entered via hledger add or
hledger-web.
Account aliases are very powerful. They are generally easy to use cor-
rectly, but you can also generate invalid account names with them; more
@ -2284,12 +2284,18 @@ Journal
declare and check your tags .
Periodic transactions
The ~ directive declares recurring transactions. Such directives allow
hledger to generate temporary future transactions (visible in reports,
not in the journal file) to help with forecasting or budgeting.
The ~ directive declares a "periodic rule" which generates temporary
extra transactions, usually recurring at some interval, when hledger is
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,
read this whole section, or at least these tips:
Periodic rules also have a second use: with the --budget flag they set
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 -
read about this below.
@ -2375,49 +2381,45 @@ Journal
pression.
Auto postings
The = directive declares a rule for generating temporary extra postings
on transactions. Wherever the rule matches an existing posting, it can
add one or more companion postings below that one, optionally influ-
enced by the matched posting's amount. This can be useful for generat-
ing tax postings with a standard percentage, for example.
The = directive declares an "auto posting rule", which adds extra post-
ings to existing transactions. (Remember, postings are the account
name & amount lines below a transaction's date & description.)
Note that depending on generated data is not ideal for financial
records (it's less portable, less future-proof, less auditable by oth-
ers, and less robust, since other features like balance assertions will
depend on using or not using --auto).
An auto posting rule looks a bit like a transaction:
In the journal, an auto posting rule looks quite like a transaction,
but instead of date and description it has = (mnemonic: "match") and a
query, like this:
= QUERY
ACCOUNT AMOUNT
...
ACCOUNT [AMOUNT]
except the first line is an equals sign (mnemonic: = suggests match-
ing), followed by a query (which matches existing postings), and each
"posting" line describes a posting to be generated, and the posting
amounts can be:
Queries are just like command line queries; an account name substring
is most common. Query terms containing spaces should be enclosed in
single or double quotes.
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.
o a number, eg 2. The commodity symbol (if any) from the matched post-
ing will be added to this.
o an asterisk followed by a number, like *2. This will multiply the
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
matched posting's amount (and total price, if any) will be multiplied
by N.
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
o an asterisk followed by an amount with commodity symbol, like *$2.
This multiplies and also replaces the commodity symbol with this new
one.
Some examples:
@ -2450,6 +2452,14 @@ Journal
assets:checking:gifts -$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
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
@ -2542,9 +2552,9 @@ Journal
nancial data less portable, less future-proof, and less trustworthy in
an audit.
Balance assignments and prices
Balance assignments and costs
A cost in a balance assignment will cause the calculated amount to have
that price attached:
that cost attached:
2019/1/1
(a) = $1 @ 2
@ -2811,8 +2821,8 @@ CSV
ing on file extension
skip skip one or more header lines at start of file
date-format declare how to parse CSV dates/date-times
timezone declare the time zone of ambiguous CSV date-
times
timezone declare the time zone of ambiguous CSV
date-times
newest-first improve txn order when: there are multiple
records, newest first, all with the same date
intra-day-reversed improve txn order when: same-day txns are in
@ -2943,10 +2953,10 @@ CSV
newest-first
hledger tries to ensure that the generated transactions will be ordered
chronologically, including same-day transactions. Usually it can auto-
detect how the CSV records are ordered. But if it encounters CSV where
all records are on the same date, it assumes that the records are old-
est first. If in fact the CSV's records are normally newest first,
chronologically, including same-day transactions. Usually it can
auto-detect how the CSV records are ordered. But if it encounters CSV
where all records are on the same date, it assumes that the records are
oldest first. If in fact the CSV's records are normally newest first,
like:
2022-10-01, txn 3...
@ -3139,9 +3149,9 @@ CSV
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
"Credit", or "Inflow" and "Outflow"). Whichever field has a non-
zero value will be used as the amount of the first and second post-
ings. Here are some tips to avoid confusion:
"Credit", or "Inflow" and "Outflow"). Whichever field has a
non-zero value will be used as the amount of the first and second
postings. Here are some tips to avoid confusion:
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
@ -3565,11 +3575,11 @@ CSV
c. If both fields can contain a non-zero value (or both can be
empty):
The -in/-out rules normally choose the value which is non-zero/non-
empty. Some value pairs can be ambiguous, such as 1 and none. For
such cases, use conditional rules to help select the amount. Eg,
to handle the above you could select the value containing non-zero
digits:
The -in/-out rules normally choose the value which is
non-zero/non-empty. Some value pairs can be ambiguous, such as 1
and none. For such cases, use conditional rules to help select the
amount. Eg, to handle the above you could select the value con-
taining non-zero digits:
fields date, description, in, out
if %in [1-9]
@ -4021,12 +4031,12 @@ Timeclock
The time logging format of timeclock.el, as read by hledger.
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-
out entries as in the example below. The date is a simple date. The
time format is HH:MM[:SS][+-ZZZZ]. Seconds and timezone are optional.
The timezone, if present, must be four digits and is ignored (currently
the time is always interpreted as a local time). Lines beginning with
# or ; or *, and blank lines, are ignored.
are (a subset of) timeclock.el's format, containing clock-in and
clock-out entries as in the example below. The date is a simple date.
The time format is HH:MM[:SS][+-ZZZZ]. Seconds and timezone are op-
tional. The timezone, if present, must be four digits and is ignored
(currently the time is always interpreted as a local time). Lines be-
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:
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:
o use emacs and the built-in timeclock.el, or the extended timeclock-
x.el and perhaps the extras in ledgerutils.el
o use emacs and the built-in timeclock.el, or the extended time-
clock-x.el and perhaps the extras in ledgerutils.el
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
@ -4575,8 +4585,8 @@ Time periods
Examples:
-p "every dates will be Mon, Wed, Fri; periods will be Mon-
mon,wed,fri" Tue, Wed-Thu, Fri-Sun
-p "every dates will be Mon, Wed, Fri; periods will be
mon,wed,fri" Mon-Tue, Wed-Thu, Fri-Sun
-p "every weekday" dates will be Mon, Tue, Wed, Thu, Fri; periods will
be Mon, Tue, Wed, Thu, Fri-Sun
-p "every weekend- dates will be Sat, Sun; periods will be Sat, Sun-Fri
@ -4591,50 +4601,60 @@ Depth
Queries
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-
ments to restrict their scope. The syntax is as follows:
subset of your data. Most hledger commands accept query arguments, to
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-
count name substrings:
o By default, a query term is interpreted as a case-insensitive sub-
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
quotes:
'personal care'
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"
o Regular expressions are also supported:
"^expenses\b"
"accounts (payable|receivable)"
o Add a query type prefix to match other parts of the data:
'^expenses\b'
'food$'
'fuel|repair'
'accounts (payable|receivable)'
o To match something other than account name, add one of the query type
prefixes described in "Query types" below:
date:202312-
status:
desc:amazon
cur:USD
"amt:>0"
o Add a not: prefix to negate:
cur:\\$
amt:'>0'
o Add a not: prefix to negate a term:
not:status:'*'
not:desc:'opening|closing'
not:cur:USD
o Multiple unlike terms are AND-ed, multiple like terms are OR-ed
o Terms with different types are AND-ed, terms with the same type are
OR-ed (mostly; see "Combining query terms" below). The following
query:
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
Here are the types of query term available. Remember these can also be
prefixed with not: to convert them into a negative match.
acct:REGEX, REGEX
Match account names containing this (case insensitive) regular expres-
sion. This is the default query type when there is no prefix, and reg-
ular expression syntax is typically not needed, so usually we just
write an account name substring, like expenses or food.
acct:REGEX or REGEX
Match account names containing this case insensitive regular expres-
sion. This is the default query type, so we usually don't bother writ-
ing the "acct:" prefix.
amt:N, amt:<N, amt:<=N, amt:>N, amt:>=N
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
periodic transaction rules defined in the journal. Each rule can gen-
erate multiple recurring transactions, so by changing one rule you can
change many forecasted transactions. (These same rules can also gener-
ate budget goals, described in Budgeting.)
change many forecasted transactions.
Forecast transactions usually start after ordinary transactions end.
By default, they begin after your latest-dated ordinary transaction, or
@ -5210,8 +5229,6 @@ Cost reporting
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
hledger can't detect and match up the cost and equity postings, it
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
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-
clipped with depth:N or --depth N or -N.
the first few account name components. Account names can be
depth-clipped with depth:N or --depth N or -N.
With --types, it also shows each account's type, if it's known. (See
Declaring accounts > Account types.)
@ -5959,8 +5976,11 @@ PART 4: COMMANDS
Starting the next transaction (. or ctrl-D/ctrl-C to quit)
Date [2015/05/22]: <CTRL-D> $
On Microsoft Windows, the add command makes sure that no part of the
file path ends with a period, as that would cause problems (#1056).
If you enter a number with no commodity symbol, and you have declared a
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
(areg)
@ -6388,7 +6408,7 @@ PART 4: COMMANDS
-E/--empty is used.
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
-T/--row-total flags.
@ -6545,24 +6565,24 @@ PART 4: COMMANDS
For reference, here is what the combinations of accumulation and valua-
tion show:
Valua- no valuation --value= then --value= end --value= YYYY-
tion:> MM-DD /now
Accumu-
Valua- no valuation --value= then --value= end --value=
tion:> YYYY-MM-DD
Accumu- /now
lation:v
-----------------------------------------------------------------------------------
--change change in period sum of posting- period-end DATE-value of
date market val- value of change change in pe-
ues in period in period riod
--cumu- change from re- sum of posting- period-end DATE-value of
lative port start to date market val- value of change change from
period end ues from report from report report start
start to period start to period to period end
end end
--his- change from sum of posting- period-end DATE-value of
torical journal start to date market val- value of change change from
/-H period end (his- ues from journal from journal journal start
torical end bal- start to period start to period to period end
ance) end end
--change change in period sum of post- period-end DATE-value of
ing-date market value of change change in pe-
values in period in period riod
--cumu- change from re- sum of post- period-end DATE-value of
lative port start to ing-date market value of change change from
period end values from re- from report report start
port start to pe- start to period to period end
riod end end
--his- change from sum of post- period-end DATE-value of
torical journal start to ing-date market value of change change from
/-H period end (his- values from jour- from journal journal start
torical end bal- nal start to pe- start to period to period end
ance) riod end end
Budget report
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
its own column and each row represents a single data point. See
https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-
data.html for more. This is the easiest kind of data for other soft-
ware to consume. Here's how it looks:
https://cran.r-project.org/web/packages/tidyr/vi-
gnettes/tidy-data.html for more. This is the easiest kind of data
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
"account","period","start_date","end_date","commodity","value"
@ -6966,8 +6986,7 @@ PART 4: COMMANDS
flipped.
This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, html, and (exper-
imental) json.
tions The output formats supported are txt, csv, tsv, html, and json.
balancesheetequity
(bse)
@ -7062,8 +7081,7 @@ PART 4: COMMANDS
not:receivable, but with smarter account detection.
This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, html, and (exper-
imental) json.
tions The output formats supported are txt, csv, tsv, html, and json.
check
Check for various kinds of errors in your data.
@ -7155,50 +7173,75 @@ PART 4: COMMANDS
close
(equity)
Generate transactions which transfer account balances to and/or from
another account (typically equity). This can be useful for migrating
balances to a new journal file, or for merging earnings into equity at
end of accounting period.
A transaction-generating command which generates several kinds of
"closing" and/or "opening" transactions useful in certain situations.
It prints one or two transactions to stdout, but does not write them to
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-
set, liability, equity accounts; this requires account types to be con-
figured); or if ACCTQUERY is provided, the accounts matched by that.
This command is most often used when migrating balances to a new jour-
nal file, at the start of a new financial year. It can also be used to
"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)
This command has four main modes, corresponding to the most common use
cases:
1. With --close (default), it prints a "closing balances" transaction
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.
1. With --close (or no mode flag) it prints a "closing balances" trans-
action that zeroes out all the asset, liability, and equity account
balances, by default (this requires inferred or declared account
types). Or, it will zero out the accounts matched by any ACCTQUERY
arguments you provide. All of the balances are transferred to a
special "opening/closing balances" equity account.
2. With --open, it prints an opposite "opening balances" transaction
that restores those balances from zero. This is similar to Ledger's
equity command.
that restores the same account balances, starting from zero. This
mode is similar to Ledger's equity command.
3. With --migrate, it prints both the closing and opening transactions.
This is the preferred way to migrate balances to a new file: run
hledger close --migrate, add the closing transaction at the end of
the old file, and add the opening transaction at the start of the
new file. The matching closing/opening transactions cancel each
other out, preserving correct balances during multi-file reporting.
3. With --migrate, it prints both the closing and opening transactions
above. This is a common way to migrate balances to a new file at
year end; run hledger close --migrate -e NEWYEAR (-e influences the
transaction date) and add the closing transaction at the end of the
old file, and the opening transaction at the start of the new file.
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-
fers RX (revenue and expense) balances to equity:retained earnings.
Businesses traditionally do this at the end of each accounting pe-
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.
4. With --assert it prints a "closing balances" transaction that just
asserts the current balances, without changing them. This can be
useful as documention and to guard against errors and changes.
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
and --open-desc=DESC
o the account to transfer to/from can be changed with --close-acct=ACCT
and --open-acct=ACCT
o the account to transfer to and from can be changed with
--close-acct=ACCT and --open-acct=ACCT
o the accounts to be closed/opened can be changed with ACCTQUERY (ac-
count query arguments).
@ -7246,8 +7289,8 @@ PART 4: COMMANDS
assets:bank:checking -5 ; date: 2023-01-02
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-
day transactions:
count, in effect splitting the multi-day transaction into two sin-
gle-day transactions:
; in 2022.journal:
2022-12-30 a purchase made in december, cleared in january
@ -7620,8 +7663,7 @@ PART 4: COMMANDS
sign flipped.
This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, html, and (exper-
imental) json.
tions The output formats supported are txt, csv, tsv, html, and json.
notes
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
and sql.
Experimental: The beancount format tries to produce Beancount-compati-
ble output, as follows:
The beancount format tries to produce Beancount-compatible output, as
follows:
o Transaction and postings with unmarked status are converted to
cleared (*) status.
o Transactions' payee and note are backslash-escaped and double-quote-
escaped and wrapped in double quotes.
o Transactions' payee and note are backslash-escaped and dou-
ble-quote-escaped and wrapped in double quotes.
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
This command also supports the output destination and output format op-
tions The output formats supported are txt, csv, tsv, and (experimen-
tal) json.
tions The output formats supported are txt, csv, tsv, and json.
rewrite
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
apparent rate of growth of your investment.
TWR represents your investment as an imaginary "unit fund" where in-
flows/ out-flows lead to buying or selling "units" of your investment
and changes in its value change the value of "investment unit". Change
in "unit price" over the reporting period gives you rate of return of
your investment, and make TWR less sensitive than IRR to the effects of
cash in-flows and out-flows.
TWR represents your investment as an imaginary "unit fund" where
in-flows/ out-flows lead to buying or selling "units" of your invest-
ment and changes in its value change the value of "investment unit".
Change in "unit price" over the reporting period gives you rate of re-
turn of your investment, and make TWR less sensitive than IRR to the
effects of cash in-flows and out-flows.
References:
@ -8301,8 +8342,8 @@ PART 4: COMMANDS
Run time : 0.12 s
Throughput : 8342 txns/s
This command supports the -o/--output-file option (but not -O/--output-
format selection).
This command supports the -o/--output-file option (but not -O/--out-
put-format selection).
tags
List the tags used in the journal, or their values.
@ -8845,4 +8886,4 @@ LICENSE
SEE ALSO
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)