From 6ffa8cd191aca05d750532c87ca16efb68f8b905 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 6 Jun 2009 23:51:58 +0900 Subject: [PATCH] make kakasi cmd more easily customizable --- anki/features/japanese.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anki/features/japanese.py b/anki/features/japanese.py index dae3819e1..d8c75ee4f 100644 --- a/anki/features/japanese.py +++ b/anki/features/japanese.py @@ -10,6 +10,7 @@ from anki.hooks import addHook modelTag = "Japanese" srcField = "Expression" dstField = "Reading" +kakasiCmd = "kakasi -isjis -osjis -u -f -s -JH -p" class KakasiController(object): def __init__(self): @@ -46,7 +47,7 @@ class KakasiController(object): from errno import ENOENT raise OSError(ENOENT, 'Kakasi not available') # don't convert kana to hiragana - p = Popen("kakasi -isjis -osjis -u -f -s -JH -p", shell=True, + p = Popen(kakasiCmd, shell=True, bufsize=-1, stdin=PIPE, stdout=PIPE) (self.kin, self.kout) = (p.stdin, p.stdout) self._open = True