Skip to content

Instantly share code, notes, and snippets.

@ishideo
Last active February 18, 2019 06:43
Show Gist options
  • Select an option

  • Save ishideo/d5002f7c25a28a4eaa98f59e77b90525 to your computer and use it in GitHub Desktop.

Select an option

Save ishideo/d5002f7c25a28a4eaa98f59e77b90525 to your computer and use it in GitHub Desktop.
for windows
# -*- coding: utf-8 -*-
require_relative 'hepburn-romanization'
class Roman
def initialize(txt)
@arg = txt
end
def to_romaji
HepburnRomanization.to_romaji(@arg)
end
end
if $PROGRAM_NAME == __FILE__
txt = ARGV[0].encode('utf-8')
output = Roman.new(txt)
puts output.to_romaji
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment