From c7f1800185380104bbf94a00d3c5dad5baa7478d Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 15 Aug 2020 10:25:13 -0700 Subject: [PATCH] ;bin: update scripts readme --- bin/README.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/bin/README.md b/bin/README.md index 7efa950e6..a8622170f 100644 --- a/bin/README.md +++ b/bin/README.md @@ -1,21 +1,28 @@ Miscellaneous hledger add-ons, bash scripts, example make rules, etc. -The hledger-*.hs scripts here are example/experimental hledger [add-on commands], including: +The hledger-*.hs scripts here are example/experimental hledger [add-on commands]. +See for more about this. -- hledger-check.hs - check more complex account balance assertions -- hledger-smooth.hs - an attempt at automatically splitting infrequent/irregular transactions -- hledger-swap-dates.hs - print transactions with their date and date2 fields swapped -- hledger-combine-balances.hs - render two balance reports as single multi-column one -- hledger-balance-as-budget.hs - use one balance report as the budget for the other one +They are mostly implemented as [stack] scripts; if you have stack in your $PATH, +they should just work, automatically installing their dependencies if needed. +(You can also run them with [cabal], or runghc, or compile them with +ghc, if you take care of the dependencies yourself.) -Note these are not tested as much as the rest of hledger, and some of them may be only proof of concepts. +Scripts overview, simplest first: + +- hledger-check-tag-files.hs - check that all tag values containing / exist as file paths +- hledger-check-tag-files.cabal.hs - the above as a cabal script +- hledger-swap-dates.hs - print transactions with their date and date2 fields swapped +- hledger-print-location.hs - add file path/line number tags to the print command +- hledger-balance-as-budget.hs - use one balance report as budget goals for another one +- hledger-combine-balances.hs - show balance reports for two different periods side by side +- hledger-smooth.hs - incomplete attempt at automatically splitting infrequent/irregular transactions +- hledger-check.hs - check more complex account balance assertions -They are easiest to run reliably if you have [stack] in your $PATH; -they will install required dependencies and compile themselves as needed. -(You can also run them with cabal or runghc, or compile them with ghc, if you take care of the dependencies.) [add-on commands]: http://hledger.org/hledger.html#add-on-commands [stack]: https://www.fpcomplete.com/haskell/get-started +[cabal]: https://www.haskell.org/cabal ## Installing a single script @@ -38,3 +45,8 @@ Note the `--`, which is required to separate script options from hledger options $ # add hledger/bin/ to your $PATH $ hledger # addons appear in command list + + +stack exec -- ghcid bin/hledger-import-shared-expenses.hs + +stack ghci bin/hledger-import-shared-expenses.hs