Created
August 5, 2012 02:45
-
-
Save siyo/3261236 to your computer and use it in GitHub Desktop.
エロキモいBBQ中にツイッターしたくなったとき用のプラギン
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 -*- | |
# erobbq tweet / earthquake plugin | |
# | |
require 'httpclient' | |
Earthquake.init do | |
command :erobbq do | |
url = "http://shindanmaker.com/168737" | |
html = HTTPClient.new.post(url, { :u => rand(Time.now.to_f), :from => ""} ) | |
r = nil | |
html.body.split("\n").detect{|e| r = e.match(/>\s+?(.+)#{url}/)} | |
if r | |
input( open(URI.encode("http://erokimos.jgate.de/convert?q=#{r[1]}")){|f| f.read} ) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment