Skip to content

Instantly share code, notes, and snippets.

@mewlist
Created November 8, 2017 01:41
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 mewlist/f018bf41b916937aeb0875f65343c76f to your computer and use it in GitHub Desktop.
Save mewlist/f018bf41b916937aeb0875f65343c76f to your computer and use it in GitHub Desktop.
漢直のキーストロークを探す
#!/usr/bin/ruby
puts ARGV[0] + ": " +
ARGV[0].split(//).map{|c|
open("google-ime_tutc_my.utf.txt").read.split("\n")
.inject({}){|acc, line|
lambda{|v| acc[v.last] = v.first }.call line.split
acc
}[c]
}.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment