From 561777b7e71d278485e200752350dea6c92b0089 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sat, 8 Jun 2024 22:29:06 -0700 Subject: archive another dynotify in sh instead C --- sh/dynotify_sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 sh/dynotify_sh (limited to 'sh') diff --git a/sh/dynotify_sh b/sh/dynotify_sh new file mode 100755 index 0000000..16988b1 --- /dev/null +++ b/sh/dynotify_sh @@ -0,0 +1,14 @@ +#!/bin/sh + +up= +while :; do + if [ "$(curl -s https://www.douyu.com/betard/"$1" | jq '.room.show_status')" -eq 1 ]; then + if ! [ "$up" ]; then + notify-send "$2开播" + up=1 + fi + else + [ "$up" ] && up= + fi + sleep 60 +done -- cgit 1.4.1