Skip to content

Instantly share code, notes, and snippets.

@arussellsaw
Created April 16, 2020 10:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arussellsaw/70cdd419464ff4cc24767eadb593baf2 to your computer and use it in GitHub Desktop.
Save arussellsaw/70cdd419464ff4cc24767eadb593baf2 to your computer and use it in GitHub Desktop.
A script to poll Shipton Mill's queue page and notify you when slots appear, notifications work on MacOS
#!/bin/bash
base=$(curl -s https://www.shipton-mill.com/queue |grep -i -A 10 '<h3>request a delivery slot')
while true; do
res=$(curl -s https://www.shipton-mill.com/queue |grep -i -A 10 '<h3>request a delivery slot')
echo "poll..."
if [ "$base" != "$res" ]; then
echo $res
osascript -e 'display notification "ARE YOU BREADY FOR THIS?"'
fi
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment