doc: update manuals

This commit is contained in:
Simon Michael 2021-09-21 15:46:55 -10:00
parent 1126b4b0dd
commit 416555b65a
9 changed files with 1157 additions and 1049 deletions

View File

@ -1,5 +1,5 @@
.TH "HLEDGER-UI" "1" "September 2021" "hledger-ui-1.22.99 " "hledger User Manuals"
.TH "HLEDGER-UI" "1" "September 2021" "hledger-ui-1.23 " "hledger User Manuals"
@ -7,7 +7,7 @@
.PP
hledger-ui is a terminal interface (TUI) for the hledger accounting
tool.
This manual is for hledger-ui 1.22.99.
This manual is for hledger-ui 1.23.
.SH SYNOPSIS
.PP
\f[C]hledger-ui [OPTIONS] [QUERYARGS]\f[R]
@ -185,6 +185,14 @@ terminal.
into \[aq]less -R\[aq].
\[aq]never\[aq] or \[aq]no\[aq]: never.
A NO_COLOR environment variable overrides this.
.TP
\f[B]\f[CB]--pretty[=WHEN]\f[B]\f[R]
Show prettier output, e.g.
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].
.PP
When a reporting option appears more than once in the command line, the
last one takes precedence.

View File

@ -12,7 +12,7 @@ hledger-ui(1)
*************
hledger-ui is a terminal interface (TUI) for the hledger accounting
tool. This manual is for hledger-ui 1.22.99.
tool. This manual is for hledger-ui 1.23.
'hledger-ui [OPTIONS] [QUERYARGS]'
'hledger ui -- [OPTIONS] [QUERYARGS]'
@ -204,6 +204,12 @@ the data.
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 characters.
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 last one takes precedence.
@ -602,32 +608,32 @@ program is restarted.

Tag Table:
Node: Top221
Node: OPTIONS1647
Ref: #options1744
Node: KEYS6375
Ref: #keys6470
Node: SCREENS10541
Ref: #screens10639
Node: Accounts screen10729
Ref: #accounts-screen10857
Node: Register screen13072
Ref: #register-screen13227
Node: Transaction screen15224
Ref: #transaction-screen15382
Node: Error screen16252
Ref: #error-screen16374
Node: TIPS16618
Ref: #tips16717
Node: Watch mode16769
Ref: #watch-mode16886
Node: Watch mode limitations17632
Ref: #watch-mode-limitations17773
Node: ENVIRONMENT18909
Ref: #environment19020
Node: FILES19827
Ref: #files19926
Node: BUGS20139
Ref: #bugs20216
Node: OPTIONS1644
Ref: #options1741
Node: KEYS6620
Ref: #keys6715
Node: SCREENS10786
Ref: #screens10884
Node: Accounts screen10974
Ref: #accounts-screen11102
Node: Register screen13317
Ref: #register-screen13472
Node: Transaction screen15469
Ref: #transaction-screen15627
Node: Error screen16497
Ref: #error-screen16619
Node: TIPS16863
Ref: #tips16962
Node: Watch mode17014
Ref: #watch-mode17131
Node: Watch mode limitations17877
Ref: #watch-mode-limitations18018
Node: ENVIRONMENT19154
Ref: #environment19265
Node: FILES20072
Ref: #files20171
Node: BUGS20384
Ref: #bugs20461

End Tag Table

View File

