Skip to content

Instantly share code, notes, and snippets.

@atwalsh
Created March 19, 2015 00:54
Show Gist options
  • Save atwalsh/ff229e7c15e8b13e9144 to your computer and use it in GitHub Desktop.
Save atwalsh/ff229e7c15e8b13e9144 to your computer and use it in GitHub Desktop.
USNWC Trail Status checker
require 'open-uri'
content = open('http://usnwc.org/#trail-status').read
if content =~ /trailsclosed\.png/
puts "Trails closed!"
elsif content =~ /trailsopen\.png/
puts "Trails open!"
else
puts "Oops, images not found?"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment