summaryrefslogtreecommitdiffstats
path: root/skripti/mgl_obvesti_ob_dogodku.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xskripti/mgl_obvesti_ob_dogodku.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/skripti/mgl_obvesti_ob_dogodku.sh b/skripti/mgl_obvesti_ob_dogodku.sh
new file mode 100755
index 0000000..3714513
--- /dev/null
+++ b/skripti/mgl_obvesti_ob_dogodku.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -xeuo pipefail
+olds=""
+while :
+do
+ news=`curl -H "User-Agent: $0 kontakt anton@sijanec.eu" "https://www.mgl.si/sl/spored/?location=1&event=1072&subs=" | grep "big-date" | cut -d\> -f2 | cut -d\< -f1`
+ if [ "$news" = "$olds" ]
+ then
+ continue
+ fi
+sendmail anton@sijanec.eu <<EOF
+From: projects-r-skripti-mgl.sh@sijanec.eu
+To: anton@sijanec.eu
+Subject: novi datumi iskane predstave v mgl
+
+datumi so: $news
+EOF
+ olds=$news
+ sleep 60
+done