Skip to content

Instantly share code, notes, and snippets.

@zooniverse
Created April 8, 2011 14:19
Show Gist options
  • Save zooniverse/909924 to your computer and use it in GitHub Desktop.
Save zooniverse/909924 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
#!/usr/bin/gem
require 'rubygems'
require 'crack'
ARGF.each do |line|
tweet = line.strip
unless tweet.length == 0
begin
parsed = Crack::JSON.parse(tweet)
if parsed['text'].downcase.include?('love')
puts 'love'
end
rescue
# couldn't parse tweet
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment