;bin: hledger-check-buynothing
This commit is contained in:
parent
4d0550f1b4
commit
de0b6603e3
@ -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)
|
||||
|
||||
14
bin/hledger-check-buynothing
Executable file
14
bin/hledger-check-buynothing
Executable file
@ -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
|
||||
Loading…
Reference in New Issue
Block a user