8 Oct
2008
8 Oct
'08
10:53 p.m.
On Wed, Oct 8, 2008 at 2:41 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
I would like to be able to do things like
Mohamed -> Muḥammad
Before you get the mkiv code you can start collecting wrong words :) Mojca usage: ruby scriptname.rb < input.tex > output.tex #!/usr/bin/env ruby subs_hash = { "Mohamed" => "Muḥammad", "Idris" => "ادريس", } while line = STDIN.gets subs_hash.each do |key,value| line.gsub!(Regexp.new(key), value) end puts line end