Created
April 8, 2011 14:19
-
-
Save zooniverse/909924 to your computer and use it in GitHub Desktop.
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
#!/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