hledger/bin/hledger-check-buynothing
2025-11-20 12:26:57 -10:00

15 lines
408 B
Bash
Executable File

#!/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