diff --git a/bin/README.md b/bin/README.md index 12072bd91..f15ddd8ba 100644 --- a/bin/README.md +++ b/bin/README.md @@ -280,6 +280,11 @@ $ hledger bar -v 1 -f $TIMELOG -D # daily hours, with numbers ``` (or with hledger <1.50: `hledger bar -- ...`) +### hledger-check-buynothing + +[`hledger-check-buynothing`](https://github.com/simonmichael/hledger/blob/master/bin/hledger-check-buynothing) +checks for no activity in Expense accounts on Buy Nothing Day (or other period). + ### hledger-git [`hledger-git`](https://github.com/simonmichael/hledger/blob/master/bin/hledger-git) diff --git a/bin/hledger-check-buynothing b/bin/hledger-check-buynothing new file mode 100755 index 000000000..148fec498 --- /dev/null +++ b/bin/hledger-check-buynothing @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# hledger check-buynothing [-p PERIOD] [OTHERHLEDGERARGS] +# Check for no activity in Expense accounts on Buy Nothing Day (November 28th). +# +# You can specify a different date or period with -p. +# You can add other options/arguments to refine the query. + +txns=$(hledger reg type:x -p 11/28 "$@") +if [[ ! "$txns" == "" ]] +then + echo "Buy Nothing failure!" + echo "$txns" + exit 1 +fi