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
|
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).
|
|
|
|
m4_define({{_man_}}, m4_ifdef({{MAN}},{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_notman_}}, m4_ifdef({{MAN}},,{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_web_}}, m4_ifdef({{WEB}},{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_notweb_}}, m4_ifdef({{WEB}},,{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_info_}}, m4_ifdef({{INFO}},{{$1}}) )m4_dnl
|
|
|
|
m4_define({{_notinfo_}}, m4_ifdef({{INFO}},,{{$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_define({{_helpoptions_}}, {{
|
2016-05-29 09:43:52 +03:00
|
|
|
|
2017-07-07 04:00:46 +03:00
|
|
|
`-h --help`
|
2017-03-30 01:14:15 +03:00
|
|
|
: show general usage (or after COMMAND, command usage)
|
2016-05-29 09:43:52 +03:00
|
|
|
|
|
|
|
`--version`
|
|
|
|
: show version
|
|
|
|
|
2016-07-07 01:11:10 +03:00
|
|
|
`--debug[=N]`
|
|
|
|
: show debug output (levels 1-9, default: 1)
|
2016-05-29 09:43:52 +03:00
|
|
|
|
2017-03-30 00:20:30 +03:00
|
|
|
}} )m4_dnl
|
|
|
|
m4_dnl
|
|
|
|
m4_define({{_inputoptions_}}, {{
|
|
|
|
|
2016-05-29 09:43:52 +03:00
|
|
|
`-f FILE --file=FILE`
|
2017-03-30 00:20:30 +03:00
|
|
|
: use a different input file. For stdin, use - (default: `$LEDGER_FILE` or `$HOME/.hledger.journal`)
|
2016-05-29 09:43:52 +03:00
|
|
|
|
|
|
|
`--rules-file=RULESFILE`
|
|
|
|
: Conversion rules file to use when reading CSV (default: FILE.rules)
|
|
|
|
|
2018-09-07 21:22:05 +03:00
|
|
|
`--separator=CHAR`
|
|
|
|
: Field separator to expect when reading CSV (default: ',')
|
|
|
|
|
2016-05-29 09:43:52 +03:00
|
|
|
`--alias=OLD=NEW`
|
2017-03-30 00:20:30 +03:00
|
|
|
: rename accounts named OLD to NEW
|
|
|
|
|
|
|
|
`--anon`
|
|
|
|
: anonymize accounts and payees
|
|
|
|
|
2017-09-05 21:44:02 +03:00
|
|
|
`--pivot FIELDNAME`
|
|
|
|
: use some other field or tag for the account name
|
2016-05-29 09:43:52 +03:00
|
|
|
|
2016-07-07 00:54:54 +03:00
|
|
|
`-I --ignore-assertions`
|
2020-01-04 19:22:11 +03:00
|
|
|
: disable balance assertion checks (note: does not disable balance assignments)
|
2016-05-29 09:43:52 +03:00
|
|
|
|
2020-11-26 19:48:16 +03:00
|
|
|
`-s --strict`
|
|
|
|
: do extra error checking (check that all posted accounts are declared)
|
|
|
|
|
2016-05-29 09:43:52 +03:00
|
|
|
}} )m4_dnl
|
2016-06-03 19:38:06 +03:00
|
|
|
m4_dnl
|
|
|
|
m4_define({{_reportingoptions_}}, {{
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-b --begin=DATE`
|
2016-06-03 19:38:06 +03:00
|
|
|
: include postings/txns on or after this date
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-e --end=DATE`
|
2016-06-03 19:38:06 +03:00
|
|
|
: include postings/txns before this date
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-D --daily`
|
2016-06-03 19:38:06 +03:00
|
|
|
: multiperiod/multicolumn report by day
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-W --weekly`
|
2016-06-03 19:38:06 +03:00
|
|
|
: multiperiod/multicolumn report by week
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-M --monthly`
|
2016-06-03 19:38:06 +03:00
|
|
|
: multiperiod/multicolumn report by month
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-Q --quarterly`
|
2016-06-03 19:38:06 +03:00
|
|
|
: multiperiod/multicolumn report by quarter
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-Y --yearly`
|
2016-06-03 19:38:06 +03:00
|
|
|
: multiperiod/multicolumn report by year
|
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-p --period=PERIODEXP`
|
2019-06-29 23:41:29 +03:00
|
|
|
: set start date, end date, and/or reporting interval all at once using [period expressions](manual.html#period-expressions) syntax
|
2016-06-03 19:38:06 +03:00
|
|
|
|
|
|
|
`--date2`
|
2017-08-22 03:19:06 +03:00
|
|
|
: match the secondary date instead (see command help for other effects)
|
2016-06-03 19:38:06 +03:00
|
|
|
|
2017-06-16 02:48:03 +03:00
|
|
|
`-U --unmarked`
|
|
|
|
: include only unmarked postings/txns (can combine with -P or -C)
|
2016-06-03 19:38:06 +03:00
|
|
|
|
2017-06-10 20:37:06 +03:00
|
|
|
`-P --pending`
|
2016-06-03 19:38:06 +03:00
|
|
|
: include only pending postings/txns
|
|
|
|
|
2017-06-16 02:48:03 +03:00
|
|
|
`-C --cleared`
|
|
|
|
: include only cleared postings/txns
|
2016-06-03 19:38:06 +03:00
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-R --real`
|
2016-06-03 19:38:06 +03:00
|
|
|
: include only non-virtual postings
|
|
|
|
|
2017-09-22 21:50:13 +03:00
|
|
|
`-NUM --depth=NUM`
|
|
|
|
: hide/aggregate accounts or postings more than NUM levels deep
|
2016-06-03 19:38:06 +03:00
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-E --empty`
|
2018-03-30 00:35:06 +03:00
|
|
|
: show items with zero amount, normally hidden (and vice-versa in hledger-ui/hledger-web)
|
2016-06-03 19:38:06 +03:00
|
|
|
|
2016-06-03 19:50:01 +03:00
|
|
|
`-B --cost`
|
2020-06-20 00:36:11 +03:00
|
|
|
: convert amounts to their cost/selling amount at transaction time
|
2016-06-03 19:38:06 +03:00
|
|
|
|
2020-06-20 00:36:11 +03:00
|
|
|
`-V --market`
|
|
|
|
: convert amounts to their market value in default valuation commodities
|
|
|
|
|
|
|
|
`-X --exchange=COMM`
|
|
|
|
: convert amounts to their market value in commodity COMM
|
|
|
|
|
|
|
|
`--value`
|
|
|
|
: convert amounts to cost or market value, more flexibly than -B/-V/-X
|
|
|
|
|
|
|
|
`--infer-value`
|
|
|
|
: with -V/-X/--value, also infer market prices from transactions
|
2017-02-04 11:58:21 +03:00
|
|
|
|
2017-12-31 21:01:18 +03:00
|
|
|
`--auto`
|
2020-03-19 01:11:31 +03:00
|
|
|
: apply [automated posting rules](journal.html#auto-postings) to modify transactions.
|
2017-12-31 21:01:18 +03:00
|
|
|
|
2017-12-15 02:56:43 +03:00
|
|
|
`--forecast`
|
2020-02-22 22:31:03 +03:00
|
|
|
: generate future transactions from [periodic transaction](journal.html#periodic-transactions) rules, for the next 6 months or till report end date.
|
|
|
|
In hledger-ui, also make ordinary future transactions visible.
|
2017-12-15 02:56:43 +03:00
|
|
|
|
2020-07-18 00:16:46 +03:00
|
|
|
`--color=WHEN (or --colour=WHEN)`
|
|
|
|
: Should color-supporting commands use ANSI color codes in text output.
|
|
|
|
: 'auto' (default): whenever stdout seems to be a color-supporting terminal.
|
|
|
|
: 'always' or 'yes': always, useful eg when piping output into 'less -R'.
|
|
|
|
: 'never' or 'no': never.
|
|
|
|
: A NO_COLOR environment variable overrides this.
|
2020-07-14 22:22:11 +03:00
|
|
|
|
2017-10-01 00:29:25 +03:00
|
|
|
When a reporting option appears more than once in the command line, the last one takes precedence.
|
2017-09-30 19:29:57 +03:00
|
|
|
|
2017-10-01 00:29:25 +03:00
|
|
|
Some reporting options can also be written as [query arguments](#queries).
|
2017-09-30 19:29:57 +03:00
|
|
|
|
2017-03-30 00:20:30 +03:00
|
|
|
}} )m4_dnl
|
|
|
|
m4_dnl
|
|
|
|
m4_define({{_generaloptions_}}, {{
|
2016-06-03 19:38:06 +03:00
|
|
|
|
2017-03-30 00:20:30 +03:00
|
|
|
_inputoptions_
|
|
|
|
|
|
|
|
_reportingoptions_
|
|
|
|
|
|
|
|
_helpoptions_
|
2016-10-26 20:39:13 +03:00
|
|
|
|
2017-09-30 19:29:57 +03:00
|
|
|
_optionnotes_
|
|
|
|
|
2016-06-03 19:38:06 +03:00
|
|
|
}} )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 hledger.
|
2016-06-10 04:07:08 +03:00
|
|
|
m4_define({{_hledgerdescription_}}, {{
|
2020-01-26 03:55:58 +03:00
|
|
|
hledger is a reliable, 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.
|
|
|
|
hledger is inspired by and largely compatible with ledger(1). }} )m4_dnl
|
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl A standard description of where hledger reads data from.
|
2016-06-10 04:07:08 +03:00
|
|
|
m4_define({{_files_}},
|
|
|
|
{{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`).}})m4_dnl
|
|
|
|
m4_dnl
|
2019-02-04 19:32:29 +03:00
|
|
|
m4_dnl A standard description of the LEDGER_FILE environment variable.
|
2016-06-10 04:07:08 +03:00
|
|
|
m4_define({{_LEDGER_FILE_}}, {{
|
|
|
|
**LEDGER_FILE**
|
|
|
|
The journal file path when not specified with `-f`.
|
|
|
|
Default: `~/.hledger.journal` (on windows, perhaps `C:/Users/USER/.hledger.journal`).
|
2020-02-07 21:44:48 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"LEDGER_FILE" : "~/finance/current.journal"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
To see the effect you may need to `killall Dock`, or reboot.
|
|
|
|
|
|
|
|
|
2016-06-10 04:07:08 +03:00
|
|
|
}} )m4_dnl
|
2019-01-23 00:33:24 +03:00
|
|
|
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
|