Skip to content

Commit a7b36dc

Browse files
committed
Add script for sending notifications to my signal groups
1 parent a4ca78d commit a7b36dc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#! /bin/sh
2+
3+
. $HOME/scripts/personal/signal_number.sh
4+
5+
if [ "$1" = "--help" ] || [ "$1" = "-h" ] || [ "$1" = "help" ]; then
6+
cat <<EOF
7+
$ send-challenge-review-notification
8+
Send the weekly challenge review notifications via signal
9+
EOF
10+
exit
11+
fi
12+
13+
command -v signal-cli >/dev/null || { echo "signal-cli is not installed" 1>&2; exit 127; }
14+
15+
send() {
16+
local group="$1"
17+
signal-cli -a $SIGNAL_NUMBER send -g "$group" -m 'Challenge review time!' --text-style "0:23:ITALIC" >/dev/null 2>&1
18+
}
19+
20+
~/scripts/cron/waitforinternet
21+
~/scripts/cron/cron-notify-send "Sending challenge review notifications"
22+
send "UIXSwit7KF/RqKfH9jqySnLTgqVCimGcEK25Dbf+yDw=" # weekly challenges
23+
send "97DrVHpStw2VOPfGzOtdnWsUJV3W4HB7QEKg155mhMg=" # 66 day challenge

0 commit comments

Comments
 (0)