Created
May 17, 2013 04:08
-
-
Save RobertShippey/5596872 to your computer and use it in GitHub Desktop.
Icky semi-pseudo-code for the pi thing
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
url = "http://whatever.com/" | |
reference_page = "" | |
current_page = "" | |
wait_time = 5 * 60 #seconds | |
setup( ) | |
while True: | |
download_page( ) | |
if not same_as_reference( ): | |
if page_shows_warning( ): | |
flash_and_stuff( ) | |
save_as_reference( ) | |
wait_a_bit( ) | |
def setup( ): | |
# set up pins, mixer, whatevs. | |
def download_page: | |
current_page = stuff | |
def same_as_reference: | |
return current_page == reference_page | |
def page_shows_warning: | |
# XML parse some shit | |
return True | |
def flash_and_stuff: | |
# play sound | |
# flash lights | |
def save_as_reference: | |
reference_page = current_page | |
def wait_a_bit: | |
time.sleep(wait_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment