mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
;doc: update manuals
This commit is contained in:
parent
ebda894b23
commit
352b0bc1b5
@ -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
|
||||
|
@ -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
|
||||
|
@ -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).
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -20,23 +20,23 @@ 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
|
||||
$HOME/.hledger.journal); or you can specify files with -f options. It
|
||||
can also read timeclock files, timedot files, or any CSV/SSV/TSV file
|
||||
Like hledger, it reads from (and appends to) a journal file specified
|
||||
by the LEDGER_FILE environment variable (defaulting to
|
||||
$HOME/.hledger.journal); or you can specify files with -f 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.)
|
||||
|
||||
Unlike hledger, hledger-ui hides all future-dated transactions by de-
|
||||
fault. They can be revealed, along with any rule-generated periodic
|
||||
transactions, by pressing the F key (or starting with --forecast) to
|
||||
Unlike hledger, hledger-ui hides all future-dated transactions by de-
|
||||
fault. They can be revealed, along with any rule-generated periodic
|
||||
transactions, by pressing the F key (or starting with --forecast) to
|
||||
enable "forecast mode".
|
||||
|
||||
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.
|
||||
|
||||
hledger-ui provides the following options:
|
||||
@ -61,7 +61,7 @@ OPTIONS
|
||||
start in the (first) matched account's register screen
|
||||
|
||||
--change
|
||||
show period balances (changes) at startup instead of historical
|
||||
show period balances (changes) at startup instead of historical
|
||||
balances
|
||||
|
||||
-l --flat
|
||||
@ -70,7 +70,7 @@ OPTIONS
|
||||
-t --tree
|
||||
show accounts as a tree
|
||||
|
||||
hledger-ui also supports many of hledger's general options (and the
|
||||
hledger-ui also supports many of hledger's general options (and the
|
||||
hledger manual's command line tips also apply here):
|
||||
|
||||
General help options
|
||||
@ -93,7 +93,7 @@ OPTIONS
|
||||
$LEDGER_FILE or $HOME/.hledger.journal)
|
||||
|
||||
--rules-file=RULESFILE
|
||||
Conversion rules file to use when reading CSV (default:
|
||||
Conversion rules file to use when reading CSV (default:
|
||||
FILE.rules)
|
||||
|
||||
--separator=CHAR
|
||||
@ -112,7 +112,7 @@ OPTIONS
|
||||
assignments)
|
||||
|
||||
-s --strict
|
||||
do extra error checking (check that all posted accounts are de-
|
||||
do extra error checking (check that all posted accounts are de-
|
||||
clared)
|
||||
|
||||
General reporting options
|
||||
@ -140,7 +140,7 @@ OPTIONS
|
||||
multiperiod/multicolumn report by year
|
||||
|
||||
-p --period=PERIODEXP
|
||||
set start date, end date, and/or reporting interval all at once
|
||||
set start date, end date, and/or reporting interval all at once
|
||||
using period expressions syntax
|
||||
|
||||
--date2
|
||||
@ -148,7 +148,7 @@ OPTIONS
|
||||
fects)
|
||||
|
||||
--today=DATE
|
||||
override today's date (affects relative smart dates, for
|
||||
override today's date (affects relative smart dates, for
|
||||
tests/examples)
|
||||
|
||||
-U --unmarked
|
||||
@ -167,21 +167,21 @@ OPTIONS
|
||||
hide/aggregate accounts or postings more than NUM levels deep
|
||||
|
||||
-E --empty
|
||||
show items with zero amount, normally hidden (and vice-versa in
|
||||
show items with zero amount, normally hidden (and vice-versa in
|
||||
hledger-ui/hledger-web)
|
||||
|
||||
-B --cost
|
||||
convert amounts to their cost/selling amount at transaction time
|
||||
|
||||
-V --market
|
||||
convert amounts to their market value in default valuation com-
|
||||
convert amounts to their market value in default valuation com-
|
||||
modities
|
||||
|
||||
-X --exchange=COMM
|
||||
convert amounts to their market value in commodity COMM
|
||||
|
||||
--value
|
||||
convert amounts to cost or market value, more flexibly than
|
||||
convert amounts to cost or market value, more flexibly than
|
||||
-B/-V/-X
|
||||
|
||||
--infer-equity
|
||||
@ -191,32 +191,32 @@ OPTIONS
|
||||
infer costs from conversion equity postings
|
||||
|
||||
--infer-market-prices
|
||||
use costs as additional market prices, as if they were P direc-
|
||||
use costs as additional market prices, as if they were P direc-
|
||||
tives
|
||||
|
||||
--forecast
|
||||
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.
|
||||
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 fu-
|
||||
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)
|
||||
|
||||
--verbose-tags
|
||||
add visible tags indicating transactions or postings which have
|
||||
add visible tags indicating transactions or postings which have
|
||||
been generated/modified
|
||||
|
||||
--commodity-style
|
||||
Override the commodity style in the output for the specified
|
||||
Override the commodity style in the output for the specified
|
||||
commodity. For example 'EUR1.000,00'.
|
||||
|
||||
--color=WHEN (or --colour=WHEN)
|
||||
Should color-supporting commands use ANSI color codes in text
|
||||
output. 'auto' (default): whenever stdout seems to be a color-
|
||||
supporting terminal. 'always' or 'yes': always, useful eg when
|
||||
piping output into 'less -R'. 'never' or 'no': never. A
|
||||
Should color-supporting commands use ANSI color codes in text
|
||||
output. 'auto' (default): whenever stdout seems to be a
|
||||
color-supporting terminal. 'always' or 'yes': always, useful eg
|
||||
when piping output into 'less -R'. 'never' or 'no': never. A
|
||||
NO_COLOR environment variable overrides this.
|
||||
|
||||
--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-
|
||||
(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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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,15 +254,15 @@ 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]
|
||||
Show prettier output, e.g. using unicode box-drawing charac-
|
||||
ters. Accepts 'yes' (the default) or 'no' ('y', 'n', 'always',
|
||||
'never' also work). If you provide an argument you must use
|
||||
Show prettier output, e.g. using unicode box-drawing charac-
|
||||
ters. Accepts 'yes' (the default) or 'no' ('y', 'n', 'always',
|
||||
'never' also work). If you provide an argument you must use
|
||||
'=', e.g. '--pretty=yes'.
|
||||
|
||||
When a reporting option appears more than once in the command line, the
|
||||
@ -271,13 +271,13 @@ OPTIONS
|
||||
Some reporting options can also be written as query arguments.
|
||||
|
||||
PERMISSIONS
|
||||
By default, hledger-web allows anyone who can reach it to view the
|
||||
By default, hledger-web allows anyone who can reach it to view the
|
||||
journal and to add new transactions, but not to change existing data.
|
||||
|
||||
You can restrict who can reach it by
|
||||
|
||||
o setting the IP address it listens on (see --host above). By default
|
||||
it listens on 127.0.0.1, accessible to all users on the local ma-
|
||||
o setting the IP address it listens on (see --host above). By default
|
||||
it listens on 127.0.0.1, accessible to all users on the local ma-
|
||||
chine.
|
||||
|
||||
o putting it behind an authenticating proxy, using eg apache or nginx
|
||||
@ -287,44 +287,44 @@ PERMISSIONS
|
||||
You can restrict what the users who reach it can do, by
|
||||
|
||||
o using the --capabilities=CAP[,CAP..] flag when you start it, enabling
|
||||
one or more of the following capabilities. The default value is
|
||||
one or more of the following capabilities. The default value is
|
||||
view,add:
|
||||
|
||||
o view - allows viewing the journal file and all included files
|
||||
|
||||
o add - allows adding new transactions to the main journal file
|
||||
|
||||
o manage - allows editing, uploading or downloading the main or in-
|
||||
o manage - allows editing, uploading or downloading the main or in-
|
||||
cluded files
|
||||
|
||||
o using the --capabilities-header=HTTPHEADER flag to specify a HTTP
|
||||
header from which it will read capabilities to enable. hledger-web
|
||||
on Sandstorm uses the X-Sandstorm-Permissions header to integrate
|
||||
o using the --capabilities-header=HTTPHEADER flag to specify a HTTP
|
||||
header from which it will read capabilities to enable. hledger-web
|
||||
on Sandstorm uses the X-Sandstorm-Permissions header to integrate
|
||||
with Sandstorm's permissions. This is disabled by default.
|
||||
|
||||
EDITING, UPLOADING, DOWNLOADING
|
||||
If you enable the manage capability mentioned above, you'll see a new
|
||||
"spanner" button to the right of the search form. Clicking this will
|
||||
let you edit, upload, or download the journal file or any files it in-
|
||||
If you enable the manage capability mentioned above, you'll see a new
|
||||
"spanner" button to the right of the search form. Clicking this will
|
||||
let you edit, upload, or download the journal file or any files it in-
|
||||
cludes.
|
||||
|
||||
Note, unlike any other hledger command, in this mode you (or any visi-
|
||||
Note, unlike any other hledger command, in this mode you (or any visi-
|
||||
tor) can alter or wipe the data files.
|
||||
|
||||
Normally whenever a file is changed in this way, hledger-web saves a
|
||||
numbered backup (assuming file permissions allow it, the disk is not
|
||||
full, etc.) hledger-web is not aware of version control systems, cur-
|
||||
rently; if you use one, you'll have to arrange to commit the changes
|
||||
Normally whenever a file is changed in this way, hledger-web saves a
|
||||
numbered backup (assuming file permissions allow it, the disk is not
|
||||
full, etc.) hledger-web is not aware of version control systems, cur-
|
||||
rently; if you use one, you'll have to arrange to commit the changes
|
||||
yourself (eg with a cron job or a file watcher like entr).
|
||||
|
||||
Changes which would leave the journal file(s) unparseable or non-valid
|
||||
(eg with failing balance assertions) are prevented. (Probably. This
|
||||
Changes which would leave the journal file(s) unparseable or non-valid
|
||||
(eg with failing balance assertions) are prevented. (Probably. This
|
||||
needs re-testing.)
|
||||
|
||||
RELOADING
|
||||
hledger-web detects changes made to the files by other means (eg if you
|
||||
edit it directly, outside of hledger-web), and it will show the new
|
||||
data when you reload the page or navigate to a new page. If a change
|
||||
edit it directly, outside of hledger-web), and it will show the new
|
||||
data when you reload the page or navigate to a new page. If a change
|
||||
makes a file unparseable, hledger-web will display an error message un-
|
||||
til the file has been fixed.
|
||||
|
||||
@ -332,8 +332,8 @@ RELOADING
|
||||
that both machine clocks are roughly in step.)
|
||||
|
||||
JSON API
|
||||
In addition to the web UI, hledger-web also serves a JSON API that can
|
||||
be used to get data or add new transactions. If you want the JSON API
|
||||
In addition to the web UI, hledger-web also serves a JSON API that can
|
||||
be used to get data or add new transactions. If you want the JSON API
|
||||
only, you can use the --serve-api flag. Eg:
|
||||
|
||||
$ hledger-web -f examples/sample.journal --serve-api
|
||||
@ -350,7 +350,7 @@ JSON API
|
||||
/accounttransactions/ACCOUNTNAME
|
||||
|
||||
Eg, all account names in the journal (similar to the accounts command).
|
||||
(hledger-web's JSON does not include newlines, here we use python to
|
||||
(hledger-web's JSON does not include newlines, here we use python to
|
||||
prettify it):
|
||||
|
||||
$ curl -s http://127.0.0.1:5000/accountnames | python -m json.tool
|
||||
@ -391,25 +391,25 @@ JSON API
|
||||
"aprice": null,
|
||||
...
|
||||
|
||||
Most of the JSON corresponds to hledger's data types; for details of
|
||||
what the fields mean, see the Hledger.Data.Json haddock docs and click
|
||||
on the various data types, eg Transaction. And for a higher level un-
|
||||
Most of the JSON corresponds to hledger's data types; for details of
|
||||
what the fields mean, see the Hledger.Data.Json haddock docs and click
|
||||
on the various data types, eg Transaction. And for a higher level un-
|
||||
derstanding, see the journal docs.
|
||||
|
||||
In some cases there is outer JSON corresponding to a "Report" type. To
|
||||
understand that, go to the Hledger.Web.Handler.MiscR haddock and look
|
||||
at the source for the appropriate handler to see what it returns. Eg
|
||||
understand that, go to the Hledger.Web.Handler.MiscR haddock and look
|
||||
at the source for the appropriate handler to see what it returns. Eg
|
||||
for /accounttransactions it's getAccounttransactionsR, returning a "ac-
|
||||
countTransactionsReport ...". Looking up the haddock for that we can
|
||||
see that /accounttransactions returns an AccountTransactionsReport,
|
||||
which consists of a report title and a list of AccountTransactionsRe-
|
||||
countTransactionsReport ...". Looking up the haddock for that we can
|
||||
see that /accounttransactions returns an AccountTransactionsReport,
|
||||
which consists of a report title and a list of AccountTransactionsRe-
|
||||
portItem (etc).
|
||||
|
||||
You can add a new transaction to the journal with a PUT request to
|
||||
/add, if hledger-web was started with the add capability (enabled by
|
||||
You can add a new transaction to the journal with a PUT request to
|
||||
/add, if hledger-web was started with the add capability (enabled by
|
||||
default). The payload must be the full, exact JSON representation of a
|
||||
hledger transaction (partial data won't do). You can get sample JSON
|
||||
from hledger-web's /transactions or /accounttransactions, or you can
|
||||
hledger transaction (partial data won't do). You can get sample JSON
|
||||
from hledger-web's /transactions or /accounttransactions, or you can
|
||||
export it with hledger-lib, eg like so:
|
||||
|
||||
.../hledger$ stack ghci hledger-lib
|
||||
@ -505,28 +505,28 @@ JSON API
|
||||
"tstatus": "Unmarked"
|
||||
}
|
||||
|
||||
And here's how to test adding it with curl. This should add a new en-
|
||||
And here's how to test adding it with curl. This should add a new en-
|
||||
try to your journal:
|
||||
|
||||
$ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json
|
||||
|
||||
DEBUG OUTPUT
|
||||
Debug output
|
||||
You can add --debug[=N] to the command line to log debug output. N
|
||||
You can add --debug[=N] to the command line to log debug output. N
|
||||
ranges from 1 (least output, the default) to 9 (maximum output). Typi-
|
||||
cally you would start with 1 and increase until you are seeing enough.
|
||||
Debug output goes to stderr, interleaved with the requests logged on
|
||||
cally you would start with 1 and increase until you are seeing enough.
|
||||
Debug output goes to stderr, interleaved with the requests logged on
|
||||
stdout. To capture debug output in a log file instead, you can usually
|
||||
redirect stderr, eg:
|
||||
hledger-web --debug=3 2>hledger-web.log.
|
||||
|
||||
ENVIRONMENT
|
||||
LEDGER_FILE The main journal file to use when not specified with
|
||||
LEDGER_FILE The main journal file to use when not specified with
|
||||
-f/--file. Default: $HOME/.hledger.journal.
|
||||
|
||||
BUGS
|
||||
We welcome bug reports in the hledger issue tracker (shortcut:
|
||||
http://bugs.hledger.org), or on the #hledger chat or hledger mail list
|
||||
http://bugs.hledger.org), or on the #hledger chat or hledger mail list
|
||||
(https://hledger.org/support).
|
||||
|
||||
Some known issues:
|
||||
@ -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)
|
||||
|
@ -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
|
||||
|
4205
hledger/hledger.1
4205
hledger/hledger.1
File diff suppressed because it is too large
Load Diff
1581
hledger/hledger.info
1581
hledger/hledger.info
File diff suppressed because it is too large
Load Diff
2039
hledger/hledger.txt
2039
hledger/hledger.txt
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user