Created
November 3, 2018 00:45
-
-
Save lenchevsky/058b98efe882c17142991ad42ce0f629 to your computer and use it in GitHub Desktop.
А вы знаете как успеть записаться на выездной консульский прием Российского посольства в Альберте? Вообще не очень просто, но с помощью bash, jenkins и push уведомлений попробую...
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
RESULT=$(curl --request GET --silent --url 'http://toronto.kdmid.ru/ru.aspx?it=%2FNews_and_announcements.aspx&lst=ru' | grep -C 1 -E "Эдмонтон|Калгари") | |
if [ ! -z "$RESULT" -a "$RESULT" != " " ]; then | |
curl -s \ --form-string "token=<TOKEN_ID>" \ --form-string "user=<USER_ID>" \ --form-string "message=$RESULT" \ https://api.pushover.net/1/messages.json | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment