From 1b6f8e0b19a7ccc19bc2c87e36d44132578c30c0 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 27 Nov 2020 12:29:39 -0800 Subject: [PATCH] bin: rename hledger-check* per "How to check for errors" --- bin/README.md | 6 +++--- bin/{hledger-check.hs => hledger-check-fancyassertions.hs} | 7 ++++--- ...-tag-files.cabal.hs => hledger-check-tagfiles.cabal.hs} | 6 +++--- ...ledger-check-tag-files.hs => hledger-check-tagfiles.hs} | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) rename bin/{hledger-check.hs => hledger-check-fancyassertions.hs} (98%) rename bin/{hledger-check-tag-files.cabal.hs => hledger-check-tagfiles.cabal.hs} (81%) rename bin/{hledger-check-tag-files.hs => hledger-check-tagfiles.hs} (81%) diff --git a/bin/README.md b/bin/README.md index 722569494..cc56320a6 100644 --- a/bin/README.md +++ b/bin/README.md @@ -14,14 +14,14 @@ ghc, if you take care of the dependencies yourself.) 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-check-tagfiles.hs - check that all tag values containing / exist as file paths +- hledger-check-tagfiles.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 +- hledger-check-fancyassertions.hs - check more complex account balance assertions [add-on commands]: http://hledger.org/hledger.html#add-on-commands diff --git a/bin/hledger-check.hs b/bin/hledger-check-fancyassertions.hs similarity index 98% rename from bin/hledger-check.hs rename to bin/hledger-check-fancyassertions.hs index 0f674c3df..359934bc3 100755 --- a/bin/hledger-check.hs +++ b/bin/hledger-check-fancyassertions.hs @@ -3,7 +3,8 @@ {- ``` -Usage: hledger-check [-f|--file FILE] [--alias OLD=NEW] [--ignore-assertions] +Usage: hledger-check-fancyassertions + [-f|--file FILE] [--alias OLD=NEW] [--ignore-assertions] [-b|--begin DATE] [-e|--end DATE] [-C|--cleared] [--pending] [-U|--unmarked] [-R|--real] [--sunday] [-D|--daily ASSERT] [-W|--weekly ASSERT] @@ -45,7 +46,7 @@ to the sum of the values in both that account and its subaccounts. **Example:** ``` -hledger-check -D "budget:books >= £0" +hledger-check-fancyassertions -D "budget:books >= £0" ``` "At the end of every day, the books budget is greater than or equal to @@ -62,7 +63,7 @@ Assertions can also be wrapped inside parentheses. **Example:** ``` -hledger-check "(assets:overdraft < £2000) ==> (*assets:checking == £0)" +hledger-check-fancyassertions "(assets:overdraft < £2000) ==> (*assets:checking == £0)" ``` "If I have taken money from my overdraft, then I must have no money in diff --git a/bin/hledger-check-tag-files.cabal.hs b/bin/hledger-check-tagfiles.cabal.hs similarity index 81% rename from bin/hledger-check-tag-files.cabal.hs rename to bin/hledger-check-tagfiles.cabal.hs index 39a944f81..7070ce059 100755 --- a/bin/hledger-check-tag-files.cabal.hs +++ b/bin/hledger-check-tagfiles.cabal.hs @@ -3,16 +3,16 @@ build-depends: base, directory, hledger, text -} {- -hledger-check-tag-files cabal script (requires cabal 3+). +hledger-check-tagfiles cabal script (requires cabal 3+). Read the default journal and give an error if any tag values containing '/' do not exist as file paths. Usage: -$ hledger-check-tag-files.hs # compiles every time (?) +$ hledger-check-tagfiles.hs # compiles every time (?) or: -$ hledger check-tag-files # compiles every time (?) +$ hledger check-tagfiles # compiles every time (?) -} import Control.Monad diff --git a/bin/hledger-check-tag-files.hs b/bin/hledger-check-tagfiles.hs similarity index 81% rename from bin/hledger-check-tag-files.hs rename to bin/hledger-check-tagfiles.hs index 7745a5140..259a2f59d 100755 --- a/bin/hledger-check-tag-files.hs +++ b/bin/hledger-check-tagfiles.hs @@ -2,16 +2,16 @@ -- stack script --compile --resolver lts-16.3 {- -hledger-check-tag-files stack script. +hledger-check-tagfiles stack script. Read the default journal and give an error if any tag values containing '/' do not exist as file paths. Usage: -$ hledger-check-tag-files.hs # compiles if needed +$ hledger-check-tagfiles.hs # compiles if needed or: -$ hledger check-tag-files # compiles if there's no compiled version +$ hledger check-tagfiles # compiles if there's no compiled version -} import Control.Monad