Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.471 kB
require './setup'
desc "watch tweets"
task :watch do
TweetStream::Client.new(ENV['USER'],ENV['PASSWORD']).track("'my dignity'", "dignity", "nerds") do |status|
handle = status.user.screen_name
text = status.text
if text.downcase.include?("nerds")
list = NERD_LIST
else
list = DIGNITY_LIST
end
puts "[#{list}] [#{handle}] #{text}"
REDIS.lpush list, {text: text, handle: handle}.to_json
REDIS.ltrim list, 0, 10
end
end
Jump to Line
Something went wrong with that request. Please try again.