Skip to content

Instantly share code, notes, and snippets.

@citizen428
Created November 23, 2009 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save citizen428/241437 to your computer and use it in GitHub Desktop.
Save citizen428/241437 to your computer and use it in GitHub Desktop.
require 'tweetstream'
require 'rtranslate'
TweetStream::Client.new('username','password').track('keyword') do |status|
puts Translate.t(status[:text], 'en', 'de')
end
require 'tweetstream'
require 'twitter'
require 'rtranslate'
un, pw = 'username', 'password'
httpauth = Twitter::HTTPAuth.new(un, pw)
client = Twitter::Base.new(httpauth)
TweetStream::Daemon.new(un, pw, 'transbot').follow(20104013) do |status|
client.update(Translate.t(status[:text], 'ja', 'en'))
end
require 'twitter'
Twitter::Trends.current(:exclude => 'hashtags').each do |trend|
puts trend['name']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment