Ruby與輸入法的第一步:用Ruby撰寫OpenVanilla filter模組
OpenVanilla momizi 更詳細的原始程式碼在這裡):
class OVOFRubyFilter
def process(str)
# do some brain-dead, 火星文-style substituion
str.gsub!(/ㄅ/, "吧")
str.gsub!(/ㄇ/, "嗎")
# fix lukhnos's typo
str.gsub!(/開摧/, "開催")
# ...
# returns the string
str
end
end
編譯方法
lukhnos :: Jul.01.2007 :: tekhnologia 技術或者藝術 :: 3 Comments »make ; sudo make install