Last active
September 19, 2017 18:49
-
-
Save mayjs/8723dcb9bcc399b2fae53624e14ac5f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bottoken=<INSERT TOKEN> | |
chatid=<INSERT CHAT> | |
matrikel=<INSERT MATRIKEL> | |
# USE curl https://api.telegram.org/bot$bottoken/getUpdates to get the chatID! | |
telegrambase=https://api.telegram.org/bot$bottoken/sendMessage?chat_id=$chatid | |
if [[ $(curl -vs -F "matrikel=$matrikel" http://dekanat.cs.uni-dortmund.de/web/de/cgi-bin/zqueryBA.cgi 2>&1 | grep Zeugnis_Nicht_Vorhanden) ]]; then | |
echo Kein Zeugnis! | |
curl -s "$telegrambase"\&text="Kein Zeugnis!"\&disable_notification=true | |
else | |
echo Zeugnis ist da! | |
curl -s "$telegrambase"\&text="Zeugnis ist da!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment