Created
June 14, 2013 11:26
-
-
Save hagiyaki/5781133 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
# -*- coding: utf-8 -*- | |
# kenjiskaywalker tweet / earthquake plugin | |
# | |
# superdry: http://shindanmaker.com/43570 | |
# | |
require 'httpclient' | |
require 'nokogiri' | |
Earthquake.init do | |
command :kenji do | |
url = "http://shindanmaker.com/43570" | |
res = HTTPClient.new.post(url, { :u => rand(Time.now.to_i), :from => ""} ) | |
html = Nokogiri::HTML(res.body) | |
text = html.css("#forcopy").text.strip | |
input text.force_encoding('utf-8').gsub("アサヒィ","ケンジィ").gsub("パァ","カァイ").gsub("ドゥル","ウォォカ").gsub("ァァイ","ァ").gsub("asahisuperdry","kenjiskywalker").gsub(/ http.*/,"") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment