Skip to content

Instantly share code, notes, and snippets.

@siyo
Forked from kenjiskywalker/hisaichi_tweet.rb
Created July 10, 2013 14:07
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 siyo/5966581 to your computer and use it in GitHub Desktop.
Save siyo/5966581 to your computer and use it in GitHub Desktop.
Earthquake.init do
command %r|^:hisaichi\s+(.+)$|, :as => :hisaichi do |m|
str = URI.escape(m[1])
response = Net::HTTP.get('www11268ue.sakura.ne.jp','/generator?text=' + str, 5001)
strings = JSON.parse(response)["text"]
input(strings)
end
end
# http://hisaichi5518.hatenablog.jp/entry/2013/07/09/111503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment