Created
November 23, 2009 22:25
-
-
Save citizen428/241437 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
| require 'tweetstream' | |
| require 'rtranslate' | |
| TweetStream::Client.new('username','password').track('keyword') do |status| | |
| puts Translate.t(status[:text], 'en', 'de') | |
| end |
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
| 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 |
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
| 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