From d6525356320c2153f40fe7265bd8bc4378fcd17b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 1 Dec 2023 11:19:34 -1000 Subject: [PATCH] ;tools: bake projectcommits --- bake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bake b/bake index 159bfc7cc..2f5b3a248 100755 --- a/bake +++ b/bake @@ -185,6 +185,13 @@ jargon() { rg '^ *> (.*)' -or '$1' hledger-lib/Hledger.hs > jargon.j } +# Extract ledger/hledger/beancount commit stats to project-commits.j. +# See also https://hledger.org/reporting-version-control-stats.html +projectcommits() { + printf "account ledger\naccount hledger\naccount beancount\n\n" >project-commits.j + for p in ledger hledger beancount; do git -C ../$p log --format="%cd (%h) %s%n ($p) 1%n" --date=short --reverse >> project-commits.j; done +} + if declare -f "$1" > /dev/null; then "$@"; else usage; fi # ** notes