From da2b8f5f34aa68086cdc61ccf013b1e54a96ed48 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 25 Jul 2022 03:31:05 +0100 Subject: [PATCH] ;doc: move add-ons list to manual > COMMANDS; cleanups --- bin/README.md | 19 +++++-------------- hledger/hledger.m4.md | 23 ++++++++++++----------- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/bin/README.md b/bin/README.md index 70799a836..693832149 100644 --- a/bin/README.md +++ b/bin/README.md @@ -12,17 +12,6 @@ These are either useful in themselves, or serve as examples/starting points for For a longer list of PTA tools (not hledger-specific), see [plaintextaccounting.org](https://plaintextaccounting.org). -Also, the following add-on commands are not kept in the bin directory, but can be installed by the -[hledger-install script](https://hledger.org/install.html#with-hledger-install) -or other [install methods](https://hledger.org/install.html): - -- [`hledger-ui`](hledger-ui.html) is hledger's official curses-style TUI -- [`hledger-web`](hledger-web.html) is hledger's official web UI -- [`hledger-iadd`](https://hackage.haskell.org/package/hledger-iadd) is a popular alternative to hledger's `add` command. -- [`hledger-interest`](https://hackage.haskell.org/package/hledger-interest) generates interest transactions. -- [`hledger-stockquotes`](https://hackage.haskell.org/package/hledger-stockquotes) downloads market prices. (Alpha quality, needs your help.) - - [bin]: https://github.com/simonmichael/hledger/tree/master/bin [Scripts]: https://hledger.org/scripts.html @@ -55,7 +44,7 @@ and can be: And furthermore, - a script or program which is named `hledger-something`, executable, - and in your shell's PATH, is called an [add-on command](https://hledger.org/1.26/hledger.html#about-add-on-commands). + and in your shell's PATH, is called an [add-on command](https://hledger.org/dev/hledger.html#addons). These will show up in hledger's commands list (`hledger`), and can be invoked with (`hledger something`), much like built-in commands. @@ -152,12 +141,14 @@ $ hledger pijul record [MSG] ### hledger-addon-example [`hledger-addon-example.hs`](https://github.com/simonmichael/hledger/blob/master/bin/hledger-addon-example.hs) -is a starter template for a hledger add-on command. +is a starter template for add-on commands written in Haskell (ie, the powerful kind). It has the same structure as most of the other add-ons here: - implemented as a stack script for robustness -- includes command line help +- provides command line help - accepts common hledger options +Further cleanup and documentation is ongoing. + ### hledger-print-location [`hledger-print-location.hs`](https://github.com/simonmichael/hledger/blob/master/bin/hledger-print-location.hs) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index d249d13b2..c466c4d4a 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -1780,21 +1780,21 @@ These data entry commands are the only ones which can modify your journal file. - [test](#test) - run self tests + + **Add-on commands:** Programs or scripts named `hledger-SOMETHING` in your PATH are -[add-on commands](#about-add-on-commands); these appear in the +[add-on commands](#add-on-commands); these appear in the commands list with a `+` mark. -Two of these are maintained and released with hledger: +The following add-on commands can be installed, eg by the +[hledger-install script](https://hledger.org/install.html#with-hledger-install): -- **[ui](hledger-ui.html)** - an efficient terminal interface (TUI) for hledger -- **[web](hledger-web.html)** - a simple web interface (WUI) for hledger - -And these add-ons are maintained separately: - -- [iadd](http://hackage.haskell.org/package/hledger-iadd) - a more interactive alternative for the add command -- [interest](http://hackage.haskell.org/package/hledger-interest) - generates interest transactions according to various schemes -- [stockquotes](http://hackage.haskell.org/package/hledger-stockquotes) - downloads market prices for your commodities from AlphaVantage *(experimental)* +- **[ui](hledger-ui.html)** - hledger's official curses-style TUI +- **[web](hledger-web.html)** - hledger's official web UI +- [iadd](https://hackage.haskell.org/package/hledger-iadd) - a popular alternative to hledger's `add` command. +- [interest](https://hackage.haskell.org/package/hledger-interest) - generates interest transactions +- [stockquotes](https://hackage.haskell.org/package/hledger-stockquotes) - downloads market prices. *(Alpha quality, needs your help.)* m4_dnl XXX maybe later m4_dnl _man_({{ @@ -1808,7 +1808,8 @@ Next, the detailed command docs, in alphabetical order. m4_dnl cf Hledger/Cli/Commands/commands.m4: _commands_({{##}}) -## About add-on commands +## Add-on commands + Add-on commands are programs or scripts in your PATH