From 14aa047e08bf022d44601c6398193f0ffbdca426 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 21 Nov 2021 23:33:44 -1000 Subject: [PATCH] ;doc: update manuals --- hledger-ui/hledger-ui.1 | 9 +- hledger-ui/hledger-ui.info | 463 +++++++++--------- hledger-ui/hledger-ui.txt | 18 +- hledger/hledger.1 | 6 +- hledger/hledger.info | 423 ++++++++-------- hledger/hledger.txt | 980 ++++++++++++++++++------------------- 6 files changed, 952 insertions(+), 947 deletions(-) diff --git a/hledger-ui/hledger-ui.1 b/hledger-ui/hledger-ui.1 index 5d2707bfa..97f749d4c 100644 --- a/hledger-ui/hledger-ui.1 +++ b/hledger-ui/hledger-ui.1 @@ -47,7 +47,7 @@ before options as shown above. Any QUERYARGS are interpreted as a hledger search query which filters the data. .TP -\f[B]\f[CB]--watch\f[B]\f[R] +\f[B]\f[CB]-w --watch\f[B]\f[R] watch for data and date changes and reload automatically .TP \f[B]\f[CB]--theme=default|terminal|greenterm\f[B]\f[R] @@ -258,7 +258,7 @@ the transactions to be shown (by default, all are shown). report period durations: year, quarter, month, week, day. Then, \f[C]SHIFT-LEFT/RIGHT\f[R] moves to the previous/next period. \f[C]T\f[R] sets the report period to today. -With the \f[C]--watch\f[R] option, when viewing a \[dq]current\[dq] +With the \f[C]-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[C]/\f[R] and a @@ -464,7 +464,7 @@ normal operation. .SS Watch mode .PP One of hledger-ui\[aq]s best features is the auto-reloading -\f[C]--watch\f[R] mode. +\f[C]-w/--watch\f[R] mode. With this flag, it will update the display automatically whenever changes are saved to the data files. .PP @@ -571,7 +571,8 @@ subsiding, and possibly a small but persistent build-up of CPU usage until the program is restarted. .PP Also, if you are viewing files mounted from another machine, -\f[C]--watch\f[R] requires that both machine clocks are roughly in step. +\f[C]-w/--watch\f[R] requires that both machine clocks are roughly in +step. .SH "REPORTING BUGS" diff --git a/hledger-ui/hledger-ui.info b/hledger-ui/hledger-ui.info index b43a22b6d..e13612def 100644 --- a/hledger-ui/hledger-ui.info +++ b/hledger-ui/hledger-ui.info @@ -1,5 +1,4 @@ -This is hledger-ui/hledger-ui.info, produced by makeinfo version 4.8 -from stdin. +This is hledger-ui.info, produced by makeinfo version 6.8 from stdin. INFO-DIR-SECTION User Applications START-INFO-DIR-ENTRY @@ -7,36 +6,36 @@ START-INFO-DIR-ENTRY END-INFO-DIR-ENTRY  -File: hledger-ui.info, Node: Top, Up: (dir) +File: hledger-ui.info, Node: Top, Next: OPTIONS, Up: (dir) hledger-ui(1) ************* hledger-ui is a terminal interface (TUI) for the hledger accounting -tool. This manual is for hledger-ui 1.23.99. +tool. This manual is for hledger-ui 1.23.99. - `hledger-ui [OPTIONS] [QUERYARGS]' -`hledger ui -- [OPTIONS] [QUERYARGS]' + 'hledger-ui [OPTIONS] [QUERYARGS]' +'hledger ui -- [OPTIONS] [QUERYARGS]' hledger is a reliable, 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 +simple, editable file format. hledger is inspired by and largely compatible with ledger(1). 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 +limited data entry capability. It is easier than hledger's command-line interface, and sometimes quicker and more convenient than the web interface. Like hledger, it reads data from one or more files in hledger -journal, timeclock, timedot, or CSV format specified with `-f', or -`$LEDGER_FILE', or `$HOME/.hledger.journal' (on windows, perhaps -`C:/Users/USER/.hledger.journal'). For more about this see hledger(1), +journal, timeclock, timedot, or CSV format specified with '-f', or +'$LEDGER_FILE', or '$HOME/.hledger.journal' (on windows, perhaps +'C:/Users/USER/.hledger.journal'). For more about this see hledger(1), hledger_journal(5) etc. Unlike hledger, hledger-ui hides all future-dated transactions by -default. They can be revealed, along with any rule-generated periodic +default. They can be revealed, along with any rule-generated periodic transactions, by pressing the F key (or starting with -forecast) to enable "forecast mode". @@ -57,155 +56,158 @@ File: hledger-ui.info, Node: OPTIONS, Next: MOUSE, Prev: Top, Up: Top 1 OPTIONS ********* -Note: if invoking hledger-ui as a hledger subcommand, write `--' before +Note: if invoking hledger-ui as a hledger subcommand, write '--' before options as shown above. Any QUERYARGS are interpreted as a hledger search query which filters the data. -`--watch' +'-w --watch' + watch for data and date changes and reload automatically +'--theme=default|terminal|greenterm' -`--theme=default|terminal|greenterm' use this custom display theme +'--register=ACCTREGEX' -`--register=ACCTREGEX' start in the (first) matched account's register screen +'--change' -`--change' show period balances (changes) at startup instead of historical balances +'-l --flat' -`-l --flat' show accounts as a flat list (default) +'-t --tree' -`-t --tree' show accounts as a tree hledger input options: -`-f FILE --file=FILE' - use a different input file. For stdin, use - (default: - `$LEDGER_FILE' or `$HOME/.hledger.journal') +'-f FILE --file=FILE' + + use a different input file. For stdin, use - (default: + '$LEDGER_FILE' or '$HOME/.hledger.journal') +'--rules-file=RULESFILE' -`--rules-file=RULESFILE' Conversion rules file to use when reading CSV (default: FILE.rules) +'--separator=CHAR' -`--separator=CHAR' Field separator to expect when reading CSV (default: ',') +'--alias=OLD=NEW' -`--alias=OLD=NEW' rename accounts named OLD to NEW +'--anon' -`--anon' anonymize accounts and payees +'--pivot FIELDNAME' -`--pivot FIELDNAME' use some other field or tag for the account name +'-I --ignore-assertions' -`-I --ignore-assertions' disable balance assertion checks (note: does not disable balance assignments) +'-s --strict' -`-s --strict' do extra error checking (check that all posted accounts are declared) hledger reporting options: -`-b --begin=DATE' +'-b --begin=DATE' + include postings/txns on or after this date (will be adjusted to preceding subperiod start when using a report interval) +'-e --end=DATE' -`-e --end=DATE' include postings/txns before this date (will be adjusted to following subperiod end when using a report interval) +'-D --daily' -`-D --daily' multiperiod/multicolumn report by day +'-W --weekly' -`-W --weekly' multiperiod/multicolumn report by week +'-M --monthly' -`-M --monthly' multiperiod/multicolumn report by month +'-Q --quarterly' -`-Q --quarterly' multiperiod/multicolumn report by quarter +'-Y --yearly' -`-Y --yearly' multiperiod/multicolumn report by year +'-p --period=PERIODEXP' -`-p --period=PERIODEXP' set start date, end date, and/or reporting interval all at once using period expressions syntax +'--date2' -`--date2' match the secondary date instead (see command help for other effects) +'--today=DATE' -`--today=DATE' override today's date (affects relative smart dates, for tests/examples) +'-U --unmarked' -`-U --unmarked' include only unmarked postings/txns (can combine with -P or -C) +'-P --pending' -`-P --pending' include only pending postings/txns +'-C --cleared' -`-C --cleared' include only cleared postings/txns +'-R --real' -`-R --real' include only non-virtual postings +'-NUM --depth=NUM' -`-NUM --depth=NUM' hide/aggregate accounts or postings more than NUM levels deep +'-E --empty' -`-E --empty' show items with zero amount, normally hidden (and vice-versa in hledger-ui/hledger-web) +'-B --cost' -`-B --cost' convert amounts to their cost/selling amount at transaction time +'-V --market' -`-V --market' convert amounts to their market value in default valuation commodities +'-X --exchange=COMM' -`-X --exchange=COMM' convert amounts to their market value in commodity COMM +'--value' -`--value' convert amounts to cost or market value, more flexibly than -B/-V/-X +'--infer-market-prices' -`--infer-market-prices' use transaction prices (recorded with @ or @@) as additional market prices, as if they were P directives +'--auto' -`--auto' apply automated posting rules to modify transactions. +'--forecast' -`--forecast' generate future transactions from periodic transaction rules, for - the next 6 months or till report end date. In hledger-ui, also + the next 6 months or till report end date. In hledger-ui, also make ordinary future transactions visible. +'--commodity-style' -`--commodity-style' Override the commodity style in the output for the specified commodity. For example 'EUR1.000,00'. +'--color=WHEN (or --colour=WHEN)' -`--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 + when piping output into 'less -R'. 'never' or 'no': never. A NO_COLOR environment variable overrides this. +'--pretty[=WHEN]' -`--pretty[=WHEN]' - Show prettier output, e.g. using unicode box-drawing characters. + 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'. @@ -217,24 +219,25 @@ the last one takes precedence. hledger help options: -`-h --help' +'-h --help' + show general or COMMAND help +'--man' -`--man' show general or COMMAND user manual with man +'--info' -`--info' show general or COMMAND user manual with info +'--version' -`--version' show general or ADDONCMD version +'--debug[=N]' -`--debug[=N]' 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, insert a `--' argument before.) +should contain one command line option/argument per line. (To prevent +this, insert a '--' argument before.)  File: hledger-ui.info, Node: MOUSE, Next: KEYS, Prev: OPTIONS, Up: Top @@ -246,9 +249,7 @@ In most modern terminals, you can navigate through the screens with a mouse or touchpad: * Use mouse wheel or trackpad to scroll up and down - * Click on list items to go deeper - * Click on the left margin (column 0), or the blank area at bottom of screen, to go back. @@ -260,88 +261,88 @@ File: hledger-ui.info, Node: KEYS, Next: SCREENS, Prev: MOUSE, Up: Top Keyboard gives more control. - `?' 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 + '?' 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' goes deeper, `LEFT' returns to the -previous screen, `UP'/`DOWN'/`PGUP'/`PGDN'/`HOME'/`END' move up and -down through lists. Emacs-style (`CTRL-p'/`CTRL-n'/`CTRL-f'/`CTRL-b') + The cursor keys navigate: 'RIGHT' goes deeper, 'LEFT' returns to the +previous screen, 'UP'/'DOWN'/'PGUP'/'PGDN'/'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 +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 +'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-standard period, you can use `/' and a `date:' query. +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 it, or `ESCAPE'to cancel. There are also keys for quickly adjusting + '/' 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 'ESCAPE'to cancel. There are also keys for quickly adjusting some common filters like account depth and transaction status (see -below). `BACKSPACE' or `DELETE' removes all filters, showing all +below). 'BACKSPACE' or 'DELETE' removes all filters, showing all 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' toggles forecast mode, in which +transactions 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 + '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 + 'CTRL-l' redraws the screen and centers the selection if possible (selections 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 -file. This allows some basic data entry. + '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 + '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 + '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 possible) when invoked from the error screen. - `B' toggles cost mode, showing amounts in their transaction price's -commodity (like toggling the `-B/--cost' flag). + 'B' toggles cost mode, showing amounts in their transaction price's +commodity (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 + '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. +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; for now pressing `b' `b' `v' should reliably reset to normal +active; for now pressing 'b' 'b' 'v' should reliably reset to normal mode. - `q' quits the application. + 'q' quits the application. Additional screen-specific keys are described below. @@ -364,47 +365,48 @@ File: hledger-ui.info, Node: Accounts screen, Next: Register screen, Up: SCRE 4.1 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 just +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 + Account names are shown as a flat list by default; press 't' to +toggle tree mode. In list mode, account balances are exclusive of subaccounts, except where subaccounts are hidden by a depth limit (see -below). In tree mode, all account balances are inclusive of subaccounts. +below). In tree mode, all account balances are inclusive of +subaccounts. - 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 `ESCAPE'. + 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 'ESCAPE'. - `H' toggles between showing historical balances or period balances. + 'H' toggles between showing historical balances or period balances. Historical 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. +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 + '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 included; and if you activate all three, the filter is removed.) - `R' toggles real mode, in which virtual postings are ignored. + 'R' toggles real mode, in which virtual postings are ignored. - `Z' toggles nonzero mode, in which only accounts with nonzero + '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' to view an account's transactions register. + Press 'RIGHT' to view an account's transactions register.  File: hledger-ui.info, Node: Register screen, Next: Transaction screen, Prev: Accounts screen, Up: SCREENS @@ -413,46 +415,44 @@ File: hledger-ui.info, Node: Register screen, Next: Transaction screen, Prev: =================== This screen shows the transactions affecting a particular account, like -a check register. Each line represents one transaction and shows: +a check register. Each line represents one transaction and shows: - * 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.) + * 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.) * the overall change to the current account's balance; positive for an inflow to this account, negative for an outflow. * 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 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 see on a bank register for the - current account. - + 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 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 see on a bank register for the current account. 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 transactions -contributing to the balance shown on the accounts screen. Tree mode/list -mode can be toggled with `t' here also. +limit. In other words, the register always shows the transactions +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 -transactions. Similarly, `P' toggles pending transactions, and `C' -toggles cleared transactions. (By default, transactions with all + '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 transactions are shown; and if you activate all three, the filter is removed.) - `R' toggles real mode, in which virtual postings are ignored. + 'R' toggles real mode, in which virtual postings are ignored. - `Z' toggles nonzero mode, in which only transactions posting a + 'Z' toggles nonzero mode, in which only transactions posting a nonzero change are shown (hledger-ui shows zero items by default, unlike command-line hledger). - Press `RIGHT' to view the selected transaction in detail. + Press 'RIGHT' to view the selected transaction in detail.  File: hledger-ui.info, Node: Transaction screen, Next: Error screen, Prev: Register screen, Up: SCREENS @@ -469,11 +469,11 @@ 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 + '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 -transactions appear in multiple account registers). The #N number +transactions appear in multiple account registers). The #N number preceding them is the transaction's position within the complete unfiltered journal, which is a more stable id (at least until the next reload). @@ -485,8 +485,8 @@ File: hledger-ui.info, Node: Error screen, Prev: Transaction screen, Up: SCRE ================ 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 +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.)  @@ -506,21 +506,20 @@ File: hledger-ui.info, Node: Watch mode, Next: Watch mode limitations, Up: TI 5.1 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 '-w/--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 + 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 -immediately without having to context switch. This leaves more mental -bandwidth for your accounting. Of course you can still interact with +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 toggle cleared mode, or to explore the history. @@ -531,29 +530,28 @@ File: hledger-ui.info, Node: Watch mode limitations, Prev: Watch mode, Up: TI ========================== 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: +update when you save a change (because the underlying 'inotify' library +does not support it). Here are some that we know of: - * Certain editors: saving with `gedit', and perhaps any Gnome - application, won't be detected (#1617). Jetbrains IDEs, such as + * Certain editors: saving with 'gedit', and perhaps any Gnome + application, won't be detected (#1617). Jetbrains IDEs, such as IDEA, also may not work (#911). - * Certain unusual filesystems might not be supported. (All the usual + * 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 +and 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 + 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 Activity Monitor or Task Manager. +gradually using more and more memory and CPU over time, as seen in 'top' +or Activity Monitor or Task Manager. - A workaround is to `q'uit and restart it, or to suspend it -(`CTRL-z') and restart it (`fg') if your shell supports that. + A workaround is to 'q'uit and restart it, or to suspend it ('CTRL-z') +and restart it ('fg') if your shell supports that.  File: hledger-ui.info, Node: ENVIRONMENT, Next: FILES, Prev: TIPS, Up: Top @@ -561,28 +559,27 @@ File: hledger-ui.info, Node: ENVIRONMENT, Next: FILES, Prev: TIPS, Up: Top 6 ENVIRONMENT ************* -*COLUMNS* The screen width to use. Default: the full terminal width. +*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.journal'). + *LEDGER_FILE* The journal file path when not specified with '-f'. +Default: '~/.hledger.journal' (on windows, perhaps +'C:/Users/USER/.hledger.journal'). - A typical value is `~/DIR/YYYY.journal', where DIR is a -version-controlled finance directory and YYYY is the current year. Or -`~/DIR/current.journal', where current.journal is a symbolic link to + A typical value is '~/DIR/YYYY.journal', where DIR is a +version-controlled finance directory and YYYY is the current year. Or +'~/DIR/current.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 -`~/.MacOSX/environment.plist' file containing - + 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 +'~/.MacOSX/environment.plist' file containing { "LEDGER_FILE" : "~/finance/current.journal" } - To see the effect you may need to `killall Dock', or reboot. + To see the effect you may need to 'killall Dock', or reboot.  File: hledger-ui.info, Node: FILES, Next: BUGS, Prev: ENVIRONMENT, Up: Top @@ -591,9 +588,9 @@ File: hledger-ui.info, Node: FILES, Next: BUGS, Prev: ENVIRONMENT, Up: Top ******* Reads data from one or more files in hledger journal, timeclock, -timedot, or CSV format specified with `-f', or `$LEDGER_FILE', or -`$HOME/.hledger.journal' (on windows, perhaps -`C:/Users/USER/.hledger.journal'). +timedot, or CSV format specified with '-f', or '$LEDGER_FILE', or +'$HOME/.hledger.journal' (on windows, perhaps +'C:/Users/USER/.hledger.journal').  File: hledger-ui.info, Node: BUGS, Prev: FILES, Up: Top @@ -601,18 +598,18 @@ File: hledger-ui.info, Node: BUGS, Prev: FILES, Up: Top 8 BUGS ****** -The need to precede options with `--' when invoked from hledger is +The need to precede options with '--' when invoked from hledger is awkward. - `-f-' doesn't work (hledger-ui can't read from stdin). + '-f-' doesn't work (hledger-ui can't read from stdin). - `-V' affects only the accounts screen. + '-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 + 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 visual indication that this is in progress. - `--watch' is not yet fully robust. It works well for normal usage, + '--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. Symptoms include: unresponsive UI, periodic resetting of the cursor position, @@ -621,39 +618,43 @@ 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' requires that both machine clocks are roughly in step. - +'-w/--watch' requires that both machine clocks are roughly in step.  Tag Table: -Node: Top232 -Node: OPTIONS1647 -Ref: #options1745 -Node: MOUSE6617 -Ref: #mouse6712 -Node: KEYS6996 -Ref: #keys7089 -Node: SCREENS11150 -Ref: #screens11248 -Node: Accounts screen11338 -Ref: #accounts-screen11466 -Node: Register screen13659 -Ref: #register-screen13814 -Node: Transaction screen15796 -Ref: #transaction-screen15954 -Node: Error screen16821 -Ref: #error-screen16943 -Node: TIPS17185 -Ref: #tips17284 -Node: Watch mode17336 -Ref: #watch-mode17453 -Node: Watch mode limitations18197 -Ref: #watch-mode-limitations18338 -Node: ENVIRONMENT19471 -Ref: #environment19582 -Node: FILES20387 -Ref: #files20486 -Node: BUGS20699 -Ref: #bugs20776 +Node: Top221 +Node: OPTIONS1657 +Ref: #options1755 +Node: MOUSE6637 +Ref: #mouse6732 +Node: KEYS7014 +Ref: #keys7107 +Node: SCREENS11193 +Ref: #screens11291 +Node: Accounts screen11381 +Ref: #accounts-screen11509 +Node: Register screen13713 +Ref: #register-screen13868 +Node: Transaction screen15852 +Ref: #transaction-screen16010 +Node: Error screen16880 +Ref: #error-screen17002 +Node: TIPS17246 +Ref: #tips17345 +Node: Watch mode17397 +Ref: #watch-mode17514 +Node: Watch mode limitations18264 +Ref: #watch-mode-limitations18405 +Node: ENVIRONMENT19541 +Ref: #environment19652 +Node: FILES20459 +Ref: #files20558 +Node: BUGS20771 +Ref: #bugs20848  End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/hledger-ui/hledger-ui.txt b/hledger-ui/hledger-ui.txt index cbf0d87ba..d1d16b007 100644 --- a/hledger-ui/hledger-ui.txt +++ b/hledger-ui/hledger-ui.txt @@ -41,7 +41,7 @@ OPTIONS Any QUERYARGS are interpreted as a hledger search query which filters the data. - --watch + -w --watch watch for data and date changes and reload automatically --theme=default|terminal|greenterm @@ -242,10 +242,10 @@ KEYS 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. + 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. / 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 @@ -417,9 +417,9 @@ SCREENS 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 - changes are saved to the data files. + One of hledger-ui's best features is the auto-reloading -w/--watch + mode. With this flag, it will update the display automatically when- + ever 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 @@ -507,7 +507,7 @@ BUGS 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, -w/--watch requires that both machine clocks are roughly in step. diff --git a/hledger/hledger.1 b/hledger/hledger.1 index df1c57138..274594ee7 100644 --- a/hledger/hledger.1 +++ b/hledger/hledger.1 @@ -6817,7 +6817,7 @@ And here is an overview of which directives are useful for what: .PP .TS tab(@); -lw(33.4n) lw(19.4n) lw(17.3n). +lw(31.0n) lw(21.8n) lw(17.2n). T{ purpose T}@T{ @@ -6894,6 +6894,10 @@ T}@T{ T}@T{ \f[C]-c/--commodity-style\f[R] T} +T{ +T}@T{ +T}@T{ +T} .TE .SS Directives and multiple files .PP diff --git a/hledger/hledger.info b/hledger/hledger.info index 14f5b70c8..6a74527c0 100644 --- a/hledger/hledger.info +++ b/hledger/hledger.info @@ -5861,31 +5861,30 @@ account'*following entries until end of current file or 'end apply And here is an overview of which directives are useful for what: -purpose directives command line - options with - similar effect ----------------------------------------------------------------------------- +purpose directives command line + options with + similar effect +--------------------------------------------------------------------------- *READING/GENERATING DATA:* -Declaring a commodity's or file's 'commodity', 'D', -decimal mark to help parse 'decimal-mark' -amounts accurately -Applying changes to the data 'alias', 'apply '--alias' -while parsing account', - 'comment', 'D', - 'Y' -Inlining or concatenating extra 'include' multiple -data files '-f/--file''s -Generating extra transactions or '~' -budget goals -Generating extra postings '=' +Declaring a commodity's or 'commodity', 'D', +file's decimal mark to help 'decimal-mark' +parse amounts accurately +Applying changes to the data 'alias', 'apply '--alias' +while parsing account', 'comment', + 'D', 'Y' +Inlining or concatenating 'include' multiple +extra data files '-f/--file''s +Generating extra transactions '~' +or budget goals +Generating extra postings '=' *CHECKING FOR ERRORS:* -Defining valid entities to allow 'account', -stricter error checking 'commodity', - 'payee' +Defining valid entities to 'account', +allow stricter error checking 'commodity', 'payee' *DISPLAYING REPORTS:* -Defining accounts' display order 'account' -and accounting type -Defining commodity display styles 'commodity', 'D' '-c/--commodity-style' +Defining accounts' display 'account' +order and accounting type +Defining commodity display 'commodity', 'D' '-c/--commodity-style' +styles  File: hledger.info, Node: Directives and multiple files, Next: Comment blocks, Prev: Directives, Up: JOURNAL FORMAT @@ -9337,196 +9336,196 @@ Node: Balance assignments and prices211022 Ref: #balance-assignments-and-prices211188 Node: Directives211412 Ref: #directives211575 -Node: Directives and multiple files216097 -Ref: #directives-and-multiple-files216293 -Node: Comment blocks216985 -Ref: #comment-blocks217162 -Node: Including other files217338 -Ref: #including-other-files217512 -Node: Default year218436 -Ref: #default-year218594 -Node: Declaring payees219001 -Ref: #declaring-payees219172 -Node: Declaring the decimal mark219418 -Ref: #declaring-the-decimal-mark219618 -Node: Declaring commodities220015 -Ref: #declaring-commodities220206 -Node: Commodity error checking222724 -Ref: #commodity-error-checking222874 -Node: Default commodity223131 -Ref: #default-commodity223311 -Node: Declaring market prices224427 -Ref: #declaring-market-prices224616 -Node: Declaring accounts225429 -Ref: #declaring-accounts225609 -Node: Account error checking226811 -Ref: #account-error-checking226977 -Node: Account comments228156 -Ref: #account-comments228340 -Node: Account subdirectives228764 -Ref: #account-subdirectives228949 -Node: Account types229262 -Ref: #account-types229436 -Node: Declaring account types230094 -Ref: #declaring-account-types230273 -Node: Auto-detected account types231327 -Ref: #auto-detected-account-types231514 -Node: Account display order233532 -Ref: #account-display-order233692 -Node: Rewriting accounts234843 -Ref: #rewriting-accounts235022 -Node: Basic aliases235779 -Ref: #basic-aliases235915 -Node: Regex aliases236659 -Ref: #regex-aliases236821 -Node: Combining aliases237540 -Ref: #combining-aliases237723 -Node: Aliases and multiple files238999 -Ref: #aliases-and-multiple-files239198 -Node: end aliases239777 -Ref: #end-aliases239924 -Node: Default parent account240073 -Ref: #default-parent-account240263 -Node: Periodic transactions241147 -Ref: #periodic-transactions241330 -Node: Periodic rule syntax243247 -Ref: #periodic-rule-syntax243447 -Node: Two spaces between period expression and description!244151 -Ref: #two-spaces-between-period-expression-and-description244464 -Node: Forecasting with periodic transactions245148 -Ref: #forecasting-with-periodic-transactions245447 -Node: Budgeting with periodic transactions248218 -Ref: #budgeting-with-periodic-transactions248451 -Node: Auto postings248860 -Ref: #auto-postings248996 -Node: Auto postings and multiple files251175 -Ref: #auto-postings-and-multiple-files251373 -Node: Auto postings and dates251582 -Ref: #auto-postings-and-dates251850 -Node: Auto postings and transaction balancing / inferred amounts / balance assertions252025 -Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions252370 -Node: Auto posting tags252873 -Ref: #auto-posting-tags253082 -Node: CSV FORMAT253718 -Ref: #csv-format253846 -Node: Examples256475 -Ref: #examples256578 -Node: Basic256786 -Ref: #basic256888 -Node: Bank of Ireland257430 -Ref: #bank-of-ireland257567 -Node: Amazon259029 -Ref: #amazon259149 -Node: Paypal260868 -Ref: #paypal260964 -Node: CSV rules268608 -Ref: #csv-rules268726 -Node: skip269059 -Ref: #skip269159 -Node: fields list269534 -Ref: #fields-list269673 -Node: field assignment271176 -Ref: #field-assignment271328 -Node: Field names272363 -Ref: #field-names272503 -Node: date field272883 -Ref: #date-field273003 -Node: date2 field273051 -Ref: #date2-field273194 -Node: status field273250 -Ref: #status-field273395 -Node: code field273444 -Ref: #code-field273591 -Node: description field273636 -Ref: #description-field273798 -Node: comment field273857 -Ref: #comment-field274014 -Node: account field274314 -Ref: #account-field274466 -Node: amount field275041 -Ref: #amount-field275192 -Node: currency field276437 -Ref: #currency-field276592 -Node: balance field276849 -Ref: #balance-field276983 -Node: separator277355 -Ref: #separator277487 -Node: if block278027 -Ref: #if-block278154 -Node: Matching the whole record278555 -Ref: #matching-the-whole-record278732 -Node: Matching individual fields279535 -Ref: #matching-individual-fields279741 -Node: Combining matchers279965 -Ref: #combining-matchers280163 -Node: Rules applied on successful match280476 -Ref: #rules-applied-on-successful-match280669 -Node: if table281323 -Ref: #if-table281444 -Node: end283182 -Ref: #end283296 -Node: date-format283520 -Ref: #date-format283654 -Node: decimal-mark284650 -Ref: #decimal-mark284797 -Node: newest-first285136 -Ref: #newest-first285279 -Node: include285962 -Ref: #include286095 -Node: balance-type286539 -Ref: #balance-type286661 -Node: Tips287361 -Ref: #tips287452 -Node: Rapid feedback287751 -Ref: #rapid-feedback287870 -Node: Valid CSV288322 -Ref: #valid-csv288454 -Node: File Extension288646 -Ref: #file-extension288800 -Node: Reading multiple CSV files289229 -Ref: #reading-multiple-csv-files289416 -Node: Valid transactions289657 -Ref: #valid-transactions289837 -Node: Deduplicating importing290465 -Ref: #deduplicating-importing290646 -Node: Setting amounts291679 -Ref: #setting-amounts291836 -Node: Amount signs294277 -Ref: #amount-signs294431 -Node: Setting currency/commodity295118 -Ref: #setting-currencycommodity295306 -Node: Amount decimal places296480 -Ref: #amount-decimal-places296672 -Node: Referencing other fields296984 -Ref: #referencing-other-fields297183 -Node: How CSV rules are evaluated298080 -Ref: #how-csv-rules-are-evaluated298255 -Node: TIMECLOCK FORMAT299706 -Ref: #timeclock-format299846 -Node: TIMEDOT FORMAT301907 -Ref: #timedot-format302045 -Node: COMMON TASKS306607 -Ref: #common-tasks306736 -Node: Getting help307143 -Ref: #getting-help307277 -Node: Constructing command lines307830 -Ref: #constructing-command-lines308024 -Node: Starting a journal file308721 -Ref: #starting-a-journal-file308921 -Node: Setting opening balances310109 -Ref: #setting-opening-balances310307 -Node: Recording transactions313448 -Ref: #recording-transactions313630 -Node: Reconciling314186 -Ref: #reconciling314331 -Node: Reporting316588 -Ref: #reporting316730 -Node: Migrating to a new file320729 -Ref: #migrating-to-a-new-file320879 -Node: LIMITATIONS321178 -Ref: #limitations321306 -Node: TROUBLESHOOTING322049 -Ref: #troubleshooting322164 +Node: Directives and multiple files216012 +Ref: #directives-and-multiple-files216208 +Node: Comment blocks216900 +Ref: #comment-blocks217077 +Node: Including other files217253 +Ref: #including-other-files217427 +Node: Default year218351 +Ref: #default-year218509 +Node: Declaring payees218916 +Ref: #declaring-payees219087 +Node: Declaring the decimal mark219333 +Ref: #declaring-the-decimal-mark219533 +Node: Declaring commodities219930 +Ref: #declaring-commodities220121 +Node: Commodity error checking222639 +Ref: #commodity-error-checking222789 +Node: Default commodity223046 +Ref: #default-commodity223226 +Node: Declaring market prices224342 +Ref: #declaring-market-prices224531 +Node: Declaring accounts225344 +Ref: #declaring-accounts225524 +Node: Account error checking226726 +Ref: #account-error-checking226892 +Node: Account comments228071 +Ref: #account-comments228255 +Node: Account subdirectives228679 +Ref: #account-subdirectives228864 +Node: Account types229177 +Ref: #account-types229351 +Node: Declaring account types230009 +Ref: #declaring-account-types230188 +Node: Auto-detected account types231242 +Ref: #auto-detected-account-types231429 +Node: Account display order233447 +Ref: #account-display-order233607 +Node: Rewriting accounts234758 +Ref: #rewriting-accounts234937 +Node: Basic aliases235694 +Ref: #basic-aliases235830 +Node: Regex aliases236574 +Ref: #regex-aliases236736 +Node: Combining aliases237455 +Ref: #combining-aliases237638 +Node: Aliases and multiple files238914 +Ref: #aliases-and-multiple-files239113 +Node: end aliases239692 +Ref: #end-aliases239839 +Node: Default parent account239988 +Ref: #default-parent-account240178 +Node: Periodic transactions241062 +Ref: #periodic-transactions241245 +Node: Periodic rule syntax243162 +Ref: #periodic-rule-syntax243362 +Node: Two spaces between period expression and description!244066 +Ref: #two-spaces-between-period-expression-and-description244379 +Node: Forecasting with periodic transactions245063 +Ref: #forecasting-with-periodic-transactions245362 +Node: Budgeting with periodic transactions248133 +Ref: #budgeting-with-periodic-transactions248366 +Node: Auto postings248775 +Ref: #auto-postings248911 +Node: Auto postings and multiple files251090 +Ref: #auto-postings-and-multiple-files251288 +Node: Auto postings and dates251497 +Ref: #auto-postings-and-dates251765 +Node: Auto postings and transaction balancing / inferred amounts / balance assertions251940 +Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions252285 +Node: Auto posting tags252788 +Ref: #auto-posting-tags252997 +Node: CSV FORMAT253633 +Ref: #csv-format253761 +Node: Examples256390 +Ref: #examples256493 +Node: Basic256701 +Ref: #basic256803 +Node: Bank of Ireland257345 +Ref: #bank-of-ireland257482 +Node: Amazon258944 +Ref: #amazon259064 +Node: Paypal260783 +Ref: #paypal260879 +Node: CSV rules268523 +Ref: #csv-rules268641 +Node: skip268974 +Ref: #skip269074 +Node: fields list269449 +Ref: #fields-list269588 +Node: field assignment271091 +Ref: #field-assignment271243 +Node: Field names272278 +Ref: #field-names272418 +Node: date field272798 +Ref: #date-field272918 +Node: date2 field272966 +Ref: #date2-field273109 +Node: status field273165 +Ref: #status-field273310 +Node: code field273359 +Ref: #code-field273506 +Node: description field273551 +Ref: #description-field273713 +Node: comment field273772 +Ref: #comment-field273929 +Node: account field274229 +Ref: #account-field274381 +Node: amount field274956 +Ref: #amount-field275107 +Node: currency field276352 +Ref: #currency-field276507 +Node: balance field276764 +Ref: #balance-field276898 +Node: separator277270 +Ref: #separator277402 +Node: if block277942 +Ref: #if-block278069 +Node: Matching the whole record278470 +Ref: #matching-the-whole-record278647 +Node: Matching individual fields279450 +Ref: #matching-individual-fields279656 +Node: Combining matchers279880 +Ref: #combining-matchers280078 +Node: Rules applied on successful match280391 +Ref: #rules-applied-on-successful-match280584 +Node: if table281238 +Ref: #if-table281359 +Node: end283097 +Ref: #end283211 +Node: date-format283435 +Ref: #date-format283569 +Node: decimal-mark284565 +Ref: #decimal-mark284712 +Node: newest-first285051 +Ref: #newest-first285194 +Node: include285877 +Ref: #include286010 +Node: balance-type286454 +Ref: #balance-type286576 +Node: Tips287276 +Ref: #tips287367 +Node: Rapid feedback287666 +Ref: #rapid-feedback287785 +Node: Valid CSV288237 +Ref: #valid-csv288369 +Node: File Extension288561 +Ref: #file-extension288715 +Node: Reading multiple CSV files289144 +Ref: #reading-multiple-csv-files289331 +Node: Valid transactions289572 +Ref: #valid-transactions289752 +Node: Deduplicating importing290380 +Ref: #deduplicating-importing290561 +Node: Setting amounts291594 +Ref: #setting-amounts291751 +Node: Amount signs294192 +Ref: #amount-signs294346 +Node: Setting currency/commodity295033 +Ref: #setting-currencycommodity295221 +Node: Amount decimal places296395 +Ref: #amount-decimal-places296587 +Node: Referencing other fields296899 +Ref: #referencing-other-fields297098 +Node: How CSV rules are evaluated297995 +Ref: #how-csv-rules-are-evaluated298170 +Node: TIMECLOCK FORMAT299621 +Ref: #timeclock-format299761 +Node: TIMEDOT FORMAT301822 +Ref: #timedot-format301960 +Node: COMMON TASKS306522 +Ref: #common-tasks306651 +Node: Getting help307058 +Ref: #getting-help307192 +Node: Constructing command lines307745 +Ref: #constructing-command-lines307939 +Node: Starting a journal file308636 +Ref: #starting-a-journal-file308836 +Node: Setting opening balances310024 +Ref: #setting-opening-balances310222 +Node: Recording transactions313363 +Ref: #recording-transactions313545 +Node: Reconciling314101 +Ref: #reconciling314246 +Node: Reporting316503 +Ref: #reporting316645 +Node: Migrating to a new file320644 +Ref: #migrating-to-a-new-file320794 +Node: LIMITATIONS321093 +Ref: #limitations321221 +Node: TROUBLESHOOTING321964 +Ref: #troubleshooting322079  End Tag Table diff --git a/hledger/hledger.txt b/hledger/hledger.txt index e22b2d681..8eb0acc95 100644 --- a/hledger/hledger.txt +++ b/hledger/hledger.txt @@ -4914,62 +4914,62 @@ JOURNAL FORMAT And here is an overview of which directives are useful for what: - purpose directives command line + purpose directives command line options with sim- ilar effect ----------------------------------------------------------------------------- READING/GENERATING DATA: - Declaring a commodity's or file's commodity, D, deci- - decimal mark to help parse mal-mark - amounts accurately - Applying changes to the data alias, apply --alias - while parsing account, comment, - D, Y - Inlining or concatenating extra include multiple + Declaring a commodity's or commodity, D, decimal- + file's decimal mark to help mark + parse amounts accurately + Applying changes to the data alias, apply account, --alias + while parsing comment, D, Y + Inlining or concatenating extra include multiple data files -f/--file's - Generating extra transactions or ~ - budget goals + Generating extra transactions ~ + or budget goals + Generating extra postings = - Generating extra postings = CHECKING FOR ERRORS: - Defining valid entities to allow account, commodity, - stricter error checking payee + Defining valid entities to account, commodity, + allow stricter error checking payee DISPLAYING REPORTS: - Defining accounts' display order account - and accounting type - Defining commodity display styles commodity, D -c/--commodity- - style + Defining accounts' display account + order and accounting type + Defining commodity display commodity, D -c/--commodity- + styles style + Directives and multiple files - If you use multiple -f/--file options, or the include directive, + If you use multiple -f/--file options, or the include directive, hledger will process multiple input files. But directives which affect - input typically have effect only until the end of the file in which + input typically have effect only until the end of the file in which they occur (and on any included files in that region). This may seem inconvenient, but it's intentional; it makes reports sta- - ble and deterministic, independent of the order of input. Otherwise - you could see different numbers if you happened to write -f options in - a different order, or if you moved includes around while cleaning up + ble and deterministic, independent of the order of input. Otherwise + you could see different numbers if you happened to write -f options in + a different order, or if you moved includes around while cleaning up your files. - It can be surprising though; for example, it means that alias direc- + It can be surprising though; for example, it means that alias direc- tives do not affect parent or sibling files (see below). Comment blocks - A line containing just comment starts a commented region of the file, + A line containing just comment starts a commented region of the file, and a line containing just end comment (or the end of the current file) ends it. See also comments. Including other files - You can pull in the content of additional files by writing an include + You can pull in the content of additional files by writing an include directive, like this: include FILEPATH - Only journal files can include, and only journal, timeclock or timedot + Only journal files can include, and only journal, timeclock or timedot files can be included (not CSV files, currently). - If the file path does not begin with a slash, it is relative to the + If the file path does not begin with a slash, it is relative to the current file's folder. A tilde means home directory, eg: include ~/main.journal. @@ -4977,18 +4977,18 @@ JOURNAL FORMAT The path may contain glob patterns to match multiple files, eg: include *.journal. - There is limited support for recursive wildcards: **/ (the slash is - required) matches 0 or more subdirectories. It's not super convenient - since you have to avoid include cycles and including directories, but + There is limited support for recursive wildcards: **/ (the slash is + required) matches 0 or more subdirectories. It's not super convenient + since you have to avoid include cycles and including directories, but this can be done, eg: include */**/*.journal. The path may also be prefixed to force a specific file format, overrid- - ing the file extension (as described in hledger.1 -> Input files): + ing the file extension (as described in hledger.1 -> Input files): include timedot:~/notes/2020*.md. Default year - You can set a default year to be used for subsequent dates which don't - specify a year. This is a line beginning with Y followed by the year. + You can set a default year to be used for subsequent dates which don't + specify a year. This is a line beginning with Y followed by the year. Eg: Y2009 ; set default year to 2009 @@ -5008,9 +5008,9 @@ JOURNAL FORMAT assets Declaring payees - The payee directive can be used to declare a limited set of payees - which may appear in transaction descriptions. The "payees" check will - report an error if any transaction refers to a payee that has not been + The payee directive can be used to declare a limited set of payees + which may appear in transaction descriptions. The "payees" check will + report an error if any transaction refers to a payee that has not been declared. Eg: payee Whole Foods @@ -5026,36 +5026,36 @@ JOURNAL FORMAT decimal-mark , - This prevents any ambiguity when parsing numbers in the file, so we - recommend it, especially if the file contains digit group marks (eg + This prevents any ambiguity when parsing numbers in the file, so we + recommend it, especially if the file contains digit group marks (eg thousands separators). Declaring commodities - You can use commodity directives to declare your commodities. In fact + You can use commodity directives to declare your commodities. In fact the commodity directive performs several functions at once: - 1. It declares commodities which may be used in the journal. This can - optionally be enforced, providing useful error checking. (Cf Com- + 1. It declares commodities which may be used in the journal. This can + optionally be enforced, providing useful error checking. (Cf Com- modity error checking) - 2. It declares which decimal mark character (period or comma), to - expect when parsing input - useful to disambiguate international - number formats in your data. Without this, hledger will parse both + 2. It declares which decimal mark character (period or comma), to + expect when parsing input - useful to disambiguate international + number formats in your data. Without this, hledger will parse both 1,000 and 1.000 as 1. (Cf Amounts) - 3. It declares how to render the commodity's amounts when displaying + 3. It declares how to render the commodity's amounts when displaying output - the decimal mark, any digit group marks, the number of dec- - imal places, symbol placement and so on. (Cf Commodity display + imal places, symbol placement and so on. (Cf Commodity display style) - You will run into one of the problems solved by commodity directives + You will run into one of the problems solved by commodity directives sooner or later, so we recommend using them, for robust and predictable parsing and display. - Generally you should put them at the top of your journal file (since + Generally you should put them at the top of your journal file (since for function 2, they affect only following amounts, cf #793). - A commodity directive is just the word commodity followed by a sample + A commodity directive is just the word commodity followed by a sample amount, like this: ;commodity SAMPLEAMOUNT @@ -5063,8 +5063,8 @@ JOURNAL FORMAT commodity $1000.00 commodity 1,000.0000 AAAA ; optional same-line comment - It may also be written on multiple lines, and use the format subdirec- - tive, as in Ledger. Note in this case the commodity symbol appears + It may also be written on multiple lines, and use the format subdirec- + tive, as in Ledger. Note in this case the commodity symbol appears twice; it must be the same in both places: ;commodity SYMBOL @@ -5076,11 +5076,11 @@ JOURNAL FORMAT commodity INR format INR 1,00,00,000.00 - Remember that if the commodity symbol contains spaces, numbers, or + Remember that if the commodity symbol contains spaces, numbers, or punctuation, it must be enclosed in double quotes (cf Commodity). - The amount's quantity does not matter; only the format is significant. - It must include a decimal mark - either a period or a comma - followed + The amount's quantity does not matter; only the format is significant. + It must include a decimal mark - either a period or a comma - followed by 0 or more decimal digits. A few more examples: @@ -5091,29 +5091,29 @@ JOURNAL FORMAT commodity INR 9,99,99,999.0 commodity 1 000 000. - Note hledger normally uses banker's rounding, so 0.5 displayed with + Note hledger normally uses banker's rounding, so 0.5 displayed with zero decimal digits is "0". (More at Commodity display style.) - Even in the presence of commodity directives, the commodity display + Even in the presence of commodity directives, the commodity display style can still be overridden by supplying a command line option. Commodity error checking - In strict mode, enabled with the -s/--strict flag, hledger will report - an error if a commodity symbol is used that has not been declared by a - commodity directive. This works similarly to account error checking, + In strict mode, enabled with the -s/--strict flag, hledger will report + an error if a commodity symbol is used that has not been declared by a + commodity directive. This works similarly to account error checking, see the notes there for more details. Default commodity The D directive sets a default commodity, to be used for any subsequent - commodityless amounts (ie, plain numbers) seen while parsing the jour- - nal. This effect lasts until the next D directive, or the end of the + commodityless amounts (ie, plain numbers) seen while parsing the jour- + nal. This effect lasts until the next D directive, or the end of the journal. - For compatibility/historical reasons, D also acts like a commodity + For compatibility/historical reasons, D also acts like a commodity directive (setting the commodity's decimal mark for parsing and display style for output). - The syntax is D AMOUNT. As with commodity, the amount must include a + The syntax is D AMOUNT. As with commodity, the amount must include a decimal mark (either period or comma). Eg: ; commodity-less amounts should be treated as dollars @@ -5127,23 +5127,23 @@ JOURNAL FORMAT If both commodity and D directives are found for a commodity, commodity takes precedence for setting decimal mark and display style. - If you are using D and also checking commodities, you will need to add + If you are using D and also checking commodities, you will need to add a commodity directive similar to the D. (The hledger check commodities command expects commodity directives, and ignores D). Declaring market prices - The P directive declares a market price, which is an exchange rate + The P directive declares a market price, which is an exchange rate between two commodities on a certain date. (In Ledger, they are called - "historical prices".) These are often obtained from a stock exchange, + "historical prices".) These are often obtained from a stock exchange, cryptocurrency exchange, or the foreign exchange market. The format is: P DATE COMMODITY1SYMBOL COMMODITY2AMOUNT - DATE is a simple date, COMMODITY1SYMBOL is the symbol of the commodity - being priced, and COMMODITY2AMOUNT is the amount (symbol and quantity) - of commodity 2 that one unit of commodity 1 is worth on this date. + DATE is a simple date, COMMODITY1SYMBOL is the symbol of the commodity + being priced, and COMMODITY2AMOUNT is the amount (symbol and quantity) + of commodity 2 that one unit of commodity 1 is worth on this date. Examples: # one euro was worth $1.35 from 2009-01-01 onward: @@ -5152,69 +5152,69 @@ JOURNAL FORMAT # and $1.40 from 2010-01-01 onward: P 2010-01-01 EUR $1.40 - The -V, -X and --value flags use these market prices to show amount + The -V, -X and --value flags use these market prices to show amount values in another commodity. See Valuation. Declaring accounts account directives can be used to declare accounts (ie, the places that - amounts are transferred from and to). Though not required, these dec- + amounts are transferred from and to). Though not required, these dec- larations can provide several benefits: o They can document your intended chart of accounts, providing a refer- ence. - o They can help hledger know your accounts' types (asset, liability, - equity, revenue, expense), useful for reports like balancesheet and + o They can help hledger know your accounts' types (asset, liability, + equity, revenue, expense), useful for reports like balancesheet and incomestatement. - o They control account display order in reports, allowing non-alpha- + o They control account display order in reports, allowing non-alpha- betic sorting (eg Revenues to appear above Expenses). - o They can store extra information about accounts (account numbers, + o They can store extra information about accounts (account numbers, notes, etc.) - o They help with account name completion in the add command, hledger- + o They help with account name completion in the add command, hledger- iadd, hledger-web, ledger-mode etc. - o In strict mode, they restrict which accounts may be posted to by + o In strict mode, they restrict which accounts may be posted to by transactions, which helps detect typos. - The simplest form is just the word account followed by a hledger-style + The simplest form is just the word account followed by a hledger-style account name, eg this account directive declares the assets:bank:check- ing account: account assets:bank:checking Account error checking - By default, accounts come into existence when a transaction references - them by name. This is convenient, but it means hledger can't warn you + By default, accounts come into existence when a transaction references + them by name. This is convenient, but it means hledger can't warn you when you mis-spell an account name in the journal. Usually you'll find - the error later, as an extra account in balance reports, or an incor- + the error later, as an extra account in balance reports, or an incor- rect balance when reconciling. - In strict mode, enabled with the -s/--strict flag, hledger will report - an error if any transaction uses an account name that has not been + In strict mode, enabled with the -s/--strict flag, hledger will report + an error if any transaction uses an account name that has not been declared by an account directive. Some notes: - o The declaration is case-sensitive; transactions must use the correct + o The declaration is case-sensitive; transactions must use the correct account name capitalisation. - o The account directive's scope is "whole file and below" (see direc- + o The account directive's scope is "whole file and below" (see direc- tives). This means it affects all of the current file, and any files - it includes, but not parent or sibling files. The position of + it includes, but not parent or sibling files. The position of account directives within the file does not matter, though it's usual to put them at the top. - o Accounts can only be declared in journal files (but will affect + o Accounts can only be declared in journal files (but will affect included files in other formats). - o It's currently not possible to declare "all possible subaccounts" + o It's currently not possible to declare "all possible subaccounts" with a wildcard; every account posted to must be declared. Account comments Comments, beginning with a semicolon, can be added: - o on the same line, after two or more spaces (because ; is allowed in + o on the same line, after two or more spaces (because ; is allowed in account names) o on the next lines, indented @@ -5228,7 +5228,7 @@ JOURNAL FORMAT Same-line comments are not supported by Ledger, or hledger <1.13. Account subdirectives - We also allow (and ignore) Ledger-style indented subdirectives, just + We also allow (and ignore) Ledger-style indented subdirectives, just for compatibility.: account assets:bank:checking @@ -5241,27 +5241,27 @@ JOURNAL FORMAT [LEDGER-STYLE SUBDIRECTIVES, IGNORED] Account types - hledger recognises five main types of account, corresponding to the + hledger recognises five main types of account, corresponding to the account classes in the accounting equation: Asset, Liability, Equity, Revenue, Expense. These account types are important for controlling which accounts appear - in the balancesheet, balancesheetequity, incomestatement reports (and + in the balancesheet, balancesheetequity, incomestatement reports (and probably for other things in future). - Additionally, we recognise the Cash type, which is also an Asset, and - which causes accounts to appear in the cashflow report. ("Cash" here - means liquid assets, eg bank balances but typically not investments or + Additionally, we recognise the Cash type, which is also an Asset, and + which causes accounts to appear in the cashflow report. ("Cash" here + means liquid assets, eg bank balances but typically not investments or receivables.) Declaring account types To make the balancesheet/balancesheetequity/cashflow/incomestatement reports work, generally you should declare your top-level accounts, and - their types. For each top-level account, write an account directive, - with a type: tag. The tag's value can be any of Asset, Liability, - Equity, Revenue, Expense, Cash, or (for short) A, L, E, R, X, C (case - insensitive). An account's type is inherited by its subaccounts, + their types. For each top-level account, write an account directive, + with a type: tag. The tag's value can be any of Asset, Liability, + Equity, Revenue, Expense, Cash, or (for short) A, L, E, R, X, C (case + insensitive). An account's type is inherited by its subaccounts, unless they declare a different type. Here's an example, declaring all six account types: @@ -5273,8 +5273,8 @@ JOURNAL FORMAT account revenues ; type: Revenue account expenses ; type: Expense - There is also an older syntax, which is deprecated and will be dropped - soon (A, L, E, R or X separated from the account name by two or more + There is also an older syntax, which is deprecated and will be dropped + soon (A, L, E, R or X separated from the account name by two or more spaces): account assets A @@ -5286,7 +5286,7 @@ JOURNAL FORMAT Auto-detected account types hledger tries to find at least one top level account in each of the six account types (Asset, Liability, Equity, Revenue, Expense, Cash). When - no accounts have been declared for a particular type, hledger tries to + no accounts have been declared for a particular type, hledger tries to auto-detect some accounts by name, using regular expressions: If account's name matches this case insensitive regular expression:| its type is: @@ -5299,25 +5299,25 @@ JOURNAL FORMAT ^(income|revenue)s?(:|$) | Revenue ^expenses?(:|$) | Expense - For people using standard english account names, this feature helps - hledger's high-level reports work out of the box with minimal configu- + For people using standard english account names, this feature helps + hledger's high-level reports work out of the box with minimal configu- ration. - If you use non-english account names, you should declare account types + If you use non-english account names, you should declare account types to make these reports work. And more generally, declaring accounts and - types is usually a good idea, for increased clarity and predictability + types is usually a good idea, for increased clarity and predictability (and for the other benefits of account directives: error checking, dis- play order, etc). Notes: - o When any account is declared as some type, this disables auto-detec- + o When any account is declared as some type, this disables auto-detec- tion for that particular type. - o If you declare any account's type, it's a good idea to declare an - account for all six types, since a mix of declared and auto-detected + o If you declare any account's type, it's a good idea to declare an + account for all six types, since a mix of declared and auto-detected types can cause confusion. For example, here liabilities is declared - to be Equity, but would also be auto-detected as Liability, since no + to be Equity, but would also be auto-detected as Liability, since no Liability account is declared: account liabilities ; type:Equity @@ -5328,8 +5328,8 @@ JOURNAL FORMAT equity -2 Account display order - Account directives also set the order in which accounts are displayed, - eg in reports, the hledger-ui accounts screen, and the hledger-web + Account directives also set the order in which accounts are displayed, + eg in reports, the hledger-ui accounts screen, and the hledger-web sidebar. By default accounts are listed in alphabetical order. But if you have these account directives in the journal: @@ -5351,20 +5351,20 @@ JOURNAL FORMAT Undeclared accounts, if any, are displayed last, in alphabetical order. - Note that sorting is done at each level of the account tree (within - each group of sibling accounts under the same parent). And currently, + Note that sorting is done at each level of the account tree (within + each group of sibling accounts under the same parent). And currently, this directive: account other:zoo - would influence the position of zoo among other's subaccounts, but not + would influence the position of zoo among other's subaccounts, but not the position of other among the top-level accounts. This means: - o you will sometimes declare parent accounts (eg account other above) - that you don't intend to post to, just to customize their display + o you will sometimes declare parent accounts (eg account other above) + that you don't intend to post to, just to customize their display order - o sibling accounts stay together (you couldn't display x:y in between + o sibling accounts stay together (you couldn't display x:y in between a:b and a:c). Rewriting accounts @@ -5382,15 +5382,15 @@ JOURNAL FORMAT o customising reports Account aliases also rewrite account names in account directives. They - do not affect account names being entered via hledger add or hledger- + do not affect account names being entered via hledger add or hledger- web. See also Rewrite account names. Basic aliases - To set an account alias, use the alias directive in your journal file. - This affects all subsequent journal entries in the current file or its - included files (but note: not sibling or parent files). The spaces + To set an account alias, use the alias directive in your journal file. + This affects all subsequent journal entries in the current file or its + included files (but note: not sibling or parent files). The spaces around the = are optional: alias OLD = NEW @@ -5398,49 +5398,49 @@ JOURNAL FORMAT Or, you can use the --alias 'OLD=NEW' option on the command line. This affects all entries. It's useful for trying out aliases interactively. - OLD and NEW are case sensitive full account names. hledger will - replace any occurrence of the old account name with the new one. Sub- + OLD and NEW are case sensitive full account names. hledger will + replace any occurrence of the old account name with the new one. Sub- accounts are also affected. Eg: alias checking = assets:bank:wells fargo:checking ; rewrites "checking" to "assets:bank:wells fargo:checking", or "checking:a" to "assets:bank:wells fargo:checking:a" Regex aliases - There is also a more powerful variant that uses a regular expression, + There is also a more powerful variant that uses a regular expression, indicated by the forward slashes: alias /REGEX/ = REPLACEMENT or --alias '/REGEX/=REPLACEMENT'. - REGEX is a case-insensitive regular expression. Anywhere it matches - inside an account name, the matched part will be replaced by REPLACE- - MENT. If REGEX contains parenthesised match groups, these can be ref- + REGEX is a case-insensitive regular expression. Anywhere it matches + inside an account name, the matched part will be replaced by REPLACE- + MENT. If REGEX contains parenthesised match groups, these can be ref- erenced by the usual numeric backreferences in REPLACEMENT. Eg: alias /^(.+):bank:([^:]+):(.*)/ = \1:\2 \3 ; rewrites "assets:bank:wells fargo:checking" to "assets:wells fargo checking" - Also note that REPLACEMENT continues to the end of line (or on command - line, to end of option argument), so it can contain trailing white- + Also note that REPLACEMENT continues to the end of line (or on command + line, to end of option argument), so it can contain trailing white- space. Combining aliases - You can define as many aliases as you like, using journal directives + You can define as many aliases as you like, using journal directives and/or command line options. - Recursive aliases - where an account name is rewritten by one alias, - then by another alias, and so on - are allowed. Each alias sees the + Recursive aliases - where an account name is rewritten by one alias, + then by another alias, and so on - are allowed. Each alias sees the effect of previously applied aliases. - In such cases it can be important to understand which aliases will be - applied and in which order. For (each account name in) each journal + In such cases it can be important to understand which aliases will be + applied and in which order. For (each account name in) each journal entry, we apply: - 1. alias directives preceding the journal entry, most recently parsed + 1. alias directives preceding the journal entry, most recently parsed first (ie, reading upward from the journal entry, bottom to top) - 2. --alias options, in the order they appeared on the command line + 2. --alias options, in the order they appeared on the command line (left to right). In other words, for (an account name in) a given journal entry: @@ -5451,15 +5451,15 @@ JOURNAL FORMAT o aliases defined after/below the entry do not affect it. - This gives nearby aliases precedence over distant ones, and helps pro- - vide semantic stability - aliases will keep working the same way inde- + This gives nearby aliases precedence over distant ones, and helps pro- + vide semantic stability - aliases will keep working the same way inde- pendent of which files are being read and in which order. - In case of trouble, adding --debug=6 to the command line will show + In case of trouble, adding --debug=6 to the command line will show which aliases are being applied when. Aliases and multiple files - As explained at Directives and multiple files, alias directives do not + As explained at Directives and multiple files, alias directives do not affect parent or sibling files. Eg in this command, hledger -f a.aliases -f b.journal @@ -5492,8 +5492,8 @@ JOURNAL FORMAT end aliases Default parent account - You can specify a parent account which will be prepended to all - accounts within a section of the journal. Use the apply account and + You can specify a parent account which will be prepended to all + accounts within a section of the journal. Use the apply account and end apply account directives like so: apply account home @@ -5510,7 +5510,7 @@ JOURNAL FORMAT home:food $10 home:cash $-10 - If end apply account is omitted, the effect lasts to the end of the + If end apply account is omitted, the effect lasts to the end of the file. Included files are also affected, eg: apply account business @@ -5519,49 +5519,49 @@ JOURNAL FORMAT apply account personal include personal.journal - Prior to hledger 1.0, legacy account and end spellings were also sup- + Prior to hledger 1.0, legacy account and end spellings were also sup- ported. - A default parent account also affects account directives. It does not - affect account names being entered via hledger add or hledger-web. If - account aliases are present, they are applied after the default parent + A default parent account also affects account directives. It does not + affect account names being entered via hledger add or hledger-web. If + account aliases are present, they are applied after the default parent account. Periodic transactions - Periodic transaction rules describe transactions that recur. They - allow hledger to generate temporary future transactions to help with - forecasting, so you don't have to write out each one in the journal, + Periodic transaction rules describe transactions that recur. They + allow hledger to generate temporary future transactions to help with + forecasting, so you don't have to write out each one in the journal, and it's easy to try out different forecasts. - Periodic transactions can be a little tricky, so before you use them, + Periodic transactions can be a little tricky, so before you use them, read this whole section - or at least these tips: - 1. Two spaces accidentally added or omitted will cause you trouble - + 1. Two spaces accidentally added or omitted will cause you trouble - read about this below. - 2. For troubleshooting, show the generated transactions with hledger - print --forecast tag:generated or hledger register --forecast + 2. For troubleshooting, show the generated transactions with hledger + print --forecast tag:generated or hledger register --forecast tag:generated. - 3. Forecasted transactions will begin only after the last non-fore- + 3. Forecasted transactions will begin only after the last non-fore- casted transaction's date. - 4. Forecasted transactions will end 6 months from today, by default. + 4. Forecasted transactions will end 6 months from today, by default. See below for the exact start/end rules. - 5. period expressions can be tricky. Their documentation needs + 5. period expressions can be tricky. Their documentation needs improvement, but is worth studying. - 6. Some period expressions with a repeating interval must begin on a - natural boundary of that interval. Eg in weekly from DATE, DATE - must be a monday. ~ weekly from 2019/10/1 (a tuesday) will give an + 6. Some period expressions with a repeating interval must begin on a + natural boundary of that interval. Eg in weekly from DATE, DATE + must be a monday. ~ weekly from 2019/10/1 (a tuesday) will give an error. 7. Other period expressions with an interval are automatically expanded - to cover a whole number of that interval. (This is done to improve + to cover a whole number of that interval. (This is done to improve reports, but it also affects periodic transactions. Yes, it's a bit - inconsistent with the above.) Eg: ~ every 10th day of month from - 2020/01, which is equivalent to ~ every 10th day of month from + inconsistent with the above.) Eg: ~ every 10th day of month from + 2020/01, which is equivalent to ~ every 10th day of month from 2020/01/01, will be adjusted to start on 2019/12/10. Periodic transaction rules also have a second meaning: they are used to @@ -5576,17 +5576,17 @@ JOURNAL FORMAT expenses:rent $2000 assets:bank:checking - There is an additional constraint on the period expression: the start - date must fall on a natural boundary of the interval. Eg monthly from + There is an additional constraint on the period expression: the start + date must fall on a natural boundary of the interval. Eg monthly from 2018/1/1 is valid, but monthly from 2018/1/15 is not. - Partial or relative dates (M/D, D, tomorrow, last week) in the period - expression can work (useful or not). They will be relative to today's - date, unless a Y default year directive is in effect, in which case + Partial or relative dates (M/D, D, tomorrow, last week) in the period + expression can work (useful or not). They will be relative to today's + date, unless a Y default year directive is in effect, in which case they will be relative to Y/1/1. Two spaces between period expression and description! - If the period expression is followed by a transaction description, + If the period expression is followed by a transaction description, these must be separated by two or more spaces. This helps hledger know where the period expression ends, so that descriptions can not acciden- tally alter their meaning, as in this example: @@ -5600,34 +5600,34 @@ JOURNAL FORMAT So, - o Do write two spaces between your period expression and your transac- + o Do write two spaces between your period expression and your transac- tion description, if any. - o Don't accidentally write two spaces in the middle of your period + o Don't accidentally write two spaces in the middle of your period expression. Forecasting with periodic transactions - The --forecast flag activates any periodic transaction rules in the - journal. These will generate temporary additional transactions, usu- - ally recurring and in the future, which will appear in all reports. + The --forecast flag activates any periodic transaction rules in the + journal. These will generate temporary additional transactions, usu- + ally recurring and in the future, which will appear in all reports. hledger print --forecast is a good way to see them. - This can be useful for estimating balances into the future, perhaps + This can be useful for estimating balances into the future, perhaps experimenting with different scenarios. - It could also be useful for scripted data entry: you could describe - recurring transactions, and every so often copy the output of print + It could also be useful for scripted data entry: you could describe + recurring transactions, and every so often copy the output of print --forecast into the journal. - The generated transactions will have an extra tag, like generated- - transaction:~ PERIODICEXPR, indicating which periodic rule generated - them. There is also a similar, hidden tag, named _generated-transac- + The generated transactions will have an extra tag, like generated- + transaction:~ PERIODICEXPR, indicating which periodic rule generated + them. There is also a similar, hidden tag, named _generated-transac- tion:, which you can use to reliably match transactions generated "just now" (rather than printed in the past). The forecast transactions are generated within a forecast period, which - is independent of the report period. (Forecast period sets the bounds - for generated transactions, report period controls which transactions + is independent of the report period. (Forecast period sets the bounds + for generated transactions, report period controls which transactions are reported.) The forecast period begins on: o the start date provided within --forecast's argument, if any @@ -5636,7 +5636,7 @@ JOURNAL FORMAT o the report start date, if specified (with -b/-p/date:) - o the day after the latest ordinary transaction in the journal, if + o the day after the latest ordinary transaction in the journal, if any o otherwise today. @@ -5649,17 +5649,17 @@ JOURNAL FORMAT o otherwise 180 days (6 months) from today. - Note, this means that ordinary transactions will suppress periodic - transactions, by default; the periodic transactions will not start + Note, this means that ordinary transactions will suppress periodic + transactions, by default; the periodic transactions will not start until after the last ordinary transaction. This is usually convenient, but you can get around it in two ways: - o If you need to record some transactions in the future, make them - periodic transactions (with a single occurrence, eg: ~ YYYY-MM-DD) - rather than ordinary transactions. That way they won't suppress + o If you need to record some transactions in the future, make them + periodic transactions (with a single occurrence, eg: ~ YYYY-MM-DD) + rather than ordinary transactions. That way they won't suppress other periodic transactions. - o Or give --forecast a period expression argument. A forecast period + o Or give --forecast a period expression argument. A forecast period specified this way can overlap ordinary transactions, and need not be in the future. Some things to note: @@ -5668,25 +5668,25 @@ JOURNAL FORMAT o The period expression can specify the forecast period's start date, end date, or both. See also Report start & end date. - o The period expression should not specify a report interval. (Each + o The period expression should not specify a report interval. (Each periodic transaction rule specifies its own interval.) - Some examples: --forecast=202001-202004, --forecast=jan-, --fore- + Some examples: --forecast=202001-202004, --forecast=jan-, --fore- cast=2021. Budgeting with periodic transactions - With the --budget flag, currently supported by the balance command, - each periodic transaction rule declares recurring budget goals for the - specified accounts. Eg the first example above declares a goal of - spending $2000 on rent (and also, a goal of depositing $2000 into - checking) every month. Goals and actual performance can then be com- + With the --budget flag, currently supported by the balance command, + each periodic transaction rule declares recurring budget goals for the + specified accounts. Eg the first example above declares a goal of + spending $2000 on rent (and also, a goal of depositing $2000 into + checking) every month. Goals and actual performance can then be com- pared in budget reports. See also: Budgeting and Forecasting. Auto postings - "Automated postings" or "auto postings" are extra postings which get + "Automated postings" or "auto postings" are extra postings which get added automatically to transactions which match certain queries, defined by "auto posting rules", when you use the --auto flag. @@ -5697,27 +5697,27 @@ JOURNAL FORMAT ... ACCOUNT [AMOUNT] - except the first line is an equals sign (mnemonic: = suggests match- - ing), followed by a query (which matches existing postings), and each - "posting" line describes a posting to be generated, and the posting + except the first line is an equals sign (mnemonic: = suggests match- + ing), followed by a query (which matches existing postings), and each + "posting" line describes a posting to be generated, and the posting amounts can be: - o a normal amount with a commodity symbol, eg $2. This will be used + o a normal amount with a commodity symbol, eg $2. This will be used as-is. o a number, eg 2. The commodity symbol (if any) from the matched post- ing will be added to this. - o a numeric multiplier, eg *2 (a star followed by a number N). The + o a numeric multiplier, eg *2 (a star followed by a number N). The matched posting's amount (and total price, if any) will be multiplied by N. - o a multiplier with a commodity symbol, eg *$2 (a star, number N, and + o a multiplier with a commodity symbol, eg *$2 (a star, number N, and symbol S). The matched posting's amount will be multiplied by N, and its commodity symbol will be replaced with S. - Any query term containing spaces must be enclosed in single or double - quotes, as on the command line. Eg, note the quotes around the second + Any query term containing spaces must be enclosed in single or double + quotes, as on the command line. Eg, note the quotes around the second query term below: = expenses:groceries 'expenses:dining out' @@ -5756,29 +5756,29 @@ JOURNAL FORMAT Auto postings and multiple files An auto posting rule can affect any transaction in the current file, or - in any parent file or child file. Note, currently it will not affect + in any parent file or child file. Note, currently it will not affect sibling files (when multiple -f/--file are used - see #1212). Auto postings and dates - A posting date (or secondary date) in the matched posting, or (taking - precedence) a posting date in the auto posting rule itself, will also + A posting date (or secondary date) in the matched posting, or (taking + precedence) a posting date in the auto posting rule itself, will also be used in the generated posting. Auto postings and transaction balancing / inferred amounts / balance asser- tions Currently, auto postings are added: - o after missing amounts are inferred, and transactions are checked for + o after missing amounts are inferred, and transactions are checked for balancedness, o but before balance assertions are checked. - Note this means that journal entries must be balanced both before and + Note this means that journal entries must be balanced both before and after auto postings are added. This changed in hledger 1.12+; see #893 for background. - This also means that you cannot have more than one auto-posting with a - missing amount applied to a given transaction, as it will be unable to + This also means that you cannot have more than one auto-posting with a + missing amount applied to a given transaction, as it will be unable to infer amounts. Auto posting tags @@ -5787,11 +5787,11 @@ JOURNAL FORMAT o generated-posting:= QUERY - shows this was generated by an auto post- ing rule, and the query - o _generated-posting:= QUERY - a hidden tag, which does not appear in + o _generated-posting:= QUERY - a hidden tag, which does not appear in hledger's output. This can be used to match postings generated "just now", rather than generated in the past and saved to the journal. - Also, any transaction that has been changed by auto posting rules will + Also, any transaction that has been changed by auto posting rules will have these tags added: o modified: - this transaction was modified @@ -5802,65 +5802,65 @@ JOURNAL FORMAT CSV FORMAT How hledger reads CSV data, and the CSV rules file format. - hledger can read CSV files (Character Separated Value - usually comma, - semicolon, or tab) containing dated records as if they were journal + hledger can read CSV files (Character Separated Value - usually comma, + semicolon, or tab) containing dated records as if they were journal files, automatically converting each CSV record into a transaction. (To learn about writing CSV, see CSV output.) We describe each CSV file's format with a corresponding rules file. By - default this is named like the CSV file with a .rules extension added. - Eg when reading FILE.csv, hledger also looks for FILE.csv.rules in the - same directory as FILE.csv. You can specify a different rules file - with the --rules-file option. If a rules file is not found, hledger + default this is named like the CSV file with a .rules extension added. + Eg when reading FILE.csv, hledger also looks for FILE.csv.rules in the + same directory as FILE.csv. You can specify a different rules file + with the --rules-file option. If a rules file is not found, hledger will create a sample rules file, which you'll need to adjust. - This file contains rules describing the CSV data (header line, fields + This file contains rules describing the CSV data (header line, fields layout, date format etc.), and how to construct hledger journal entries (transactions) from it. Often there will also be a list of conditional rules for categorising transactions based on their descriptions. - Here's an overview of the CSV rules; these are described more fully + Here's an overview of the CSV rules; these are described more fully below, after the examples: skip skip one or more header lines or matched CSV records - fields list name CSV fields, assign them to hledger + fields list name CSV fields, assign them to hledger fields - field assignment assign a value to one hledger field, with + field assignment assign a value to one hledger field, with interpolation Field names hledger field names, used in the fields list and field assignments separator a custom field separator - if block apply some rules to CSV records matched by + if block apply some rules to CSV records matched by patterns - if table apply some rules to CSV records matched by + if table apply some rules to CSV records matched by patterns, alternate syntax end skip the remaining CSV records date-format how to parse dates in CSV records - decimal-mark the decimal mark used in CSV amounts, if + decimal-mark the decimal mark used in CSV amounts, if ambiguous - newest-first disambiguate record order when there's only + newest-first disambiguate record order when there's only one date include inline another CSV rules file - balance-type choose which type of balance assignments to + balance-type choose which type of balance assignments to use - Note, for best error messages when reading CSV files, use a .csv, .tsv + Note, for best error messages when reading CSV files, use a .csv, .tsv or .ssv file extension or file prefix - see File Extension below. There's an introductory Convert CSV files tutorial on hledger.org. Examples - Here are some sample hledger CSV rules files. See also the full col- + Here are some sample hledger CSV rules files. See also the full col- lection at: https://github.com/simonmichael/hledger/tree/master/examples/csv Basic - At minimum, the rules file must identify the date and amount fields, - and often it also specifies the date format and how many header lines + At minimum, the rules file must identify the date and amount fields, + and often it also specifies the date format and how many header lines there are. Here's a simple CSV file and a rules file for it: Date, Description, Id, Amount @@ -5879,8 +5879,8 @@ CSV FORMAT Default account names are chosen, since we didn't set them. Bank of Ireland - Here's a CSV with two amount fields (Debit and Credit), and a balance - field, which we can use to add balance assertions, which is not neces- + Here's a CSV with two amount fields (Debit and Credit), and a balance + field, which we can use to add balance assertions, which is not neces- sary but provides extra error checking: Date,Details,Debit,Credit,Balance @@ -5922,13 +5922,13 @@ CSV FORMAT assets:bank:boi:checking EUR-5.0 = EUR126.0 expenses:unknown EUR5.0 - The balance assertions don't raise an error above, because we're read- - ing directly from CSV, but they will be checked if these entries are + The balance assertions don't raise an error above, because we're read- + ing directly from CSV, but they will be checked if these entries are imported into a journal file. Amazon Here we convert amazon.com order history, and use an if block to gener- - ate a third posting if there's a fee. (In practice you'd probably get + ate a third posting if there's a fee. (In practice you'd probably get this data from your bank instead, but it's an example.) "Date","Type","To/From","Name","Status","Amount","Fees","Transaction ID" @@ -5980,7 +5980,7 @@ CSV FORMAT expenses:fees $1.00 Paypal - Here's a real-world rules file for (customised) Paypal CSV, with some + Here's a real-world rules file for (customised) Paypal CSV, with some Paypal-specific rules, and a second rules file included: "Date","Time","TimeZone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Address","Transaction ID","Item Title","Item ID","Reference Txn ID","Receipt ID","Balance","Note" @@ -6135,9 +6135,9 @@ CSV FORMAT skip skip N - The word "skip" followed by a number (or no number, meaning 1) tells - hledger to ignore this many non-empty lines preceding the CSV data. - (Empty/blank lines are skipped automatically.) You'll need this when- + The word "skip" followed by a number (or no number, meaning 1) tells + hledger to ignore this many non-empty lines preceding the CSV data. + (Empty/blank lines are skipped automatically.) You'll need this when- ever your CSV data contains header lines. It also has a second purpose: it can be used inside if blocks to ignore @@ -6146,19 +6146,19 @@ CSV FORMAT fields list fields FIELDNAME1, FIELDNAME2, ... - A fields list (the word "fields" followed by comma-separated field - names) is the quick way to assign CSV field values to hledger fields. - (The other way is field assignments, see below.) A fields list does + A fields list (the word "fields" followed by comma-separated field + names) is the quick way to assign CSV field values to hledger fields. + (The other way is field assignments, see below.) A fields list does does two things: - 1. It names the CSV fields. This is optional, but can be convenient + 1. It names the CSV fields. This is optional, but can be convenient later for interpolating them. - 2. Whenever you use a standard hledger field name (defined below), the + 2. Whenever you use a standard hledger field name (defined below), the CSV value is assigned to that part of the hledger transaction. - Here's an example that says "use the 1st, 2nd and 4th fields as the - transaction's date, description and amount; name the last two fields + Here's an example that says "use the 1st, 2nd and 4th fields as the + transaction's date, description and amount; name the last two fields for later reference; and ignore the others": fields date, description, , amount, , , somefield, anotherfield @@ -6168,18 +6168,18 @@ CSV FORMAT o The fields list always use commas, even if your CSV data uses another separator character. - o Currently there must be least two items in the list (at least one + o Currently there must be least two items in the list (at least one comma). - o Field names may not contain spaces. Spaces before/after field names + o Field names may not contain spaces. Spaces before/after field names are optional. - o If the CSV contains column headings, it's a good idea to use these, + o If the CSV contains column headings, it's a good idea to use these, suitably modified, as the basis for your field names (eg lower-cased, with underscores instead of spaces). - o If some heading names match standard hledger fields, but you don't - want to set the hledger fields directly, alter those names, eg by + o If some heading names match standard hledger fields, but you don't + want to set the hledger fields directly, alter those names, eg by appending an underscore. o Fields you don't care about can be given a dummy name (eg: _ ), or no @@ -6188,15 +6188,15 @@ CSV FORMAT field assignment HLEDGERFIELDNAME FIELDVALUE - Field assignments are the more flexible way to assign CSV values to + Field assignments are the more flexible way to assign CSV values to hledger fields. They can be used instead of or in addition to a fields list (see above). - To assign a value to a hledger field, write the field name (any of the - standard hledger field/pseudo-field names, defined below), a space, - followed by a text value on the same line. This text value may inter- - polate CSV fields, referenced by their 1-based position in the CSV - record (%N), or by the name they were given in the fields list (%CSV- + To assign a value to a hledger field, write the field name (any of the + standard hledger field/pseudo-field names, defined below), a space, + followed by a text value on the same line. This text value may inter- + polate CSV fields, referenced by their 1-based position in the CSV + record (%N), or by the name they were given in the fields list (%CSV- FIELDNAME). Some examples: @@ -6209,15 +6209,15 @@ CSV FORMAT Tips: - o Interpolation strips outer whitespace (so a CSV value like " 1 " + o Interpolation strips outer whitespace (so a CSV value like " 1 " becomes 1 when interpolated) (#1051). - o Interpolations always refer to a CSV field - you can't interpolate a + o Interpolations always refer to a CSV field - you can't interpolate a hledger field. (See Referencing other fields below). Field names Here are the standard hledger field (and pseudo-field) names, which you - can use in a fields list and in field assignments. For more about the + can use in a fields list and in field assignments. For more about the transaction parts they refer to, see Transactions. date field @@ -6248,63 +6248,63 @@ CSV FORMAT Assigning to accountN, where N is 1 to 99, sets the account name of the Nth posting, and causes that posting to be generated. - Most often there are two postings, so you'll want to set account1 and - account2. Typically account1 is associated with the CSV file, and is - set once with a top-level assignment, while account2 is set based on + Most often there are two postings, so you'll want to set account1 and + account2. Typically account1 is associated with the CSV file, and is + set once with a top-level assignment, while account2 is set based on each transaction's description, and in conditional blocks. - If a posting's account name is left unset but its amount is set (see - below), a default account name will be chosen (like "expenses:unknown" + If a posting's account name is left unset but its amount is set (see + below), a default account name will be chosen (like "expenses:unknown" or "income:unknown"). amount field - amountN sets the amount of the Nth posting, and causes that posting to - be generated. By assigning to amount1, amount2, ... etc. you can + amountN sets the amount of the Nth posting, and causes that posting to + be generated. By assigning to amount1, amount2, ... etc. you can generate up to 99 postings. - amountN-in and amountN-out can be used instead, if the CSV uses sepa- - rate fields for debits and credits (inflows and outflows). hledger - assumes both of these CSV fields are unsigned, and will automatically - negate the "-out" value. If they are signed, see "Setting amounts" + amountN-in and amountN-out can be used instead, if the CSV uses sepa- + rate fields for debits and credits (inflows and outflows). hledger + assumes both of these CSV fields are unsigned, and will automatically + negate the "-out" value. If they are signed, see "Setting amounts" below. - amount, or amount-in and amount-out are a legacy mode, to keep pre- - hledger-1.17 CSV rules files working (and for occasional convenience). - They are suitable only for two-posting transactions; they set both - posting 1's and posting 2's amount. Posting 2's amount will be + amount, or amount-in and amount-out are a legacy mode, to keep pre- + hledger-1.17 CSV rules files working (and for occasional convenience). + They are suitable only for two-posting transactions; they set both + posting 1's and posting 2's amount. Posting 2's amount will be negated, and also converted to cost if there's a transaction price. If you have an existing rules file using the unnumbered form, you might - want to use the numbered form in certain conditional blocks, without - having to update and retest all the old rules. To facilitate this, - posting 1 ignores amount/amount-in/amount-out if any of + want to use the numbered form in certain conditional blocks, without + having to update and retest all the old rules. To facilitate this, + posting 1 ignores amount/amount-in/amount-out if any of amount1/amount1-in/amount1-out are assigned, and posting 2 ignores them - if any of amount2/amount2-in/amount2-out are assigned, avoiding con- + if any of amount2/amount2-in/amount2-out are assigned, avoiding con- flicts. currency field - currency sets a currency symbol, to be prepended to all postings' - amounts. You can use this if the CSV amounts do not have a currency + currency sets a currency symbol, to be prepended to all postings' + amounts. You can use this if the CSV amounts do not have a currency symbol, eg if it is in a separate column. - currencyN prepends a currency symbol to just the Nth posting's amount. + currencyN prepends a currency symbol to just the Nth posting's amount. balance field - balanceN sets a balance assertion amount (or if the posting amount is + balanceN sets a balance assertion amount (or if the posting amount is left empty, a balance assignment) on posting N. balance is a compatibility spelling for hledger <1.17; it is equivalent to balance1. - You can adjust the type of assertion/assignment with the balance-type + You can adjust the type of assertion/assignment with the balance-type rule (see below). See Tips below for more about setting amounts and currency. separator - You can use the separator rule to read other kinds of character-sepa- - rated data. The argument is any single separator character, or the - words tab or space (case insensitive). Eg, for comma-separated values + You can use the separator rule to read other kinds of character-sepa- + rated data. The argument is any single separator character, or the + words tab or space (case insensitive). Eg, for comma-separated values (CSV): separator , @@ -6317,7 +6317,7 @@ CSV FORMAT separator TAB - If the input file has a .csv, .ssv or .tsv file extension (or a csv:, + If the input file has a .csv, .ssv or .tsv file extension (or a csv:, ssv:, tsv: prefix), the appropriate separator will be inferred automat- ically, and you won't need this rule. @@ -6332,8 +6332,8 @@ CSV FORMAT RULE RULE - Conditional blocks ("if blocks") are a block of rules that are applied - only to CSV records which match certain patterns. They are often used + Conditional blocks ("if blocks") are a block of rules that are applied + only to CSV records which match certain patterns. They are often used for customising account names based on transaction descriptions. Matching the whole record @@ -6342,16 +6342,16 @@ CSV FORMAT REGEX REGEX is a case-insensitive regular expression that tries to match any- - where within the CSV record. It is a POSIX ERE (extended regular - expression) that also supports GNU word boundaries (\b, \B, \<, \>), - and nothing else. If you have trouble, be sure to check our doc: + where within the CSV record. It is a POSIX ERE (extended regular + expression) that also supports GNU word boundaries (\b, \B, \<, \>), + and nothing else. If you have trouble, be sure to check our doc: https://hledger.org/hledger.html#regular-expressions - Important note: the record that is matched is not the original record, - but a synthetic one, with any enclosing double quotes (but not enclos- + Important note: the record that is matched is not the original record, + but a synthetic one, with any enclosing double quotes (but not enclos- ing whitespace) removed, and always comma-separated (which means that a - field containing a comma will appear like two fields). Eg, if the - original record is 2020-01-01; "Acme, Inc."; 1,000, the REGEX will + field containing a comma will appear like two fields). Eg, if the + original record is 2020-01-01; "Acme, Inc."; 1,000, the REGEX will actually see 2020-01-01,Acme, Inc., 1,000). Matching individual fields @@ -6359,14 +6359,14 @@ CSV FORMAT %CSVFIELD REGEX - which matches just the content of a particular CSV field. CSVFIELD is - a percent sign followed by the field's name or column number, like + which matches just the content of a particular CSV field. CSVFIELD is + a percent sign followed by the field's name or column number, like %date or %1. Combining matchers A single matcher can be written on the same line as the "if"; or multi- ple matchers can be written on the following lines, non-indented. Mul- - tiple matchers are OR'd (any one of them can match), unless one begins + tiple matchers are OR'd (any one of them can match), unless one begins with an & symbol, in which case it is AND'ed with the previous matcher. if @@ -6375,8 +6375,8 @@ CSV FORMAT RULE Rules applied on successful match - After the patterns there should be one or more rules to apply, all - indented by at least one space. Three kinds of rule are allowed in + After the patterns there should be one or more rules to apply, all + indented by at least one space. Three kinds of rule are allowed in conditional blocks: o field assignments (to set a hledger field) @@ -6406,11 +6406,11 @@ CSV FORMAT MATCHER3,VALUE31,VALUE32,...,VALUE3n - Conditional tables ("if tables") are a different syntax to specify - field assignments that will be applied only to CSV records which match + Conditional tables ("if tables") are a different syntax to specify + field assignments that will be applied only to CSV records which match certain patterns. - MATCHER could be either field or record matcher, as described above. + MATCHER could be either field or record matcher, as described above. When MATCHER matches, values from that row would be assigned to the CSV fields named on the if line, in the same order. @@ -6434,17 +6434,17 @@ CSV FORMAT ... CSVFIELDNAMEn VALUE3n - Each line starting with MATCHER should contain enough (possibly empty) + Each line starting with MATCHER should contain enough (possibly empty) values for all the listed fields. - Rules would be checked and applied in the order they are listed in the + Rules would be checked and applied in the order they are listed in the table and, like with if blocks, later rules (in the same or another ta- ble) or if blocks could override the effect of any rule. - Instead of ',' you can use a variety of other non-alphanumeric charac- + Instead of ',' you can use a variety of other non-alphanumeric charac- ters as a separator. First character after if is taken to be the sepa- - rator for the rest of the table. It is the responsibility of the user - to ensure that separator does not occur inside MATCHERs and values - + rator for the rest of the table. It is the responsibility of the user + to ensure that separator does not occur inside MATCHERs and values - there is no way to escape separator. Example: @@ -6455,7 +6455,7 @@ CSV FORMAT 2020/01/12.*Plumbing LLC,expenses:house:upkeep,emergency plumbing call-out end - This rule can be used inside if blocks (only), to make hledger stop + This rule can be used inside if blocks (only), to make hledger stop reading this CSV file and move on to the next input file, or to command execution. Eg: @@ -6466,10 +6466,10 @@ CSV FORMAT date-format date-format DATEFMT - This is a helper for the date (and date2) fields. If your CSV dates - are not formatted like YYYY-MM-DD, YYYY/MM/DD or YYYY.MM.DD, you'll - need to add a date-format rule describing them with a strptime date - parsing pattern, which must parse the CSV date value completely. Some + This is a helper for the date (and date2) fields. If your CSV dates + are not formatted like YYYY-MM-DD, YYYY/MM/DD or YYYY.MM.DD, you'll + need to add a date-format rule describing them with a strptime date + parsing pattern, which must parse the CSV date value completely. Some examples: # MM/DD/YY @@ -6490,9 +6490,9 @@ CSV FORMAT https://hackage.haskell.org/package/time/docs/Data-Time-For- mat.html#v:formatTime - Note that although you can parse date-times which include a time zone, - that time zone is ignored; it will not change the date that is parsed. - This means when reading CSV data with times not in your local time + Note that although you can parse date-times which include a time zone, + that time zone is ignored; it will not change the date that is parsed. + This means when reading CSV data with times not in your local time zone, dates can be "off by one". decimal-mark @@ -6502,22 +6502,22 @@ CSV FORMAT decimal-mark , - hledger automatically accepts either period or comma as a decimal mark - when parsing numbers (cf Amounts). However if any numbers in the CSV - contain digit group marks, such as thousand-separating commas, you - should declare the decimal mark explicitly with this rule, to avoid + hledger automatically accepts either period or comma as a decimal mark + when parsing numbers (cf Amounts). However if any numbers in the CSV + contain digit group marks, such as thousand-separating commas, you + should declare the decimal mark explicitly with this rule, to avoid misparsed numbers. newest-first - hledger always sorts the generated transactions by date. Transactions - on the same date should appear in the same order as their CSV records, - as hledger can usually auto-detect whether the CSV's normal order is + hledger always sorts the generated transactions by date. Transactions + on the same date should appear in the same order as their CSV records, + as hledger can usually auto-detect whether the CSV's normal order is oldest first or newest first. But if all of the following are true: - o the CSV might sometimes contain just one day of data (all records + o the CSV might sometimes contain just one day of data (all records having the same date) - o the CSV records are normally in reverse chronological order (newest + o the CSV records are normally in reverse chronological order (newest at the top) o and you care about preserving the order of same-day transactions @@ -6530,9 +6530,9 @@ CSV FORMAT include include RULESFILE - This includes the contents of another CSV rules file at this point. - RULESFILE is an absolute file path or a path relative to the current - file's directory. This can be useful for sharing common rules between + This includes the contents of another CSV rules file at this point. + RULESFILE is an absolute file path or a path relative to the current + file's directory. This can be useful for sharing common rules between several rules files, eg: # someaccount.csv.rules @@ -6547,10 +6547,10 @@ CSV FORMAT balance-type Balance assertions generated by assigning to balanceN are of the simple - = type by default, which is a single-commodity, subaccount-excluding + = type by default, which is a single-commodity, subaccount-excluding assertion. You may find the subaccount-including variants more useful, - eg if you have created some virtual subaccounts of checking to help - with budgeting. You can select a different type of assertion with the + eg if you have created some virtual subaccounts of checking to help + with budgeting. You can select a different type of assertion with the balance-type rule: # balance assertions will consider all commodities and all subaccounts @@ -6565,18 +6565,18 @@ CSV FORMAT Tips Rapid feedback - It's a good idea to get rapid feedback while creating/troubleshooting + It's a good idea to get rapid feedback while creating/troubleshooting CSV rules. Here's a good way, using entr from eradman.com/entrproject: $ ls foo.csv* | entr bash -c 'echo ----; hledger -f foo.csv print desc:SOMEDESC' - A desc: query (eg) is used to select just one, or a few, transactions - of interest. "bash -c" is used to run multiple commands, so we can - echo a separator each time the command re-runs, making it easier to + A desc: query (eg) is used to select just one, or a few, transactions + of interest. "bash -c" is used to run multiple commands, so we can + echo a separator each time the command re-runs, making it easier to read the output. Valid CSV - hledger accepts CSV conforming to RFC 4180. When CSV values are + hledger accepts CSV conforming to RFC 4180. When CSV values are enclosed in quotes, note: o they must be double quotes (not single quotes) @@ -6584,9 +6584,9 @@ CSV FORMAT o spaces outside the quotes are not allowed File Extension - To help hledger identify the format and show the right error messages, - CSV/SSV/TSV files should normally be named with a .csv, .ssv or .tsv - filename extension. Or, the file path should be prefixed with csv:, + To help hledger identify the format and show the right error messages, + CSV/SSV/TSV files should normally be named with a .csv, .ssv or .tsv + filename extension. Or, the file path should be prefixed with csv:, ssv: or tsv:. Eg: $ hledger -f foo.ssv print @@ -6595,48 +6595,48 @@ CSV FORMAT $ cat foo | hledger -f ssv:- foo - You can override the file extension with a separator rule if needed. + You can override the file extension with a separator rule if needed. See also: Input files in the hledger manual. Reading multiple CSV files - If you use multiple -f options to read multiple CSV files at once, - hledger will look for a correspondingly-named rules file for each CSV - file. But if you use the --rules-file option, that rules file will be + If you use multiple -f options to read multiple CSV files at once, + hledger will look for a correspondingly-named rules file for each CSV + file. But if you use the --rules-file option, that rules file will be used for all the CSV files. Valid transactions After reading a CSV file, hledger post-processes and validates the gen- erated journal entries as it would for a journal file - balancing them, - applying balance assignments, and canonicalising amount styles. Any - errors at this stage will be reported in the usual way, displaying the + applying balance assignments, and canonicalising amount styles. Any + errors at this stage will be reported in the usual way, displaying the problem entry. There is one exception: balance assertions, if you have generated them, - will not be checked, since normally these will work only when the CSV - data is part of the main journal. If you do need to check balance + will not be checked, since normally these will work only when the CSV + data is part of the main journal. If you do need to check balance assertions generated from CSV right away, pipe into another hledger: $ hledger -f file.csv print | hledger -f- print Deduplicating, importing - When you download a CSV file periodically, eg to get your latest bank - transactions, the new file may overlap with the old one, containing + When you download a CSV file periodically, eg to get your latest bank + transactions, the new file may overlap with the old one, containing some of the same records. The import command will (a) detect the new transactions, and (b) append just those transactions to your main journal. It is idempotent, so you - don't have to remember how many times you ran it or with which version - of the CSV. (It keeps state in a hidden .latest.FILE.csv file.) This + don't have to remember how many times you ran it or with which version + of the CSV. (It keeps state in a hidden .latest.FILE.csv file.) This is the easiest way to import CSV data. Eg: # download the latest CSV files, then run this command. # Note, no -f flags needed here. $ hledger import *.csv [--dry] - This method works for most CSV files. (Where records have a stable + This method works for most CSV files. (Where records have a stable chronological order, and new records appear only at the new end.) - A number of other tools and workflows, hledger-specific and otherwise, + A number of other tools and workflows, hledger-specific and otherwise, exist for converting, deduplicating, classifying and managing CSV data. See: @@ -6657,13 +6657,13 @@ CSV FORMAT a. If both fields are unsigned: Assign to amountN-in and amountN-out. This sets posting N's amount - to whichever of these has a non-zero value, and negates the "-out" + to whichever of these has a non-zero value, and negates the "-out" value. b. If either field is signed (can contain a minus sign): - Use a conditional rule to flip the sign (of non-empty values). - Since hledger always negates amountN-out, if it was already nega- - tive, we must undo that by negating once more (but only if the + Use a conditional rule to flip the sign (of non-empty values). + Since hledger always negates amountN-out, if it was already nega- + tive, we must undo that by negating once more (but only if the field is non-empty): fields date, description, amount1-in, amount1-out @@ -6671,8 +6671,8 @@ CSV FORMAT amount1-out -%amount1-out c. If both fields, or neither field, can contain a non-zero value: - hledger normally expects exactly one of the fields to have a non- - zero value. Eg, the amountN-in/amountN-out rules would reject + hledger normally expects exactly one of the fields to have a non- + zero value. Eg, the amountN-in/amountN-out rules would reject value pairs like these: "", "" @@ -6680,7 +6680,7 @@ CSV FORMAT "1", "none" So, use smarter conditional rules to set the amount from the appro- - priate field. Eg, these rules would make it use only the value + priate field. Eg, these rules would make it use only the value containing non-zero digits, handling the above: fields date, description, in, out @@ -6689,7 +6689,7 @@ CSV FORMAT if %out [1-9] amount1 %out - 3. If you are stuck with hledger <1.17, or you want posting 2's amount + 3. If you are stuck with hledger <1.17, or you want posting 2's amount converted to cost: Assign to amount (or to amount-in and amount-out). (The old numberless syntax, which sets amount1 and amount2.) @@ -6699,15 +6699,15 @@ CSV FORMAT ance assignment. (Old syntax: balance, equivalent to balance1.) o If hledger guesses the wrong default account name: - When setting the amount via balance assertion, hledger may guess - the wrong default account name. So, set the account name explic- + When setting the amount via balance assertion, hledger may guess + the wrong default account name. So, set the account name explic- itly, eg: fields date, description, balance1 account1 assets:checking Amount signs - There is some special handling for amount signs, to simplify parsing + There is some special handling for amount signs, to simplify parsing and sign-flipping: o If an amount value begins with a plus sign: @@ -6716,17 +6716,17 @@ CSV FORMAT o If an amount value is parenthesised: it will be de-parenthesised and sign-flipped: (AMT) becomes -AMT - o If an amount value has two minus signs (or two sets of parentheses, + o If an amount value has two minus signs (or two sets of parentheses, or a minus sign and parentheses): they cancel out and will be removed: --AMT or -(AMT) becomes AMT - o If an amount value contains just a sign (or just a set of parenthe- + o If an amount value contains just a sign (or just a set of parenthe- ses): - that is removed, making it an empty value. "+" or "-" or "()" becomes + that is removed, making it an empty value. "+" or "-" or "()" becomes "". Setting currency/commodity - If the currency/commodity symbol is included in the CSV's amount + If the currency/commodity symbol is included in the CSV's amount field(s): 2020-01-01,foo,$123.00 @@ -6745,7 +6745,7 @@ CSV FORMAT 2020-01-01,foo,USD,123.00 You can assign that to the currency pseudo-field, which has the special - effect of prepending itself to every amount in the transaction (on the + effect of prepending itself to every amount in the transaction (on the left, with no separating space): fields date,description,currency,amount @@ -6754,7 +6754,7 @@ CSV FORMAT expenses:unknown USD123.00 income:unknown USD-123.00 - Or, you can use a field assignment to construct the amount yourself, + Or, you can use a field assignment to construct the amount yourself, with more control. Eg to put the symbol on the right, and separated by a space: @@ -6765,7 +6765,7 @@ CSV FORMAT expenses:unknown 123.00 USD income:unknown -123.00 USD - Note we used a temporary field name (cur) that is not currency - that + Note we used a temporary field name (cur) that is not currency - that would trigger the prepending effect, which we don't want here. Amount decimal places @@ -6773,13 +6773,13 @@ CSV FORMAT amount1 influence commodity display styles, such as the number of deci- mal places displayed in reports. - The original amounts as written in the CSV file do not affect display + The original amounts as written in the CSV file do not affect display style (because we don't yet reliably know their commodity). Referencing other fields - In field assignments, you can interpolate only CSV fields, not hledger - fields. In the example below, there's both a CSV field and a hledger - field named amount1, but %amount1 always means the CSV field, not the + In field assignments, you can interpolate only CSV fields, not hledger + fields. In the example below, there's both a CSV field and a hledger + field named amount1, but %amount1 always means the CSV field, not the hledger field: # Name the third CSV field "amount1" @@ -6791,7 +6791,7 @@ CSV FORMAT # Set comment to the CSV amount1 (not the amount1 assigned above) comment %amount1 - Here, since there's no CSV amount1 field, %amount1 will produce a lit- + Here, since there's no CSV amount1 field, %amount1 will produce a lit- eral "amount1": fields date,description,csvamount @@ -6799,7 +6799,7 @@ CSV FORMAT # Can't interpolate amount1 here comment %amount1 - When there are multiple field assignments to the same hledger field, + When there are multiple field assignments to the same hledger field, only the last one takes effect. Here, comment's value will be be B, or C if "something" is matched, but never A: @@ -6809,14 +6809,14 @@ CSV FORMAT comment C How CSV rules are evaluated - Here's how to think of CSV rules being evaluated (if you really need + Here's how to think of CSV rules being evaluated (if you really need to). First, - o include - all includes are inlined, from top to bottom, depth first. - (At each include point the file is inlined and scanned for further + o include - all includes are inlined, from top to bottom, depth first. + (At each include point the file is inlined and scanned for further includes, recursively, before proceeding.) - Then "global" rules are evaluated, top to bottom. If a rule is + Then "global" rules are evaluated, top to bottom. If a rule is repeated, the last one wins: o skip (at top level) @@ -6830,33 +6830,33 @@ CSV FORMAT Then for each CSV record in turn: - o test all if blocks. If any of them contain a end rule, skip all + o test all if blocks. If any of them contain a end rule, skip all remaining CSV records. Otherwise if any of them contain a skip rule, - skip that many CSV records. If there are multiple matched skip + skip that many CSV records. If there are multiple matched skip rules, the first one wins. - o collect all field assignments at top level and in matched if blocks. - When there are multiple assignments for a field, keep only the last + o collect all field assignments at top level and in matched if blocks. + When there are multiple assignments for a field, keep only the last one. - o compute a value for each hledger field - either the one that was - assigned to it (and interpolate the %CSVFIELDNAME references), or a + o compute a value for each hledger field - either the one that was + assigned to it (and interpolate the %CSVFIELDNAME references), or a default o generate a synthetic hledger transaction from these values. - This is all part of the CSV reader, one of several readers hledger can - use to parse input files. When all files have been read successfully, - the transactions are passed as input to whichever hledger command the + This is all part of the CSV reader, one of several readers hledger can + use to parse input files. When all files have been read successfully, + the transactions are passed as input to whichever hledger command the user specified. TIMECLOCK FORMAT The time logging format of timeclock.el, as read by hledger. - hledger can read time logs in timeclock format. As with Ledger, these + hledger can read time logs in timeclock format. As with Ledger, these are (a subset of) timeclock.el's format, containing clock-in and clock- - out entries as in the example below. The date is a simple date. The - time format is HH:MM[:SS][+-ZZZZ]. Seconds and timezone are optional. + out entries as in the example below. The date is a simple date. The + time format is HH:MM[:SS][+-ZZZZ]. Seconds and timezone are optional. The timezone, if present, must be four digits and is ignored (currently the time is always interpreted as a local time). @@ -6865,9 +6865,9 @@ TIMECLOCK FORMAT i 2015/03/31 22:21:45 another account o 2015/04/01 02:00:34 - hledger treats each clock-in/clock-out pair as a transaction posting - some number of hours to an account. Or if the session spans more than - one day, it is split into several transactions, one for each day. For + hledger treats each clock-in/clock-out pair as a transaction posting + some number of hours to an account. Or if the session spans more than + one day, it is split into several transactions, one for each day. For the above time log, hledger print generates these journal entries: $ hledger -f t.timeclock print @@ -6888,26 +6888,26 @@ TIMECLOCK FORMAT To generate time logs, ie to clock in and clock out, you could: - o use emacs and the built-in timeclock.el, or the extended timeclock- + o use emacs and the built-in timeclock.el, or the extended timeclock- x.el and perhaps the extras in ledgerutils.el o at the command line, use these bash aliases: shell alias ti="echo - i `date '+%Y-%m-%d %H:%M:%S'` \$* >>$TIMELOG" alias to="echo o + i `date '+%Y-%m-%d %H:%M:%S'` \$* >>$TIMELOG" alias to="echo o `date '+%Y-%m-%d %H:%M:%S'` >>$TIMELOG" o or use the old ti and to scripts in the ledger 2.x repository. These - rely on a "timeclock" executable which I think is just the ledger 2 + rely on a "timeclock" executable which I think is just the ledger 2 executable renamed. TIMEDOT FORMAT - timedot format is hledger's human-friendly time logging format. Com- + timedot format is hledger's human-friendly time logging format. Com- pared to timeclock format, it is o convenient for quick, approximate, and retroactive time logging o readable: you can see at a glance where time was spent. - A timedot file contains a series of day entries, which might look like + A timedot file contains a series of day entries, which might look like this: 2021-08-04 @@ -6915,7 +6915,7 @@ TIMEDOT FORMAT fos:hledger:timedot .. ; docs per:admin:finance - hledger reads this as three time transactions on this day, with each + hledger reads this as three time transactions on this day, with each dot representing a quarter-hour spent: $ hledger -f a.timedot print # .timedot file extension activates the timedot reader @@ -6938,45 +6938,45 @@ TIMEDOT FORMAT o a common transaction comment for this day, after a semicolon (;). - After the date line are zero or more optionally-indented time transac- + After the date line are zero or more optionally-indented time transac- tion lines, consisting of: o an account name - any word or phrase, usually a hledger-style account name. - o two or more spaces - a field separator, required if there is an + o two or more spaces - a field separator, required if there is an amount (as in journal format). - o a timedot amount - dots representing quarter hours, or a number rep- + o a timedot amount - dots representing quarter hours, or a number rep- resenting hours. o an optional comment beginning with semicolon. This is ignored. In more detail, timedot amounts can be: - o dots: zero or more period characters, each representing one quarter- - hour. Spaces are ignored and can be used for grouping. Eg: .... .. + o dots: zero or more period characters, each representing one quarter- + hour. Spaces are ignored and can be used for grouping. Eg: .... .. o a number, representing hours. Eg: 1.5 - o a number immediately followed by a unit symbol s, m, h, d, w, mo, or + o a number immediately followed by a unit symbol s, m, h, d, w, mo, or y, representing seconds, minutes, hours, days weeks, months or years. Eg 1.5h or 90m. The following equivalencies are assumed: - 60s = 1m, 60m = 1h, 24h = 1d, 7d = 1w, 30d = 1mo, 365d = 1y. (This - unit will not be visible in the generated transaction amount, which is + 60s = 1m, 60m = 1h, 24h = 1d, 7d = 1w, 30d = 1mo, 365d = 1y. (This + unit will not be visible in the generated transaction amount, which is always in hours.) - There is some added flexibility to help with keeping time log data in + There is some added flexibility to help with keeping time log data in the same file as your notes, todo lists, etc.: o Lines beginning with # or ;, and blank lines, are ignored. - o Lines not ending with a double-space and amount are parsed as trans- - actions with zero amount. (Most hledger reports hide these by + o Lines not ending with a double-space and amount are parsed as trans- + actions with zero amount. (Most hledger reports hide these by default; add -E to see them.) o One or more stars (*) followed by a space, at the start of a line, is - ignored. So date lines or time transaction lines can also be Org- + ignored. So date lines or time transaction lines can also be Org- mode headlines. o All Org-mode headlines before the first date line are ignored. @@ -7059,9 +7059,9 @@ TIMEDOT FORMAT A sample.timedot file. COMMON TASKS - Here are some quick examples of how to do some basic tasks with - hledger. For more details, see the reference section below, the - hledger_journal(5) manual, or the more extensive docs at + Here are some quick examples of how to do some basic tasks with + hledger. For more details, see the reference section below, the + hledger_journal(5) manual, or the more extensive docs at https://hledger.org. Getting help @@ -7077,26 +7077,26 @@ COMMON TASKS https://hledger.org#help-feedback Constructing command lines - hledger has an extensive and powerful command line interface. We + hledger has an extensive and powerful command line interface. We strive to keep it simple and ergonomic, but you may run into one of the confusing real world details described in OPTIONS, below. If that hap- pens, here are some tips that may help: - o command-specific options must go after the command (it's fine to put + o command-specific options must go after the command (it's fine to put all options there) (hledger CMD OPTS ARGS) - o running add-on executables directly simplifies command line parsing + o running add-on executables directly simplifies command line parsing (hledger-ui OPTS ARGS) o enclose "problematic" args in single quotes - o if needed, also add a backslash to hide regular expression metachar- + o if needed, also add a backslash to hide regular expression metachar- acters from the shell o to see how a misbehaving command is being parsed, add --debug=2. Starting a journal file - hledger looks for your accounting data in a journal file, + hledger looks for your accounting data in a journal file, $HOME/.hledger.journal by default: $ hledger stats @@ -7104,9 +7104,9 @@ COMMON TASKS Please create it first, eg with "hledger add" or a text editor. Or, specify an existing journal file with -f or LEDGER_FILE. - You can override this by setting the LEDGER_FILE environment variable. + You can override this by setting the LEDGER_FILE environment variable. It's a good practice to keep this important file under version control, - and to start a new file each year. So you could do something like + and to start a new file each year. So you could do something like this: $ mkdir ~/finance @@ -7130,20 +7130,20 @@ COMMON TASKS Market prices : 0 () Setting opening balances - Pick a starting date for which you can look up the balances of some - real-world assets (bank accounts, wallet..) and liabilities (credit + Pick a starting date for which you can look up the balances of some + real-world assets (bank accounts, wallet..) and liabilities (credit cards..). - To avoid a lot of data entry, you may want to start with just one or - two accounts, like your checking account or cash wallet; and pick a - recent starting date, like today or the start of the week. You can + To avoid a lot of data entry, you may want to start with just one or + two accounts, like your checking account or cash wallet; and pick a + recent starting date, like today or the start of the week. You can always come back later and add more accounts and older transactions, eg going back to january 1st. - Add an opening balances transaction to the journal, declaring the bal- + Add an opening balances transaction to the journal, declaring the bal- ances on this date. Here are two ways to do it: - o The first way: open the journal in any text editor and save an entry + o The first way: open the journal in any text editor and save an entry like this: 2020-01-01 * opening balances @@ -7153,19 +7153,19 @@ COMMON TASKS liabilities:creditcard $-50 = $-50 equity:opening/closing balances - These are start-of-day balances, ie whatever was in the account at + These are start-of-day balances, ie whatever was in the account at the end of the previous day. - The * after the date is an optional status flag. Here it means + The * after the date is an optional status flag. Here it means "cleared & confirmed". - The currency symbols are optional, but usually a good idea as you'll + The currency symbols are optional, but usually a good idea as you'll be dealing with multiple currencies sooner or later. - The = amounts are optional balance assertions, providing extra error + The = amounts are optional balance assertions, providing extra error checking. - o The second way: run hledger add and follow the prompts to record a + o The second way: run hledger add and follow the prompts to record a similar transaction: $ hledger add @@ -7202,18 +7202,18 @@ COMMON TASKS Starting the next transaction (. or ctrl-D/ctrl-C to quit) Date [2020-01-01]: . - If you're using version control, this could be a good time to commit + If you're using version control, this could be a good time to commit the journal. Eg: $ git commit -m 'initial balances' 2020.journal Recording transactions - As you spend or receive money, you can record these transactions using - one of the methods above (text editor, hledger add) or by using the - hledger-iadd or hledger-web add-ons, or by using the import command to + As you spend or receive money, you can record these transactions using + one of the methods above (text editor, hledger add) or by using the + hledger-iadd or hledger-web add-ons, or by using the import command to convert CSV data downloaded from your bank. - Here are some simple transactions, see the hledger_journal(5) manual + Here are some simple transactions, see the hledger_journal(5) manual and hledger.org for more ideas: 2020/1/10 * gift received @@ -7229,22 +7229,22 @@ COMMON TASKS assets:bank:checking $1000 Reconciling - Periodically you should reconcile - compare your hledger-reported bal- - ances against external sources of truth, like bank statements or your - bank's website - to be sure that your ledger accurately represents the - real-world balances (and, that the real-world institutions have not - made a mistake!). This gets easy and fast with (1) practice and (2) - frequency. If you do it daily, it can take 2-10 minutes. If you let - it pile up, expect it to take longer as you hunt down errors and dis- + Periodically you should reconcile - compare your hledger-reported bal- + ances against external sources of truth, like bank statements or your + bank's website - to be sure that your ledger accurately represents the + real-world balances (and, that the real-world institutions have not + made a mistake!). This gets easy and fast with (1) practice and (2) + frequency. If you do it daily, it can take 2-10 minutes. If you let + it pile up, expect it to take longer as you hunt down errors and dis- crepancies. A typical workflow: - 1. Reconcile cash. Count what's in your wallet. Compare with what - hledger reports (hledger bal cash). If they are different, try to - remember the missing transaction, or look for the error in the - already-recorded transactions. A register report can be helpful - (hledger reg cash). If you can't find the error, add an adjustment + 1. Reconcile cash. Count what's in your wallet. Compare with what + hledger reports (hledger bal cash). If they are different, try to + remember the missing transaction, or look for the error in the + already-recorded transactions. A register report can be helpful + (hledger reg cash). If you can't find the error, add an adjustment transaction. Eg if you have $105 after the above, and can't explain the missing $2, it could be: @@ -7254,26 +7254,26 @@ COMMON TASKS 2. Reconcile checking. Log in to your bank's website. Compare today's (cleared) balance with hledger's cleared balance (hledger bal check- - ing -C). If they are different, track down the error or record the - missing transaction(s) or add an adjustment transaction, similar to + ing -C). If they are different, track down the error or record the + missing transaction(s) or add an adjustment transaction, similar to the above. Unlike the cash case, you can usually compare the trans- - action history and running balance from your bank with the one - reported by hledger reg checking -C. This will be easier if you - generally record transaction dates quite similar to your bank's + action history and running balance from your bank with the one + reported by hledger reg checking -C. This will be easier if you + generally record transaction dates quite similar to your bank's clearing dates. 3. Repeat for other asset/liability accounts. - Tip: instead of the register command, use hledger-ui to see a live- + Tip: instead of the register command, use hledger-ui to see a live- updating register while you edit the journal: hledger-ui --watch --reg- ister checking -C - After reconciling, it could be a good time to mark the reconciled - transactions' status as "cleared and confirmed", if you want to track - that, by adding the * marker. Eg in the paycheck transaction above, + After reconciling, it could be a good time to mark the reconciled + transactions' status as "cleared and confirmed", if you want to track + that, by adding the * marker. Eg in the paycheck transaction above, insert * between 2020-01-15 and paycheck - If you're using version control, this can be another good time to com- + If you're using version control, this can be another good time to com- mit: $ git commit -m 'txns' 2020.journal @@ -7345,7 +7345,7 @@ COMMON TASKS -------------------- 0 - Show only asset and liability balances, as a flat list, limited to + Show only asset and liability balances, as a flat list, limited to depth 2: $ hledger bal assets liabilities --flat -2 @@ -7355,7 +7355,7 @@ COMMON TASKS -------------------- $4055 - Show the same thing without negative numbers, formatted as a simple + Show the same thing without negative numbers, formatted as a simple balance sheet: $ hledger bs --flat -2 @@ -7422,15 +7422,15 @@ COMMON TASKS 2020-01-13 **** Migrating to a new file - At the end of the year, you may want to continue your journal in a new + At the end of the year, you may want to continue your journal in a new file, so that old transactions don't slow down or clutter your reports, - and to help ensure the integrity of your accounting history. See the + and to help ensure the integrity of your accounting history. See the close command. If using version control, don't forget to git add the new file. LIMITATIONS - The need to precede add-on command options with -- when invoked from + The need to precede add-on command options with -- when invoked from hledger is awkward. When input data contains non-ascii characters, a suitable system locale @@ -7446,36 +7446,36 @@ LIMITATIONS In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger add. - Not all of Ledger's journal file syntax is supported. See file format + Not all of Ledger's journal file syntax is supported. See file format differences. - On large data files, hledger is slower and uses more memory than + On large data files, hledger is slower and uses more memory than Ledger. TROUBLESHOOTING - Here are some issues you might encounter when you run hledger (and - remember you can also seek help from the IRC channel, mail list or bug + Here are some issues you might encounter when you run hledger (and + remember you can also seek help from the IRC channel, mail list or bug tracker): Successfully installed, but "No command 'hledger' found" stack and cabal install binaries into a special directory, which should - be added to your PATH environment variable. Eg on unix-like systems, + be added to your PATH environment variable. Eg on unix-like systems, that is ~/.local/bin and ~/.cabal/bin respectively. I set a custom LEDGER_FILE, but hledger is still using the default file - LEDGER_FILE should be a real environment variable, not just a shell - variable. The command env | grep LEDGER_FILE should show it. You may + LEDGER_FILE should be a real environment variable, not just a shell + variable. The command env | grep LEDGER_FILE should show it. You may need to use export. Here's an explanation. - Getting errors like "Illegal byte sequence" or "Invalid or incomplete - multibyte or wide character" or "commitAndReleaseBuffer: invalid argu- + Getting errors like "Illegal byte sequence" or "Invalid or incomplete + multibyte or wide character" or "commitAndReleaseBuffer: invalid argu- ment (invalid character)" Programs compiled with GHC (hledger, haskell build tools, etc.) need to have a UTF-8-aware locale configured in the environment, otherwise they - will fail with these kinds of errors when they encounter non-ascii + will fail with these kinds of errors when they encounter non-ascii characters. - To fix it, set the LANG environment variable to some locale which sup- + To fix it, set the LANG environment variable to some locale which sup- ports UTF-8. The locale you choose must be installed on your system. Here's an example of setting LANG temporarily, on Ubuntu GNU/Linux: @@ -7490,8 +7490,8 @@ TROUBLESHOOTING POSIX $ LANG=en_US.utf8 hledger -f my.journal print # ensure it is used for this command - If available, C.UTF-8 will also work. If your preferred locale isn't - listed by locale -a, you might need to install it. Eg on + If available, C.UTF-8 will also work. If your preferred locale isn't + listed by locale -a, you might need to install it. Eg on Ubuntu/Debian: $ apt-get install language-pack-fr @@ -7511,8 +7511,8 @@ TROUBLESHOOTING $ echo "export LANG=en_US.utf8" >>~/.bash_profile $ bash --login - Exact spelling and capitalisation may be important. Note the differ- - ence on MacOS (UTF-8, not utf8). Some platforms (eg ubuntu) allow + Exact spelling and capitalisation may be important. Note the differ- + ence on MacOS (UTF-8, not utf8). Some platforms (eg ubuntu) allow variant spellings, but others (eg macos) require it to be exact: $ locale -a | grep -iE en_us.*utf @@ -7522,7 +7522,7 @@ TROUBLESHOOTING 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)