simonmichael / hledger

Robust, fast, intuitive plain text accounting tool with CLI, TUI and web interfaces.
https://hledger.org
GNU General Public License v3.0
2.85k stars 307 forks source link

tldr clients and documentation #2201

Closed ShrykeWindgrace closed 3 weeks ago

ShrykeWindgrace commented 1 month ago

More of a documentation issue rather than a bug.

The flag

-r, --render=PATH       render a local page for testing purposes

is present in the node-based tldr client (npm install -g tldr, https://github.com/tldr-pages/tldr-node-client), and other clients are a-plenty, official and non-official.

For example, tealdeer (https://github.com/dbrgn/tealdeer, it also installs as tldr) has another choice of flags:

    -f, --render <FILE>          Render a specific markdown file
    -r, --raw                    Display the raw markdown instead of rendering it

I'd say it would be a bit clearer so say somewhere that the behavior of the --tldr flag is compatible with the official clients. I do not have any particular number on the market share of various clients, so maybe this issue touches only a negligible minority of users who can figure out why they see

PS> hledger --tldr
Warning: Page `$HOME\appdata\local\temp\hle21ae.md` not found in cache.
Try updating with `tldr --update`, or submit a pull request to:
https://github.com/tldr-pages/tldr
Could not run tldr, using fallback viewer:

# hledger

> A robust, friendly plain text accounting app (command line version).
> See also: `hledger-ui` for TUI, `hledger-web` for web interface.
> More information: <https://hledger.org/hledger.html>.

- Record new transactions interactively, saving to the default journal file:

`hledger add`
<etc>

on their own =)

That -r flag is not in the CLI spec, so maybe just say that you need a client that supports it?

simonmichael commented 1 month ago

That's unfortunate, I imagined only one client with executable named tldr. Yes we should clarify this somehow.

simonmichael commented 3 weeks ago

--render seems more portable, I have pushed that fix to master.

simonmichael commented 3 weeks ago

Also --tldr should get more of a mention somewhere in the manual I guess, currently it only appears at https://hledger.org/dev/hledger.html#options.

simonmichael commented 3 weeks ago

I've mentioned it briefly near the start of the manual; and when running tldr fails I've made sure the warning mentions tldr --render. I think that should be enough.