Skip to content

Instantly share code, notes, and snippets.

@mashiro
Created November 22, 2013 04:14
Show Gist options
  • Save mashiro/7594783 to your computer and use it in GitHub Desktop.
Save mashiro/7594783 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
filename = ARGV[1] || 'yuiyuinikki_kaomoji.csv'
yomi = ARGV[2] || 'ゆい'
open 'yuiyui.txt', 'w' do |output|
open filename do |input|
input.readlines.each do |s|
row = s.split(',').map { |s| s.strip }
output.write [yomi, row[1], '顔文字', ''].join("\t")
output.write "\n"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment