Commit Graph

336 Commits

Author SHA1 Message Date
Simon Michael
397a464aeb ;doc: bin readme/Scripts and add-ons: rewrites, list add-ons again 2024-08-12 11:00:54 +01:00
Simon Michael
d6b905fa08 ;bin: bashrc: updates 2024-08-12 08:48:42 +01:00
Simon Michael
a22901a983 ;bin: bashrc updates 2024-08-06 18:12:52 +01:00
Simon Michael
1f880f39bd ;bin: drop silly diff alias 2024-08-04 19:16:22 +01:00
Simon Michael
098acb422b ;tools: make justfiles compatible with just 1.28+ 2024-07-14 09:44:54 +01:00
Simon Michael
06f5075b6b ;doc: bin/README, Scripts page: justfile -> Justfile 2024-07-12 14:21:33 +01:00
Simon Michael
0d878415e9 ;pkg: stack: bump to latest nightly; bump various script snapshots 2024-07-12 12:45:00 +01:00
Simon Michael
7020ed3023 ;bin: bashrc: add years, eachyear scripts 2024-07-06 17:25:22 +01:00
Simon Michael
cc1797253e bin: simplebal: ignore config files 2024-07-06 17:12:08 +01:00
Simon Michael
321cdca918 ;bin: shell aliases cleanup 2024-07-06 06:58:16 +01:00
Simon Michael
84da054baf ;bin: shell aliases cleanup 2024-07-06 06:53:44 +01:00
Simon Michael
cf0c7c2ef8 ;bin: hledger-script-example: explain shebang commands better 2024-07-02 13:34:48 +01:00
Simon Michael
f847ef63e2 ;fix: bin: register-max: update/fix 2024-06-25 07:45:27 +01:00
Simon Michael
9cdf435c0e ;bin: add hledger-pricehist (alias for pricehist) 2024-05-02 18:44:21 -10:00
Simon Michael
65e01d900a ;bin: add hledger-txnsbycat.hs 2024-04-03 15:00:53 -10:00
Colin Dean
4c15cfb275 fix: correct to inherit_errexit in hledger-bar
I misread something and apparently whatever test I used didn't fail because what's there now is not valid at all.
2024-02-17 20:54:30 -10:00
Simon Michael
ca55c2f0f8 dev: rename other Price helpers to Cost
showAmountWithoutPrice             -> showAmountWithoutCost
mixedAmountStripPrices             -> mixedAmountStripCosts
showMixedAmountWithoutPrice        -> showMixedAmountWithoutCost
showMixedAmountOneLineWithoutPrice -> showMixedAmountOneLineWithoutCost
2024-01-23 21:35:06 -10:00
Simon Michael
323f87b3e9 dev: Amount: aprice -> acost
Acked-by: Simon Michael <simon@joyful.com>
2024-01-23 21:35:06 -10:00
Simon Michael
e201775e93 dev: amountStripPrices -> amountStripCost 2024-01-23 21:35:06 -10:00
Colin Dean
2ac0905c70 dev: Runs shellcheck on hledger-simplebal
Shellcheck handled the variable fixups. The pipefail flag avoids another
Shellcheck warning w.r.t. handling pipe failures. This script is so
minimal that it's safe to simply fail the pipe entirely if the hledger
command fails.
2024-01-23 06:30:32 -10:00
Colin Dean
4faa381ccd fix: Run shellcheck on hledger-bar
I [encountered][1] an unexpected error when testing hledger-bar for
proposed inclusion in Homebrew's default installation of hledger:

    /opt/homebrew/Cellar/hledger/1.32.2_1/bin/hledger-bar: line 81:
    conditional binary operator expected

I'm doubt that this is fixed by running shellcheck, but checking
a script against shellcheck is usually one of the first things I check
before debugging shell!

This patch is ~generated by shellcheck with

    shellcheck --shell=bash --enable=all --format=diff bin/hledger-bar | \
    git apply

plus some extra, manual additions in the form of a shellcheck directive
to accept something that's a little abnormal for shellcheck but fine
here. The `set -o inherit_exit` was also recommended by shellcheck.

[1]: https://github.com/Homebrew/homebrew-core/actions/runs/7606843601/job/20713321881?pr=160590
2024-01-22 18:16:47 -10:00
Simon Michael
bd8bd393f2 ;fix:hledger-bar: really fix the error when NO_COLOR is not defined [#2159]
Also, it's now more compliant with the no-color.org spec:

  Command-line software which adds ANSI color to its output by default
  should check for a NO_COLOR environment variable that, when present
  and not an empty string (regardless of its value), prevents the
  addition of ANSI color.

so one can now temporarily override $NO_COLOR=1 in the environment by
setting it empty: NO_COLOR= hledger ...
2024-01-22 12:40:48 -10:00
Simon Michael
0f30316cfd ;bin:hledger-bar: fix an error when NO_COLOR is not defined [#2159] 2024-01-22 11:28:13 -10:00
Simon Michael
d8addd5926 ;bin:hledger-bar: fix a shellcheck warning 2024-01-22 10:29:47 -10:00
Simon Michael
3b6d00ff9a ;doc:scripts:sortandmergepostings: edit 2024-01-06 14:01:28 -10:00
Simon Michael
6b2cb5124a ;doc:scripts:sortandmergepostings: give a little more context 2024-01-06 13:56:51 -10:00
Simon Michael
0c85b48d2c ;doc: use ``cli not ``shell for command-line examples 2023-11-26 08:30:04 -10:00
Simon Michael
32d9deb3e1 ;bin:bar: cleanup 2023-11-21 09:27:26 -10:00
Simon Michael
24ce9b5be1 ;bin:report1: cleanups 2023-10-24 13:38:08 +01:00
Simon Michael
c195e35572 ;bin:report1: cleanups 2023-10-23 19:29:32 +01:00
Simon Michael
15e76488e3 ;bin: link hledger-report1 scripts 2023-10-23 19:13:52 +01:00
Simon Michael
da774bd708 ;bin: hledger-report1: a custom compound report in haskell and bash 2023-10-23 19:07:52 +01:00
Simon Michael
f157720fa3 ;bin:justfile: rename forecast.journal, forecast-import refinement 2023-10-19 11:17:57 +01:00
Simon Michael
dadb904b04 ;doc:examples/bin: add gsheet-csv.hs 2023-10-14 06:09:34 +01:00
Simon Michael
ae8f9dd232 ;doc:justfile: update import, time report scripts 2023-10-14 05:59:20 +01:00
Simon Michael
0e98f73e30 dev:cli: merge Hledger.Cli.Main with Hledger.Cli 2023-10-04 10:03:35 +01:00
Simon Michael
b6325e067e ;bin: tt,ft comment 2023-09-11 10:07:52 +01:00
Simon Michael
969dea72ae ;bin:justfile: make more chooser friendly, add help/pick/view 2023-07-07 13:11:11 -10:00
Simon Michael
0fabbc3b32 ;bin:justfile: fix/cleanups 2023-07-07 08:16:15 -10:00
Simon Michael
67e5a453a0 ;bin: add a justfile (conversion of ft and tt) 2023-07-06 15:52:41 -10:00
Simon Michael
c0bd0d2979 ;doc:bin: fix tt link 2023-07-06 08:57:26 -10:00
Simon Michael
d221be1959 ;doc:bin:ft: updates 2023-07-06 08:53:44 -10:00
Simon Michael
0d641ad2b9 ;doc:bin:tt: updates 2023-07-06 08:39:52 -10:00
Simon Michael
519b305627 ;doc:bin: ft/tt updates 2023-07-06 08:19:16 -10:00
Simon Michael
27e5739de5 ;doc:bin: ft/tt updates 2023-07-06 08:15:13 -10:00
Simon Michael
8088fa714e ;doc:bin: link ft and tt 2023-07-06 08:10:57 -10:00
Simon Michael
37206aba5a ;bin: ft, tt reporting scripts (examples) 2023-07-06 08:06:05 -10:00
Simon Michael
5e55258e59 ;bin: bar: help tweak 2023-05-23 17:14:47 -10:00
Simon Michael
78e088d982 ;examples: add a more up-to-date CSV/scripts makefile in examples/csv/ 2023-05-10 23:24:06 -10:00
Simon Michael
0fe9c2f215 ;doc: bin: fix link name (2) 2023-05-09 13:03:41 -10:00
Simon Michael
fc11cd6ce0 ;doc: bin: fix link name 2023-05-09 13:02:07 -10:00
Simon Michael
705c1bec93 ;fix: hledger-bar: detect non-interactive output properly for ANSI 2023-05-09 11:30:46 -10:00
Simon Michael
c5b2465fb0 ;imp: hledger-bar: disable ANSI if terminal is non-interactive 2023-05-06 16:25:51 -10:00
Simon Michael
765742ab9c ;doc: bin: cleanup 2023-04-28 14:26:14 -10:00
Simon Michael
de25142345 ;doc: bin: hledger-fifo -> hledger-lots 2023-04-28 14:21:18 -10:00
Simon Michael
315df53c56 ;doc: bin: hledger-bar example 2023-04-22 20:36:36 -10:00
Simon Michael
93ee092ab7 ;doc: bin: hledger-bar: update 2023-04-20 20:29:12 -10:00
Simon Michael
eba95fb38b ;bin: bar: cleanups 2023-04-20 14:44:29 -10:00
Simon Michael
3165d4d897 bin: hledger-bar - simple bar charts in the terminal 2023-04-20 12:58:08 -10:00
Simon Michael
2fbf3423de ;doc: bin: note scripts are not required 2023-03-31 05:57:13 -10:00
Simon Michael
c2e7cc5700 pkg: update stackage resolvers, extra deps 2023-03-10 18:58:22 -10:00
Simon Michael
82be50902a ;doc: bin/README: updates 2023-02-21 16:46:34 -10:00
Simon Michael
caa8b4871e ;doc: bin/README: edits 2023-02-21 12:18:04 -10:00
Simon Michael
8e34c5253c ;doc: bin/README: tweak 2023-02-21 00:39:38 -10:00
Simon Michael
3ee2f59b57 ;doc: reorganise bin/README & the Scripts page 2023-02-21 00:16:15 -10:00
Simon Michael
e4c6e83ed1 ;doc: bin/README: separate hledger-edit, hledger-lot entries 2023-02-20 22:28:41 -10:00
Simon Michael
6a9f2b5745 ;doc: bin/README: add hledger-fifo, improve hledger-utils 2023-02-20 22:05:41 -10:00
Simon Michael
02b673e516 ;bin: git: tweak help, add commit -n example 2023-02-20 16:25:36 -10:00
Caleb Maclennan
7c34f08580 doc: bin: Document new AWK contrib script usage 2023-02-09 23:33:22 -10:00
Caleb Maclennan
1f088324c6 feat: bin: Add AWK script to sort postings and merge duplicates
Co-authored-by: Murukesh Mohanan <murukesh.mohanan@gmail.com>
2023-02-09 23:33:22 -10:00
Simon Michael
a37da26ee9 ;bin: hledger-git: record: better error output 2023-02-03 19:07:28 -10:00
Simon Michael
ae26ae6294 ;bin: hledger-git: status command also shows diffs 2023-02-02 21:12:16 -10:00
Simon Michael
1e1b26261d ;fix: bin: hledger-git: add short command aliases r, s, l 2023-02-01 13:30:21 -10:00
Simon Michael
e986bdf2d5 ;fix: bin: hledger-git: fix -h; pass unrecognised commands to git 2023-02-01 13:30:21 -10:00
Simon Michael
c477c59247 ;fix: bin: hledger-git: don't forcibly add ignored files 2023-02-01 13:30:21 -10:00
Simon Michael
c8c920cbe0 ;fix: bin: hledger-git: fix status command 2023-02-01 13:30:21 -10:00
Simon Michael
5ad1aab288 ;bin: rename hledger-script-example.hs; use fewer imports and deps 2023-01-29 16:57:14 -10:00
Simon Michael
b49b760497 ;bin: a version of hledger-register-max using a newer API
This one uses Hledger.Cli.Script to reduce import boilerplate,
and supports --help.
2023-01-29 16:29:58 -10:00
Simon Michael
6589b506ed ;bin: register-max: tweaks 2023-01-29 08:14:15 -10:00
Simon Michael
173985dbfc ;bin: register-max: show multiple postings, better layou 2023-01-29 08:03:47 -10:00
Simon Michael
7f8f98707d ;bin: register-max: cleanup 2023-01-29 07:12:16 -10:00
Simon Michael
dc8e0f66de ;bin: register-max: don't add -H by default 2023-01-29 06:58:52 -10:00
Simon Michael
82abb00754 ;bin: register-max 2023-01-29 06:43:42 -10:00
Simon Michael
b15d8d214d ;doc: scripts: hledger-utils: show install command, mention hledger-plot 2023-01-14 12:04:54 -10:00
Yann Büchau
18f264595b ;doc: Add hledger-utils with 'hledger edit' to docs 2023-01-05 09:21:44 -10:00
Patrick Fiaux
b3de7e59af fix: cli: updates hledger-git record command to use plain git
This fixes the issue in https://github.com/simonmichael/hledger/issues/1942.
Instead of relying on a `git record` alias being present `hledger git record`
uses only vanilla git.

The expected alias for record is:
```
record = ! sh -c '(git add -p -- $@ && git commit) || git reset' --
```

The removed `git record` is in the script is implemented using:
- `git commit` with the given messages (and additional arguments if given)
- `git reset` if the commit fails

`git add -p` isn't needed because the files are added already above. Also
this would be interactive which isn't the goal for this call.

The message still defaults to the date if not given, however I had to add
a check to only shift if arguments were passed in, otherwise shift fails.
2022-11-26 08:51:00 -05:00
Simon Michael
ba773e3fe9 dev: bump to stackage lts-20.1 2022-11-25 23:44:46 -05:00
Simon Michael
fc8c85931c bin: move: improve help 2022-11-10 19:01:41 -10:00
Simon Michael
a6cc98521d feat: bin: watchaccounts 2022-10-27 11:24:45 -10:00
Simon Michael
25c9083d0d ;bin: move: docs fix 2022-10-07 14:45:44 -10:00
Simon Michael
8f06cefab4 bin: hledger-move, helps make subaccount/cost-preserving transfers 2022-10-07 14:28:04 -10:00
Simon Michael
5c0baef9ae bin: hledger-addon-example: help text tips 2022-10-07 06:34:34 -10:00
Simon Michael
3cda526c5a stack: bump to 2022-09-01 resolver 2022-09-01 15:30:33 -07:00
Simon Michael
c80c72d7cd dev: lib, cli, bin: enable/fix name shadowing warnings
And a few other cleanups.
2022-08-23 12:16:15 +01:00
David D Lowe
f5680529cd Fix broken link in bin/README.md 2022-08-15 03:34:40 +01:00
Simon Michael
950c85cad7 dev: bump to latest stackage, ghc 9.2.4 2022-08-07 19:11:17 +01:00
Simon Michael
8b121bcf74 ;feat: bin: hledger-check-postable 2022-08-02 16:22:05 +01:00
Simon Michael
d7f3e8b50c ;doc: bin: edits 2022-07-25 18:26:32 +01:00
Simon Michael
d00827a2fc ;doc: bin: more cleanups 2022-07-25 09:02:07 +01:00
Simon Michael
cb6fceb50b ;doc: bin: cleanups; categorise scripts 2022-07-25 04:28:46 +01:00