@ -5,7 +5,7 @@ HLEDGER-UI(1) hledger User Manuals HLEDGER-UI(1)
NAME
hledger-ui is a terminal interface (TUI) for the hledger accounting
tool. This manual is for hledger-ui 1.22.99.
tool. This manual is for hledger-ui 1.23.
SYNOPSIS
hledger-ui [OPTIONS] [QUERYARGS]
@ -181,6 +181,12 @@ OPTIONS
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
'=', e.g. '--pretty=yes'.
When a reporting option appears more than once in the command line, the
last one takes precedence.
@ -202,86 +208,86 @@ OPTIONS
show debug output (levels 1-9, default: 1)
A @FILE argument will be expanded to the contents of FILE, which should
contain one command line option/argument per line. (To prevent this,
contain one command line option/argument per line. (To prevent this,
insert a -- argument before.)
KEYS
? shows a help dialog listing all keys. (Some of these also appear in
? shows a help dialog listing all keys. (Some of these also appear in
the quick help at the bottom of each screen.) Press ? again (or ESCAPE,
or LEFT, or q) to close it. The following keys work on most screens:
The cursor keys navigate: right (or enter) goes deeper, left returns to
the previous screen, up/down/page up/page down/home/end move up and
the previous screen, up/down/page up/page down/home/end move up and
down through lists. Emacs-style (ctrl-p/ctrl-n/ctrl-f/ctrl-b) movement
keys are also supported (but not vi-style keys, since hledger-1.19,
sorry!). A tip: movement speed is limited by your keyboard repeat
rate, to move faster you may want to adjust it. (If you're on a mac,
keys are also supported (but not vi-style keys, since hledger-1.19,
sorry!). A tip: movement speed is limited by your keyboard repeat
rate, to move faster you may want to adjust it. (If you're on a mac,
the karabiner app is one way to do 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 --watch option, when viewing a "current" period (the current
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 --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-standard period, you can use /
and a date: query.
/ 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; press ENTER to set
/ 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; press ENTER to set
it, or ESCAPEto cancel. There are also keys for quickly adjusting some
common filters like account depth and transaction status (see below).
common filters like account depth and transaction status (see below).
BACKSPACE or DELETE removes all filters, showing all transactions.
As mentioned above, by default hledger-ui hides future transactions -
As mentioned above, by default hledger-ui hides future transactions -
both ordinary transactions recorded in the journal, and periodic trans-
actions generated by rule. F toggles forecast mode, in which
actions generated by rule. F toggles forecast mode, in which
future/forecasted transactions are shown.
ESCAPE resets the UI state and jumps back to the top screen, restoring
the app's initial state at startup. Or, it cancels minibuffer data
ESCAPE resets the UI state and jumps back to the top screen, restoring
the app's initial state at startup. Or, it cancels minibuffer data
entry or the help dialog.
CTRL-l redraws the screen and centers the selection if possible (selec-
tions near the top won't be centered, since we don't scroll above the
tions near the top won't be centered, since we don't scroll above the
top).
g reloads from the data file(s) and updates the current screen and any
previous screens. (With large files, this could cause a noticeable
g reloads from the data file(s) and updates the current screen and any
previous screens. (With large files, this could cause a noticeable
pause.)
I toggles balance assertion checking. Disabling balance assertions
I toggles balance assertion checking. Disabling balance assertions
temporarily can be useful for troubleshooting.
a runs command-line hledger's add command, and reloads the updated
a runs command-line hledger's add command, and reloads the updated
file. This allows some basic data entry.
A is like a, but runs the hledger-iadd tool, which provides a terminal
interface. This key will be available if hledger-iadd is installed in
A is like a, but runs the hledger-iadd tool, which provides a terminal
interface. This key will be available if hledger-iadd is installed in
$path.
E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emacsclient -a ""
-nw) 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 possi-
E runs $HLEDGER_UI_EDITOR, or $EDITOR, or a default (emacsclient -a ""
-nw) 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 possi-
ble) when invoked from the error screen.
B toggles cost mode, showing amounts in their transaction price's com-
B toggles cost mode, showing amounts in their transaction price's com-
modity (like toggling the -B/--cost flag).
V toggles value mode, showing amounts' current market value in their
default valuation commodity (like toggling the -V/--market flag).
Note, "current market value" means the value on the report end date if
specified, otherwise today. To see the value on another date, you can
temporarily set that as the report end date. Eg: to see a transaction
as it was valued on july 30, go to the accounts or register screen,
V toggles value mode, showing amounts' current market value in their
default valuation commodity (like toggling the -V/--market flag).
Note, "current market value" means the value on the report end date if
specified, otherwise today. To see the value on another date, you can
temporarily set that as the report end date. Eg: to see a transaction
as it was valued on july 30, go to the accounts or register screen,
press /, and add date:-7/30 to the query.
At most one of cost or value mode can be active at once.
There's not yet any visual reminder when cost or value mode is active;
There's not yet any visual reminder when cost or value mode is active;
for now pressing b b v should reliably reset to normal mode.
q quits the application.
@ -290,44 +296,44 @@ KEYS
SCREENS
Accounts screen
This is normally the first screen displayed. It lists accounts and
their balances, like hledger's balance command. By default, it shows
all accounts and their latest ending balances (including the balances
of subaccounts). If you specify a query on the command line, it shows
This is normally the first screen displayed. It lists accounts and
their balances, like hledger's balance command. By default, it shows
all accounts and their latest ending balances (including the balances
of subaccounts). If you specify a query on the command line, it shows
just the matched accounts and the balances from matched transactions.
Account names are shown as a flat list by default; press t to toggle
tree mode. In list mode, account balances are exclusive of subac-
counts, except where subaccounts are hidden by a depth limit (see
below). In tree mode, all account balances are inclusive of subac-
Account names are shown as a flat list by default; press t to toggle
tree mode. In list mode, account balances are exclusive of subac-
counts, except where subaccounts are hidden by a depth limit (see
below). In tree mode, all account balances are inclusive of subac-
counts.
To see less detail, press a number key, 1 to 9, to set a depth limit.
To see less detail, press a number key, 1 to 9, to set a depth limit.
Or use - to decrease and +/= to increase the depth limit. 0 shows even
less detail, collapsing all accounts to a single total. To remove the
depth limit, set it higher than the maximum account depth, or press
less detail, collapsing all accounts to a single total. To remove the
depth limit, set it higher than the maximum account depth, or press
ESCAPE.
H toggles between showing historical balances or period balances. His-
torical balances (the default) are ending balances at the end of the
report period, taking into account all transactions before that date
(filtered by the filter query if any), including transactions before
the start of the report period. In other words, historical balances
are what you would see on a bank statement for that account (unless
disturbed by a filter query). Period balances ignore transactions
torical balances (the default) are ending balances at the end of the
report period, taking into account all transactions before that date
(filtered by the filter query if any), including transactions before
the start of the report period. In other words, historical balances
are what you would see on a bank statement for that account (unless
disturbed by a filter query). Period balances ignore transactions
before the report start date, so they show the change in balance during
the report period. They are more useful eg when viewing a time log.
U toggles filtering by unmarked status, including or excluding unmarked
postings in the balances. Similarly, P toggles pending postings, and C
toggles cleared postings. (By default, balances include all postings;
if you activate one or two status filters, only those postings are
toggles cleared postings. (By default, balances include all postings;
if you activate one or two status filters, only those postings are
included; and if you activate all three, the filter is removed.)
R toggles real mode, in which virtual postings are ignored.
Z toggles nonzero mode, in which only accounts with nonzero balances
are shown (hledger-ui shows zero items by default, unlike command-line
Z toggles nonzero mode, in which only accounts with nonzero balances
are shown (hledger-ui shows zero items by default, unlike command-line
hledger).
Press right or enter to view an account's transactions register.
@ -336,124 +342,124 @@ SCREENS
This screen shows the transactions affecting a particular account, like
a check register. Each line represents one transaction and shows:
o the other account(s) involved, in abbreviated form. (If there are
both real and virtual postings, it shows only the accounts affected
o the other account(s) involved, in abbreviated form. (If there are
both real and virtual postings, it shows only the accounts affected
by real postings.)
o the overall change to the current account's balance; positive for an
o the overall change to the current account's balance; positive for an
inflow to this account, negative for an outflow.
o the running historical total or period total for the current account,
after the transaction. This can be toggled with H. Similar to the
accounts screen, the historical total is affected by transactions
(filtered by the filter query) before the report start date, while
after the transaction. This can be toggled with H. Similar to the
accounts screen, the historical total is affected by transactions
(filtered by the filter query) before the report start date, while
the period total is not. If the historical total is not disturbed by
a filter query, it will be the running historical balance you would
a filter query, it will be the running historical balance you would
see on a bank register for the current account.
Transactions affecting this account's subaccounts will be included in
Transactions affecting this account's subaccounts will be included in
the register if the accounts screen is in tree mode, or if it's in list
mode but this account has subaccounts which are not shown due to a
depth limit. In other words, the register always shows the transac-
tions contributing to the balance shown on the accounts screen. Tree
mode but this account has subaccounts which are not shown due to a
depth limit. In other words, the register always shows the transac-
tions contributing to the balance shown on the accounts screen. Tree
mode/list mode can be toggled with t here also.
U toggles filtering by unmarked status, showing or hiding unmarked
U toggles filtering by unmarked status, showing or hiding unmarked
transactions. Similarly, P toggles pending transactions, and C toggles
cleared transactions. (By default, transactions with all statuses are
shown; if you activate one or two status filters, only those transac-
cleared transactions. (By default, transactions with all statuses are
shown; if you activate one or two status filters, only those transac-
tions are shown; and if you activate all three, the filter is removed.)
R toggles real mode, in which virtual postings are ignored.
Z toggles nonzero mode, in which only transactions posting a nonzero
change are shown (hledger-ui shows zero items by default, unlike com-
Z toggles nonzero mode, in which only transactions posting a nonzero
change are shown (hledger-ui shows zero items by default, unlike com-
mand-line hledger).
Press right (or enter) to view the selected transaction in detail.
Transaction screen
This screen shows a single transaction, as a general journal entry,
similar to hledger's print command and journal format (hledger_jour-
This screen shows a single transaction, as a general journal entry,
similar to hledger's print command and journal format (hledger_jour-
nal(5)).
The transaction's date(s) and any cleared flag, transaction code,
description, comments, along with all of its account postings are
shown. Simple transactions have two postings, but there can be more
The transaction's date(s) and any cleared flag, transaction code,
description, comments, along with all of its account postings are
shown. Simple transactions have two postings, but there can be more
(or in certain cases, fewer).
up and down will step through all transactions listed in the previous
account register screen. In the title bar, the numbers in parentheses
show your position within that account register. They will vary
up and down will step through all transactions listed in the previous
account register screen. In the title bar, the numbers in parentheses
show your position within that account register. They will vary
depending on which account register you came from (remember most trans-
actions appear in multiple account registers). The #N number preceding
them is the transaction's position within the complete unfiltered jour-
nal, which is a more stable id (at least until the next reload).
Error screen
This screen will appear if there is a problem, such as a parse error,
when you press g to reload. Once you have fixed the problem, press g
This screen will appear if there is a problem, such as a parse error,
when you press g to reload. Once you have fixed the problem, press g
again to reload and resume normal operation. (Or, you can press escape
to cancel the reload attempt.)
TIPS
Watch mode
One of hledger-ui's best features is the auto-reloading --watch mode.
With this flag, it will update the display automatically whenever
One of hledger-ui's best features is the auto-reloading --watch mode.
With this flag, it will update the display automatically whenever
changes are saved to the data files.
This is very useful when reconciling. A good workflow is to have your
bank'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
This is very useful when reconciling. A good workflow is to have your
bank'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:
$ hledger-ui --watch --register checking -C
As you mark things cleared in the editor, you can see the effect imme-
diately 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 toggle cleared mode, or to explore the
As you mark things cleared in the editor, you can see the effect imme-
diately 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 toggle cleared mode, or to explore the
history.
Watch mode limitations
There are situations in which it won't work, ie the display will not
update when you save a change (because the underlying inotify library
There are situations in which it won't work, ie the display will not
update when you save a change (because the underlying inotify library
does not support it). Here are some that we know of:
o Certain editors: saving with gedit, and perhaps any Gnome applica-
tion, won't be detected (#1617). Jetbrains IDEs, such as IDEA, also
o Certain editors: saving with gedit, and perhaps any Gnome applica-
tion, won't be detected (#1617). Jetbrains IDEs, such as IDEA, also
may not work (#911).
o Certain unusual filesystems might not be supported. (All the usual
o Certain unusual filesystems might not be supported. (All the usual
ones on unix, mac and windows are supported.)
In such cases, the workaround is to switch to the hledger-ui window and
press g each time you want it to reload. (Actually, see #1617 for
press g each time you want it to reload. (Actually, see #1617 for
another workaround, and let us know if it works for you.)
If you leave hledger-ui --watch running for days, on certain platforms
(?), perhaps with many transactions in your journal (?), perhaps with
large numbers of other files present (?), you may see it gradually
using more and more memory and CPU over time, as seen in top or Activ-
If you leave hledger-ui --watch running for days, on certain platforms
(?), perhaps with many transactions in your journal (?), perhaps with
large numbers of other files present (?), you may see it gradually
using more and more memory and CPU over time, as seen in top or Activ-
ity Monitor or Task Manager.
A workaround is to quit and restart it, or to suspend it (CTRL-z) and
A workaround is to quit and restart it, or to suspend it (CTRL-z) and
restart it (fg) if your shell supports that.
ENVIRONMENT
COLUMNS The screen width to use. Default: the full terminal width.
LEDGER_FILE The journal file path when not specified with -f. Default:
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
A typical value is ~/DIR/YYYY.journal, where DIR is a version-con-
trolled finance directory and YYYY is the current year. Or ~/DIR/cur-
A typical value is ~/DIR/YYYY.journal, where DIR is a version-con-
trolled finance directory and YYYY is the current year. Or ~/DIR/cur-
rent.journal, where current.journal is a symbolic link to YYYY.journal.
On Mac computers, you can set this and other environment variables in a
more thorough way that also affects applications started from the GUI
(say, an Emacs dock icon). Eg on MacOS Catalina I have a
more thorough way that also affects applications started from the GUI
(say, an Emacs dock icon). Eg on MacOS Catalina I have a
~/.MacOSX/environment.plist file containing
{
@ -463,13 +469,13 @@ ENVIRONMENT
To see the effect you may need to killall Dock, or reboot.
FILES
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
BUGS
The need to precede options with -- when invoked from hledger is awk-
The need to precede options with -- when invoked from hledger is awk-
ward.
-f- doesn't work (hledger-ui can't read from stdin).
@ -477,24 +483,24 @@ BUGS
-V affects only the accounts screen.
When you press g, the current and all previous screens are regenerated,
which may cause a noticeable pause with large files. Also there is no
which may cause a noticeable pause with large files. Also there is no
visual indication that this is in progress.
--watch is not yet fully robust. It works well for normal usage, but
many file changes in a short time (eg saving the file thousands of
times with an editor macro) can cause problems at least on OSX. Symp-
toms include: unresponsive UI, periodic resetting of the cursor posi-
--watch is not yet fully robust. It works well for normal usage, but
many file changes in a short time (eg saving the file thousands of
times with an editor macro) can cause problems at least on OSX. Symp-
toms include: unresponsive UI, periodic resetting of the cursor posi-
tion, momentary display of parse errors, high CPU usage eventually sub-
siding, and possibly a small but persistent build-up of CPU usage until
the program is restarted.
Also, if you are viewing files mounted from another machine, --watch
Also, if you are viewing files mounted from another machine, --watch
requires that both machine clocks are roughly in step.
REPORTING BUGS
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list)
@ -512,4 +518,4 @@ SEE ALSO
hledger-ui-1.22.99 September 2021 HLEDGER-UI(1)
hledger-ui-1.23 September 2021 HLEDGER-UI(1)

View File

@ -1,12 +1,12 @@
.TH "HLEDGER-WEB" "1" "September 2021" "hledger-web-1.22.99 " "hledger User Manuals"
.TH "HLEDGER-WEB" "1" "September 2021" "hledger-web-1.23 " "hledger User Manuals"
.SH NAME
.PP
hledger-web is a web interface (WUI) for the hledger accounting tool.
This manual is for hledger-web 1.22.99.
This manual is for hledger-web 1.23.
.SH SYNOPSIS
.PP
\f[C]hledger-web [OPTIONS]\f[R]
@ -214,6 +214,14 @@ terminal.
into \[aq]less -R\[aq].
\[aq]never\[aq] or \[aq]no\[aq]: never.
A NO_COLOR environment variable overrides this.
.TP
\f[B]\f[CB]--pretty[=WHEN]\f[B]\f[R]
Show prettier output, e.g.
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].
.PP
When a reporting option appears more than once in the command line, the
last one takes precedence.

View File

@ -12,7 +12,7 @@ hledger-web(1)
**************
hledger-web is a web interface (WUI) for the hledger accounting tool.
This manual is for hledger-web 1.22.99.
This manual is for hledger-web 1.23.
'hledger-web [OPTIONS]'
'hledger web -- [OPTIONS]'
@ -230,6 +230,12 @@ before options, as shown in the synopsis above.
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 characters.
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 last one takes precedence.
@ -611,22 +617,22 @@ awkward.

Tag Table:
Node: Top223
Node: OPTIONS1889
Ref: #options1994
Node: PERMISSIONS9657
Ref: #permissions9796
Node: EDITING UPLOADING DOWNLOADING11008
Ref: #editing-uploading-downloading11189
Node: RELOADING12023
Ref: #reloading12157
Node: JSON API12590
Ref: #json-api12704
Node: ENVIRONMENT18194
Ref: #environment18310
Node: FILES19043
Ref: #files19143
Node: BUGS19356
Ref: #bugs19434
Node: OPTIONS1886
Ref: #options1991
Node: PERMISSIONS9902
Ref: #permissions10041
Node: EDITING UPLOADING DOWNLOADING11253
Ref: #editing-uploading-downloading11434
Node: RELOADING12268
Ref: #reloading12402
Node: JSON API12835
Ref: #json-api12949
Node: ENVIRONMENT18439
Ref: #environment18555
Node: FILES19288
Ref: #files19388
Node: BUGS19601
Ref: #bugs19679

End Tag Table

View File

@ -5,7 +5,7 @@ HLEDGER-WEB(1) hledger User Manuals HLEDGER-WEB(1)
NAME
hledger-web is a web interface (WUI) for the hledger accounting tool.
This manual is for hledger-web 1.22.99.
This manual is for hledger-web 1.23.
SYNOPSIS
hledger-web [OPTIONS]
@ -204,6 +204,12 @@ OPTIONS
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
'=', e.g. '--pretty=yes'.
When a reporting option appears more than once in the command line, the
last one takes precedence.
@ -225,54 +231,54 @@ OPTIONS
show debug output (levels 1-9, default: 1)
A @FILE argument will be expanded to the contents of FILE, which should
contain one command line option/argument per line. (To prevent this,
contain one command line option/argument per line. (To prevent this,
insert a -- argument before.)
By default, hledger-web starts the web app in "transient mode" and also
opens it in your default web browser if possible. In this mode the web
app will keep running for as long as you have it open in a browser win-
dow, and will exit after two minutes of inactivity (no requests and no
browser windows viewing it). With --serve, it just runs the web app
without exiting, and logs requests to the console. With --serve-api,
only the JSON web api (see below) is served, with the usual HTML
dow, and will exit after two minutes of inactivity (no requests and no
browser windows viewing it). With --serve, it just runs the web app
without exiting, and logs requests to the console. With --serve-api,
only the JSON web api (see below) is served, with the usual HTML
server-side web UI disabled.
By default the server listens on IP address 127.0.0.1, accessible only
to local requests. You can use --host to change this, eg --host
By default the server listens on IP address 127.0.0.1, accessible only
to local requests. You can use --host to change this, eg --host
0.0.0.0 to listen on all configured addresses.
Similarly, use --port to set a TCP port other than 5000, eg if you are
Similarly, use --port to set a TCP port other than 5000, eg if you are
running multiple hledger-web instances.
Both of these options are ignored when --socket is used. In this case,
it creates an AF_UNIX socket file at the supplied path and uses that
for communication. This is an alternative way of running multiple
hledger-web instances behind a reverse proxy that handles authentica-
tion for different users. The path can be derived in a predictable
it creates an AF_UNIX socket file at the supplied path and uses that
for communication. This is an alternative way of running multiple
hledger-web instances behind a reverse proxy that handles authentica-
tion for different users. The path can be derived in a predictable
way, eg by using the username within the path. As an example, nginx as
reverse proxy can use the variable $remote_user to derive a path from
the username used in a HTTP basic authentication. The following
proxy_pass directive allows access to all hledger-web instances that
reverse proxy can use the variable $remote_user to derive a path from
the username used in a HTTP basic authentication. The following
proxy_pass directive allows access to all hledger-web instances that
created a socket in /tmp/hledger/:
proxy_pass http://unix:/tmp/hledger/${remote_user}.socket;
You can use --base-url to change the protocol, hostname, port and path
You can use --base-url to change the protocol, hostname, port and path
that appear in hyperlinks, useful eg for integrating hledger-web within
a larger website. The default is http://HOST:PORT/ using the server's
a larger website. The default is http://HOST:PORT/ using the server's
configured host address and TCP port (or http://HOST if PORT is 80).
With --file-url you can set a different base url for static files, eg
With --file-url you can set a different base url for static files, eg
for better caching or cookie-less serving on high performance websites.
PERMISSIONS
By default, hledger-web allows anyone who can reach it to view the
By default, hledger-web allows anyone who can reach it to view the
journal and to add new transactions, but not to change existing data.
You can restrict who can reach it by
o setting the IP address it listens on (see --host above). By default
it listens on 127.0.0.1, accessible to all users on the local
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
machine.
o putting it behind an authenticating proxy, using eg apache or nginx
@ -282,53 +288,53 @@ 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
o manage - allows editing, uploading or downloading the main or
included 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
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
includes.
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
makes a file unparseable, hledger-web will display an error message
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.
(Note: if you are viewing files mounted from another machine, make sure
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
@ -345,7 +351,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
@ -386,25 +392,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
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
understanding, see the journal manual.
In some cases there is outer JSON corresponding to a "Report" type. To
understand that, go to the Hledger.Web.Handler.MiscR haddock and look
at the source for the appropriate handler to see what it returns. Eg
understand that, go to the Hledger.Web.Handler.MiscR haddock and look
at the source for the appropriate handler to see what it returns. Eg
for /accounttransactions it's getAccounttransactionsR, returning a
"accountTransactionsReport ...". Looking up the haddock for that we
"accountTransactionsReport ...". 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-
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
@ -500,23 +506,23 @@ JSON API
"tstatus": "Unmarked"
}
And here's how to test adding it with curl. This should add a new
And here's how to test adding it with curl. This should add a new
entry to your journal:
$ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json
ENVIRONMENT
LEDGER_FILE The journal file path when not specified with -f. Default:
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
A typical value is ~/DIR/YYYY.journal, where DIR is a version-con-
trolled finance directory and YYYY is the current year. Or ~/DIR/cur-
A typical value is ~/DIR/YYYY.journal, where DIR is a version-con-
trolled finance directory and YYYY is the current year. Or ~/DIR/cur-
rent.journal, where current.journal is a symbolic link to YYYY.journal.
On Mac computers, you can set this and other environment variables in a
more thorough way that also affects applications started from the GUI
(say, an Emacs dock icon). Eg on MacOS Catalina I have a
more thorough way that also affects applications started from the GUI
(say, an Emacs dock icon). Eg on MacOS Catalina I have a
~/.MacOSX/environment.plist file containing
{
@ -526,13 +532,13 @@ ENVIRONMENT
To see the effect you may need to killall Dock, or reboot.
FILES
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
Reads data from one or more files in hledger journal, timeclock, time-
dot, or CSV format specified with -f, or $LEDGER_FILE, or
$HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
BUGS
The need to precede options with -- when invoked from hledger is awk-
The need to precede options with -- when invoked from hledger is awk-
ward.
-f- doesn't work (hledger-web can't read from stdin).
@ -546,7 +552,7 @@ BUGS
REPORTING BUGS
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list)
@ -564,4 +570,4 @@ SEE ALSO
hledger-web-1.22.99 September 2021 HLEDGER-WEB(1)
hledger-web-1.23 September 2021 HLEDGER-WEB(1)

View File

@ -1,6 +1,6 @@
.\"t
.TH "HLEDGER" "1" "September 2021" "hledger-1.22.99 " "hledger User Manuals"
.TH "HLEDGER" "1" "September 2021" "hledger-1.23 " "hledger User Manuals"
@ -9,7 +9,7 @@
This is the command-line interface (CLI) for the hledger accounting
tool.
Here we also describe hledger\[aq]s concepts and file formats.
This manual is for hledger 1.22.99.
This manual is for hledger 1.23.
.SH SYNOPSIS
.PP
\f[C]hledger\f[R]
@ -207,6 +207,14 @@ terminal.
into \[aq]less -R\[aq].
\[aq]never\[aq] or \[aq]no\[aq]: never.
A NO_COLOR environment variable overrides this.
.TP
\f[B]\f[CB]--pretty[=WHEN]\f[B]\f[R]
Show prettier output, e.g.
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].
.PP
When a reporting option appears more than once in the command line, the
last one takes precedence.
@ -528,7 +536,7 @@ Default: the full terminal width.
.PP
\f[B]NO_COLOR\f[R] If this variable exists with any value, hledger will
not use ANSI color codes in terminal output.
This overrides the --color/--colour option.
This is overriden by the --color/--colour option.
.SH DATA FILES
.PP
hledger reads transactions from one or more data files.
@ -2308,6 +2316,24 @@ hledger can optionally produce debug output (if enabled with
\f[C]-o/--output-file\f[R].
If you need to capture it, use shell redirects, eg:
\f[C]hledger bal --debug=3 >file 2>&1\f[R].
.SS Output styling
.PP
hledger commands can produce colour output when the terminal supports
it.
This is controlled by the \f[C]--color/--colour\f[R] option: - if the
\f[C]--color/--colour\f[R] option is given a value of \f[C]yes\f[R] or
\f[C]always\f[R] (or \f[C]no\f[R] or \f[C]never\f[R]), colour will (or
will not) be used; - otherwise, if the \f[C]NO_COLOR\f[R] environment
variable is set, colour will not be used; - otherwise, colour will be
used if the output (terminal or file) supports it.
.PP
hledger commands can also use unicode box-drawing characters to produce
prettier tables and output.
This is controlled by the \f[C]--pretty\f[R] option: - if the
\f[C]--pretty\f[R] option is given a value of \f[C]yes\f[R] or
\f[C]always\f[R] (or \f[C]no\f[R] or \f[C]never\f[R]), unicode
characters will (or will not) be used; - otherwise, unicode characters
will not be used.
.SS Output format
.PP
Some commands (print, register, the balance commands) offer a choice of

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff