mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
make kakasi cmd more easily customizable
This commit is contained in:
parent
f47afc3ebf
commit
6ffa8cd191
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue