Skip to content

Instantly share code, notes, and snippets.

@lenchevsky
Created November 3, 2018 00:45
Show Gist options
  • Save lenchevsky/058b98efe882c17142991ad42ce0f629 to your computer and use it in GitHub Desktop.
Save lenchevsky/058b98efe882c17142991ad42ce0f629 to your computer and use it in GitHub Desktop.
А вы знаете как успеть записаться на выездной консульский прием Российского посольства в Альберте? Вообще не очень просто, но с помощью bash, jenkins и push уведомлений попробую...
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