Skip to content

Instantly share code, notes, and snippets.

@yoshiori
Created July 25, 2012 11:08
Show Gist options
  • Save yoshiori/3175564 to your computer and use it in GitHub Desktop.
Save yoshiori/3175564 to your computer and use it in GitHub Desktop.
$ruby yomikata.rb 2 yomikata シーサーフ
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
require 'net/http'
def increment(word,pronounce)
http = Net::HTTP.new('yomikata.org')
response = http.post('/ajax/vote.php', "pronounce=#{pronounce}&word=#{word}", 'User-Agent' => '[email protected]')
puts "increment #{pronounce}/#{word}"
end
def main()
ARGV[0].to_i.times do
increment(ARGV[1],ARGV[2])
sleep 1
end
end
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment