Created
September 10, 2016 09:35
-
-
Save XertroV/03a7329057067eefe183a47103703747 to your computer and use it in GitHub Desktop.
little bash script to notify aurally when results come in for Byron Council Elections
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
NORESULTS='class="sum02"><tdcolspan="3">ProgressiveTotalVotes</td><tdclass="r"></td><tdclass="empty"></td><tdclass="empty"></td><tdclass="empty"></td></'; | |
while sleep 1; do | |
echo 'running'; | |
RESULTS=$(curl -s http://votensw.info/data/byron-shire-council/summary_councillor.html | tr -d ' ' | tr -d '\n' | sed 's/tr/\'$'\n/g' | grep sum02); | |
if [ "$RESULTS" == "$NORESULTS" ] ; then | |
echo 'no results' ; | |
# say 'no results' # debug only | |
else | |
echo 'results'; | |
say 'results are in'; | |
fi; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment