Created
October 22, 2011 08:21
-
-
Save masarakki/1305777 to your computer and use it in GitHub Desktop.
earthquake plugin for simple QT and RT
This file contains 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
Earthquake.init do | |
command %r|^:qt\s+(\d+)\s+(.*)$|, :as => :qt do |m| | |
target = twitter.status(m[1]) | |
text = "#{m[2]} QT @#{target["user"]["screen_name"]}: #{target["text"]}" | |
if confirm("QT '#{text}'") | |
async_e { twitter.update(text) } | |
end | |
end | |
command %r|^:rt\s+(\d+)$|, :as => :rt do |m| | |
input ":retweet #{m[1]}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment