diff --git a/hledger-api/doc/hledger-api.1 b/hledger-api/doc/hledger-api.1 index 00ce5d1e1..33bfa9bff 100644 --- a/hledger-api/doc/hledger-api.1 +++ b/hledger-api/doc/hledger-api.1 @@ -30,11 +30,47 @@ Data is served from the usual hledger journal file: specified with \-f. For more about the format, see hledger(1) or hledger_journal(5). .PP -The server listens for requests on port ... +The server listens on port 8001, or another specified with +\f[C]\-p\ PORT\f[]. .PP Note there is no built\-in access control, so you will need to hide hledger\-api behind an authenticating proxy if you want to restrict access. +.SH OPTIONS +.PP +Note: if invoking hledger\-api as a hledger subcommand, write +\f[C]\-\-\f[] before options as shown above. +.TP +.B \f[C]\-f\ \-\-file\ FILE\f[] +use a different input file (default: \f[C]$LEDGER_FILE\f[] or +\f[C]~/.hledger.journal\f[]) +.RS +.RE +.TP +.B \f[C]\-d\ \-\-static\-dir=DIR\f[] +serve files from a different directory (default: \f[C]\&.\f[]) +.RS +.RE +.TP +.B \f[C]\-p\ \-\-port=PORT\f[] +use a different TCP port (default: 8001) +.RS +.RE +.TP +.B \f[C]\-h\f[] +show usage +.RS +.RE +.TP +.B \f[C]\-\-help\f[] +show detailed help +.RS +.RE +.TP +.B \f[C]\-\-version\f[] +show version information +.RS +.RE .SH ENVIRONMENT .PP \f[B]LEDGER_FILE\f[] sets the default journal file path. diff --git a/hledger-api/doc/hledger-api.1.m4.md b/hledger-api/doc/hledger-api.1.m4.md index 56762669e..cb9fd94bc 100644 --- a/hledger-api/doc/hledger-api.1.m4.md +++ b/hledger-api/doc/hledger-api.1.m4.md @@ -33,81 +33,33 @@ Data is served from the usual hledger journal file: `~/.hledger.journal`, `$LEDGER_FILE`, or another file specified with -f. For more about the format, see hledger(1) or hledger_journal(5). -The server listens for requests on port ... +The server listens on port 8001, or another specified with `-p PORT`. Note there is no built-in access control, so you will need to hide hledger-api behind an authenticating proxy if you want to restrict access. - - - - +# OPTIONS - +Note: if invoking hledger-api as a hledger subcommand, write `--` before options as shown above. - +`-f --file FILE` +: use a different input file (default: `$LEDGER_FILE` or `~/.hledger.journal`) - - +`-d --static-dir=DIR` +: serve files from a different directory (default: `.`) - - +`-p --port=PORT` +: use a different TCP port (default: 8001) - - +`-h` +: show usage - +`--help` +: show detailed help - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +`--version` +: show version information _man_({{ diff --git a/hledger-api/doc/hledger-api.1.txt b/hledger-api/doc/hledger-api.1.txt index bca63fe06..6655c25f5 100644 --- a/hledger-api/doc/hledger-api.1.txt +++ b/hledger-api/doc/hledger-api.1.txt @@ -24,12 +24,33 @@ DDEESSCCRRIIPPTTIIOONN $LEDGER_FILE, or another file specified with -f. For more about the format, see hledger(1) or hledger_journal(5). - The server listens for requests on port ... + The server listens on port 8001, or another specified with -p PORT. Note there is no built-in access control, so you will need to hide hledger-api behind an authenticating proxy if you want to restrict access. +OOPPTTIIOONNSS + Note: if invoking hledger-api as a hledger subcommand, write -- before + options as shown above. + + --ff ----ffiillee FFIILLEE + use a different input file (default: $LEDGER_FILE or + ~/.hledger.journal) + + --dd ----ssttaattiicc--ddiirr==DDIIRR + serve files from a different directory (default: .) + + --pp ----ppoorrtt==PPOORRTT + use a different TCP port (default: 8001) + + --hh show usage + + ----hheellpp show detailed help + + ----vveerrssiioonn + show version information + EENNVVIIRROONNMMEENNTT LLEEDDGGEERR__FFIILLEE sets the default journal file path. If not set, it is ~/.hledger.journal.