Skip to content

Instantly share code, notes, and snippets.

@gbissett
Created November 30, 2011 03:32
Show Gist options
  • Save gbissett/1407870 to your computer and use it in GitHub Desktop.
Save gbissett/1407870 to your computer and use it in GitHub Desktop.
curry notice
require 'rtesseract'
def get_image
system 'curl -s -o image.jpg http://akueats.com/_library/images/cococurry-sign.jpg'
system 'convert image.jpg -type Grayscale image.tif'
end
def image_contains_curry
return true if RTesseract.new('image.tif').to_s.downcase.include? 'curry'
false
end
def today_is_wednesday
Time.now.wednesday?
end
def become_excited_or_sad
if today_is_wednesday and image_contains_curry
puts "CURRY DAY!!!!"
else
puts "no curry :("
end
end
get_image
become_excited_or_sad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment