2019-02-05 02:04:57 +03:00
|
|
|
m4_dnl m4 macro definitions used in all hledger package docs.
|
2020-12-15 20:24:02 +03:00
|
|
|
m4_dnl m4 commands in Shake.hs always load this file first;
|
|
|
|
m4_dnl m4 macros in package directories could override these.
|
2019-02-05 01:44:35 +03:00
|
|
|
m4_dnl
|
2022-12-15 10:37:33 +03:00
|
|
|
m4_dnl Don't leave any blank lines here, outside of macros.
|
|
|
|
m4_dnl
|
2019-02-05 02:24:48 +03:00
|
|
|
m4_dnl "m4_dnl" ignores the rest of the line (including newline).
|
2019-02-05 01:44:35 +03:00
|
|
|
m4_dnl
|
|
|
|
m4_dnl {{ }} will be our quoting delimiters
|
2016-04-06 19:03:01 +03:00
|
|
|
m4_changequote({{,}})m4_dnl
|
2016-04-18 01:27:56 +03:00
|
|
|
m4_dnl
|
2019-02-05 01:44:35 +03:00
|
|
|
m4_dnl _MACRO_ will be the naming convention for our macros
|
2016-04-18 01:27:56 +03:00
|
|
|
m4_define({{_include_}}, m4_defn({{m4_include}}) )m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl
|
2019-02-05 02:04:57 +03:00
|
|
|
m4_dnl Author to show in man pages.
|
|
|
|
m4_define({{_author_}}, {{}})m4_dnl
|
|
|
|
m4_dnl
|
2020-12-18 04:14:32 +03:00
|
|
|
m4_dnl Macros for conditionally including or excluding content based on the format
|
|
|
|
m4_dnl (man, web or info).
|
2021-06-17 21:28:19 +03:00
|
|
|
m4_define({{_man_}}, m4_ifdef({{MANFORMAT}},{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_notman_}}, m4_ifdef({{MANFORMAT}},,{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_web_}}, m4_ifdef({{WEBFORMAT}},{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_notweb_}}, m4_ifdef({{WEBFORMAT}},,{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_info_}}, m4_ifdef({{INFOFORMAT}},{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_notinfo_}}, m4_ifdef({{INFOFORMAT}},,{{$1}}) )m4_dnl
|
2020-12-19 04:30:23 +03:00
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl Two side-by-side columns.
|
2016-04-10 22:09:39 +03:00
|
|
|
m4_define({{_col2_}},
|
|
|
|
{{<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-6">$1</div>
|
|
|
|
<div class="col-sm-6">$2</div>
|
|
|
|
</div>
|
|
|
|
</div>}})m4_dnl
|
2016-04-18 01:27:56 +03:00
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl Three side-by-side columns.
|
2016-04-10 22:09:39 +03:00
|
|
|
m4_define({{_col3_}},
|
|
|
|
{{<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4">$1</div>
|
|
|
|
<div class="col-sm-4">$2</div>
|
|
|
|
<div class="col-sm-4">$3</div>
|
|
|
|
</div>
|
|
|
|
</div>}})m4_dnl
|
2016-04-18 01:27:56 +03:00
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl Various kinds of code block.
|
2016-04-18 01:27:56 +03:00
|
|
|
m4_define({{_shell_}}, {{```shell$1```}} )m4_dnl
|
|
|
|
m4_define({{_shellbold_}}, {{```{.shell .bold}$1```}} )m4_dnl
|
|
|
|
m4_define({{_journal_}}, {{```journal$1```}} )m4_dnl
|
|
|
|
m4_define({{_csv_}}, {{```csv$1```}} )m4_dnl
|
|
|
|
m4_define({{_rules_}}, {{```rules$1```}} )m4_dnl
|
|
|
|
m4_define({{_timeclock_}}, {{```timeclock$1```}} )m4_dnl
|
|
|
|
m4_define({{_timedot_}}, {{```timedot$1```}} )m4_dnl
|
2016-05-29 09:43:52 +03:00
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl Various lists of common command line options.
|
|
|
|
m4_dnl Should be kept synced with CliOptions.hs etc.
|
2017-03-30 00:20:30 +03:00
|
|
|
m4_dnl
|
2024-05-29 22:53:08 +03:00
|
|
|
m4_define({{_generaloptions_}}, {{
|
|
|
|
```
|
|
|
|
General input/data transformation flags:
|
2024-06-25 10:33:40 +03:00
|
|
|
-f --file=[FMT:]FILE Read data from FILE, or from stdin if FILE is -,
|
|
|
|
inferring format from extension or a FMT: prefix.
|
|
|
|
Can be specified more than once. If not specified,
|
|
|
|
reads from $LEDGER_FILE or $HOME/.hledger.journal.
|
|
|
|
--rules=RULESFILE Use rules defined in this rules file for
|
2024-05-29 22:53:08 +03:00
|
|
|
converting subsequent CSV/SSV/TSV files. If not
|
2024-06-25 10:33:40 +03:00
|
|
|
specified, uses FILE.csv.rules for each FILE.csv.
|
2024-05-29 22:53:08 +03:00
|
|
|
--alias=A=B|/RGX/=RPL transform account names from A to B, or by
|
|
|
|
replacing regular expression matches
|
|
|
|
--auto generate extra postings by applying auto posting
|
|
|
|
rules ("=") to all transactions
|
|
|
|
--forecast[=PERIOD] Generate extra transactions from periodic rules
|
|
|
|
("~"), from after the latest ordinary transaction
|
|
|
|
until 6 months from now. Or, during the specified
|
|
|
|
PERIOD (the equals is required). Auto posting rules
|
|
|
|
will also be applied to these transactions. In
|
|
|
|
hledger-ui, also make future-dated transactions
|
|
|
|
visible at startup.
|
|
|
|
-I --ignore-assertions don't check balance assertions by default
|
|
|
|
--infer-costs infer conversion equity postings from costs
|
|
|
|
--infer-equity infer costs from conversion equity postings
|
|
|
|
--infer-market-prices infer market prices from costs
|
|
|
|
--pivot=TAGNAME use a different field or tag as account names
|
|
|
|
-s --strict do extra error checks (and override -I)
|
|
|
|
--verbose-tags add tags indicating generated/modified data
|
|
|
|
|
|
|
|
General output/reporting flags (supported by some commands):
|
|
|
|
-b --begin=DATE include postings/transactions on/after this date
|
|
|
|
-e --end=DATE include postings/transactions before this date
|
|
|
|
(with a report interval, will be adjusted to
|
|
|
|
following subperiod end)
|
|
|
|
-D --daily multiperiod report with 1 day interval
|
|
|
|
-W --weekly multiperiod report with 1 week interval
|
|
|
|
-M --monthly multiperiod report with 1 month interval
|
|
|
|
-Q --quarterly multiperiod report with 1 quarter interval
|
|
|
|
-Y --yearly multiperiod report with 1 year interval
|
|
|
|
-p --period=PERIODEXP set begin date, end date, and/or report interval,
|
|
|
|
with more flexibility
|
|
|
|
--today=DATE override today's date (affects relative dates)
|
|
|
|
--date2 match/use secondary dates instead (deprecated)
|
|
|
|
-U --unmarked include only unmarked postings/transactions
|
|
|
|
-P --pending include only pending postings/transactions
|
|
|
|
-C --cleared include only cleared postings/transactions
|
|
|
|
(-U/-P/-C can be combined)
|
|
|
|
-R --real include only non-virtual postings
|
|
|
|
--depth=NUM or -NUM: show only top NUM levels of accounts
|
|
|
|
-E --empty Show zero items, which are normally hidden.
|
|
|
|
In hledger-ui & hledger-web, do the opposite.
|
|
|
|
-B --cost show amounts converted to their cost/sale amount
|
|
|
|
-V --market Show amounts converted to their value at period
|
|
|
|
end(s) in their default valuation commodity.
|
|
|
|
Equivalent to --value=end.
|
|
|
|
-X --exchange=COMM Show amounts converted to their value at period
|
|
|
|
end(s) in the specified commodity.
|
|
|
|
Equivalent to --value=end,COMM.
|
|
|
|
--value=WHEN[,COMM] show amounts converted to their value on the
|
|
|
|
specified date(s) in their default valuation
|
|
|
|
commodity or a specified commodity. WHEN can be:
|
|
|
|
'then': value on transaction dates
|
|
|
|
'end': value at period end(s)
|
|
|
|
'now': value today
|
|
|
|
YYYY-MM-DD: value on given date
|
|
|
|
-c --commodity-style=S Override a commodity's display style.
|
|
|
|
Eg: -c '$1000.' or -c '1.000,00 EUR'
|
|
|
|
--pretty[=YN] Use box-drawing characters in text output? Can be
|
2024-05-30 05:10:04 +03:00
|
|
|
'y'/'yes' or 'n'/'no'.
|
2024-05-29 22:53:08 +03:00
|
|
|
If YN is specified, the equals is required.
|
|
|
|
|
|
|
|
General help flags:
|
2024-05-30 03:42:51 +03:00
|
|
|
-h --help show command line help
|
|
|
|
--tldr show command examples with tldr
|
2024-06-01 08:53:23 +03:00
|
|
|
--info show the manual with info
|
|
|
|
--man show the manual with man
|
2024-05-29 22:53:08 +03:00
|
|
|
--version show version information
|
2024-06-27 01:24:41 +03:00
|
|
|
--debug=[1-9] show this much debug output (default: 1)
|
2024-10-20 22:25:02 +03:00
|
|
|
--pager=YN use a pager when needed ? y/yes (default) or n/no
|
|
|
|
--color=YNA --colour use ANSI color ? y/yes, n/no, or auto (default)
|
2024-05-29 22:53:08 +03:00
|
|
|
```
|
2016-05-29 09:43:52 +03:00
|
|
|
}} )m4_dnl
|
2016-06-03 19:38:06 +03:00
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl A standard description of hledger.
|
2016-06-10 04:07:08 +03:00
|
|
|
m4_define({{_hledgerdescription_}}, {{
|
2022-12-15 01:23:10 +03:00
|
|
|
hledger is a robust, user-friendly, cross-platform set of programs
|
|
|
|
for tracking money, time, or any other commodity,
|
2016-06-10 04:07:08 +03:00
|
|
|
using double-entry accounting and a simple, editable file format.
|
2022-12-15 01:23:10 +03:00
|
|
|
hledger is inspired by and largely compatible with ledger(1),
|
|
|
|
and largely interconvertible with beancount(1). }} )m4_dnl
|
2016-06-10 04:07:08 +03:00
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl A standard description of where hledger reads data from.
|
2022-12-15 01:23:10 +03:00
|
|
|
m4_define({{_inputfiles_}},
|
2023-05-26 01:23:43 +03:00
|
|
|
{{reads from (and appends to) a journal file specified by the `LEDGER_FILE` environment variable
|
|
|
|
(defaulting to `$HOME/.hledger.journal`); or you can specify files with `-f` options.
|
|
|
|
It can also read timeclock files, timedot files, or any CSV/SSV/TSV file with a date field.}} )m4_dnl
|
2016-06-10 04:07:08 +03:00
|
|
|
m4_dnl
|
2023-05-26 01:23:43 +03:00
|
|
|
m4_dnl Like the above, with an added pointer to the hledger manual.
|
|
|
|
m4_define({{_inputfileswithptr_}},
|
|
|
|
{{_inputfiles_
|
|
|
|
(See hledger(1) -> Input for details.)}} )m4_dnl
|
|
|
|
m4_dnl
|
2023-05-26 03:45:07 +03:00
|
|
|
m4_dnl BUGS boilerplate
|
|
|
|
m4_define({{_reportbugs_}},
|
|
|
|
{{We welcome bug reports in the hledger issue tracker (shortcut: <http://bugs.hledger.org>),
|
|
|
|
or on the #hledger chat or hledger mail list (<https://hledger.org/support>).}} )m4_dnl
|
|
|
|
m4_dnl
|
2020-01-05 18:41:01 +03:00
|
|
|
m4_dnl The _FLAGS marker is used in generating command help (see
|
|
|
|
m4_dnl CliOptions.parseCommandDoc), but should be removed when generating manuals.
|
|
|
|
m4_dnl Just one underscore here, so pandoc doesn't strip them
|
|
|
|
m4_dnl ($FLAGS$ and =FLAGS= didn't work, not sure why).
|
|
|
|
m4_define({{_FLAGS}}, {{}})m4_dnl
|
2019-02-05 01:44:35 +03:00
|
|
|
m4_dnl
|