;doc: update manuals
This commit is contained in:
parent
62351dd329
commit
8a4cea2a69
@ -199,6 +199,9 @@ show general or ADDONCMD version
|
||||
.TP
|
||||
\f[B]\f[CB]--debug[=N]\f[B]\f[R]
|
||||
show debug output (levels 1-9, default: 1)
|
||||
.TP
|
||||
\f[B]\f[CB]--today=DATE\f[B]\f[R]
|
||||
generate reports treating DATE as the current day (for testing purposes)
|
||||
.PP
|
||||
A \[at]FILE argument will be expanded to the contents of FILE, which
|
||||
should contain one command line option/argument per line.
|
||||
|
||||
@ -217,6 +217,10 @@ the last one takes precedence.
|
||||
`--debug[=N]'
|
||||
show debug output (levels 1-9, default: 1)
|
||||
|
||||
`--today=DATE'
|
||||
generate reports treating DATE as the current day (for testing
|
||||
purposes)
|
||||
|
||||
A @FILE argument will be expanded to the contents of FILE, which
|
||||
should contain one command line option/argument per line. (To prevent
|
||||
this, insert a `--' argument before.)
|
||||
@ -598,29 +602,29 @@ Tag Table:
|
||||
Node: Top232
|
||||
Node: OPTIONS1637
|
||||
Ref: #options1734
|
||||
Node: KEYS6129
|
||||
Ref: #keys6224
|
||||
Node: SCREENS10273
|
||||
Ref: #screens10371
|
||||
Node: Accounts screen10461
|
||||
Ref: #accounts-screen10589
|
||||
Node: Register screen12793
|
||||
Ref: #register-screen12948
|
||||
Node: Transaction screen14943
|
||||
Ref: #transaction-screen15101
|
||||
Node: Error screen15968
|
||||
Ref: #error-screen16090
|
||||
Node: TIPS16332
|
||||
Ref: #tips16431
|
||||
Node: Watch mode16483
|
||||
Ref: #watch-mode16600
|
||||
Node: Watch mode limitations17344
|
||||
Ref: #watch-mode-limitations17485
|
||||
Node: ENVIRONMENT18618
|
||||
Ref: #environment18729
|
||||
Node: FILES19534
|
||||
Ref: #files19633
|
||||
Node: BUGS19846
|
||||
Ref: #bugs19923
|
||||
Node: KEYS6228
|
||||
Ref: #keys6323
|
||||
Node: SCREENS10372
|
||||
Ref: #screens10470
|
||||
Node: Accounts screen10560
|
||||
Ref: #accounts-screen10688
|
||||
Node: Register screen12892
|
||||
Ref: #register-screen13047
|
||||
Node: Transaction screen15042
|
||||
Ref: #transaction-screen15200
|
||||
Node: Error screen16067
|
||||
Ref: #error-screen16189
|
||||
Node: TIPS16431
|
||||
Ref: #tips16530
|
||||
Node: Watch mode16582
|
||||
Ref: #watch-mode16699
|
||||
Node: Watch mode limitations17443
|
||||
Ref: #watch-mode-limitations17584
|
||||
Node: ENVIRONMENT18717
|
||||
Ref: #environment18828
|
||||
Node: FILES19633
|
||||
Ref: #files19732
|
||||
Node: BUGS19945
|
||||
Ref: #bugs20022
|
||||
|
||||
End Tag Table
|
||||
|
||||
@ -193,87 +193,91 @@ OPTIONS
|
||||
--debug[=N]
|
||||
show debug output (levels 1-9, default: 1)
|
||||
|
||||
--today=DATE
|
||||
generate reports treating DATE as the current day (for testing
|
||||
purposes)
|
||||
|
||||
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.
|
||||
@ -282,44 +286,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.
|
||||
@ -328,124 +332,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
|
||||
|
||||
{
|
||||
@ -455,13 +459,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).
|
||||
@ -469,24 +473,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)
|
||||
|
||||
|
||||
|
||||
@ -228,6 +228,9 @@ show general or ADDONCMD version
|
||||
.TP
|
||||
\f[B]\f[CB]--debug[=N]\f[B]\f[R]
|
||||
show debug output (levels 1-9, default: 1)
|
||||
.TP
|
||||
\f[B]\f[CB]--today=DATE\f[B]\f[R]
|
||||
generate reports treating DATE as the current day (for testing purposes)
|
||||
.PP
|
||||
A \[at]FILE argument will be expanded to the contents of FILE, which
|
||||
should contain one command line option/argument per line.
|
||||
|
||||
@ -242,6 +242,10 @@ the last one takes precedence.
|
||||
`--debug[=N]'
|
||||
show debug output (levels 1-9, default: 1)
|
||||
|
||||
`--today=DATE'
|
||||
generate reports treating DATE as the current day (for testing
|
||||
purposes)
|
||||
|
||||
A @FILE argument will be expanded to the contents of FILE, which
|
||||
should contain one command line option/argument per line. (To prevent
|
||||
this, insert a `--' argument before.)
|
||||
@ -615,19 +619,19 @@ Tag Table:
|
||||
Node: Top235
|
||||
Node: OPTIONS1878
|
||||
Ref: #options1983
|
||||
Node: PERMISSIONS9396
|
||||
Ref: #permissions9535
|
||||
Node: EDITING UPLOADING DOWNLOADING10747
|
||||
Ref: #editing-uploading-downloading10928
|
||||
Node: RELOADING11759
|
||||
Ref: #reloading11893
|
||||
Node: JSON API12325
|
||||
Ref: #json-api12439
|
||||
Node: ENVIRONMENT17928
|
||||
Ref: #environment18044
|
||||
Node: FILES18776
|
||||
Ref: #files18876
|
||||
Node: BUGS19089
|
||||
Ref: #bugs19167
|
||||
Node: PERMISSIONS9495
|
||||
Ref: #permissions9634
|
||||
Node: EDITING UPLOADING DOWNLOADING10846
|
||||
Ref: #editing-uploading-downloading11027
|
||||
Node: RELOADING11858
|
||||
Ref: #reloading11992
|
||||
Node: JSON API12424
|
||||
Ref: #json-api12538
|
||||
Node: ENVIRONMENT18027
|
||||
Ref: #environment18143
|
||||
Node: FILES18875
|
||||
Ref: #files18975
|
||||
Node: BUGS19188
|
||||
Ref: #bugs19266
|
||||
|
||||
End Tag Table
|
||||
|
||||
@ -216,55 +216,59 @@ OPTIONS
|
||||
--debug[=N]
|
||||
show debug output (levels 1-9, default: 1)
|
||||
|
||||
--today=DATE
|
||||
generate reports treating DATE as the current day (for testing
|
||||
purposes)
|
||||
|
||||
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
|
||||
@ -274,53 +278,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
|
||||
@ -337,7 +341,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
|
||||
@ -378,25 +382,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
|
||||
@ -492,23 +496,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
|
||||
|
||||
{
|
||||
@ -518,13 +522,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).
|
||||
@ -538,7 +542,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)
|
||||
|
||||
|
||||
|
||||
@ -86,6 +86,9 @@ show general or ADDONCMD version
|
||||
.TP
|
||||
\f[B]\f[CB]--debug[=N]\f[B]\f[R]
|
||||
show debug output (levels 1-9, default: 1)
|
||||
.TP
|
||||
\f[B]\f[CB]--today=DATE\f[B]\f[R]
|
||||
generate reports treating DATE as the current day (for testing purposes)
|
||||
.PP
|
||||
General input options:
|
||||
.TP
|
||||
@ -8797,7 +8800,7 @@ Here are the balance assertion types for quick reference:
|
||||
.PP
|
||||
It\[aq]s a good idea to get rapid feedback while
|
||||
creating/troubleshooting CSV rules.
|
||||
Here\[aq]s a good way, using entr from http://eradman.com/entrproject :
|
||||
Here\[aq]s a good way, using entr from eradman.com/entrproject:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
|
||||
1011
hledger/hledger.info
1011
hledger/hledger.info
File diff suppressed because it is too large
Load Diff
3009
hledger/hledger.txt
3009
hledger/hledger.txt
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user