Created
January 5, 2012 13:49
-
-
Save siyo/1565332 to your computer and use it in GitHub Desktop.
Jラッパーっぽいつぶやきするやつ / earthquake.gem plugin
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
# -*- coding: utf-8 -*- | |
# jrapper tweet / earthquake plugin | |
# | |
# jrapper: http://shindanmaker.com/54175 | |
# | |
require 'httpclient' | |
Earthquake.init do | |
command :jrapper do |m| | |
html = HTTPClient.new.post("http://shindanmaker.com/54175", { :u => m[1], :from => "" } ) | |
m = nil | |
html.body.split("\n").detect{|e| m = e.match(/>\s+?(.+)\s+\#jrapper/)} | |
input(m[1]) if m | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment