From 343f957cad4abb797033187fb1746a5521e6bd3f Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 9 Jan 2026 14:54:25 -1000 Subject: [PATCH] ;examples: debconf: reports --- examples/debconf/Makefile | 18 +++++++++++++++++- examples/debconf/README.md | 13 +++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/examples/debconf/Makefile b/examples/debconf/Makefile index cc7f04bcd..c135357c0 100644 --- a/examples/debconf/Makefile +++ b/examples/debconf/Makefile @@ -19,10 +19,26 @@ dc%: git -C $@ sparse-checkout set --no-cone budget '!budget/invoices' git -C $@ apply --allow-empty ../patches/$@.patch -# make check-ledger, check-hledger - check readability of all years +# make check-ledger, check-hledger - check readability of all years (main journal) check-%: @for d in dc*; do printf "$$d: "; $* -f $$d/budget/journal.ledger stats >/dev/null && echo ok; done +# make hledger-'ARGS' - run a hledger command on all years (main journal) +hledger-%: + @for d in dc*; do printf "\n$$d:\n"; hledger -f $$d/budget/journal.ledger $*; done + +stats: + @make -s hledger-stats + +accounts: + @make -s hledger-accounts + +is: + @make -s hledger-'is -2' + +bs: + @make -s hledger-'bs -2' + # maintenance diff --git a/examples/debconf/README.md b/examples/debconf/README.md index a211d05fd..d93987303 100644 --- a/examples/debconf/README.md +++ b/examples/debconf/README.md @@ -10,3 +10,16 @@ Or to clone all years, starting 2017: `make all` Some patches for hledger readability will be applied; those might need updating from time to time.\ To check hledger readability: `make check-hledger`\ To check ledger readability: `make check-ledger` + +To run some basic reports in all years: + +- `make is` +- `make bs` +- `make accounts` +- `make stats | grep 'Txns '` + +To run an any hledger report in all years: `make hledger-'ARGS'`\ +Eg: + +- `make hledger-'activity -W'` +- `make hledger-'is -tYT --layout=bare'`