Created
June 4, 2019 04:31
-
-
Save alexeckermann/3f6a051e876e4c03e3b6341b7b05a7ad to your computer and use it in GitHub Desktop.
WWDC 2019 replay video watch script
This file contains 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 | |
# Execute this script to be notified when the WWDC 2019 replay video is available, maybe. | |
# Make sure this file is `chmod +x` to run in your Terminal. | |
while true | |
do | |
echo -n `date` | |
# Assumption is that the video page will contain an m3u8 file when the video is available. | |
KEYWORD_COUNT=$(curl -s https://www.apple.com/apple-events/june-2019/ | grep -c "m3u8") | |
if [[ $KEYWORD_COUNT > "0" ]] | |
then | |
echo -e " \033[42;1m AVAILABLE! \033[0m" | |
say -v Karen -r 250 "Dub Dub video available! Dub Dub video available!" | |
exit 0 | |
fi | |
echo -e " \033[41;1m NOT AVAILABLE \033[0m ${KEYWORD_COUNT}" | |
# Checks only every 2 minutes | |
sleep 120 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.apple.com/apple-events/june-2019/