diff --git a/README.md b/README.md index 54da865..d8a0b65 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Mandarin Anki -A janky way to generate anki cards for mandarin +A janky card adder for ankiconnect and traditional chinese ## Dependencies -* genanki * wxpython +* anki needs to be running with ankiconnect installed ## Running diff --git a/main.py b/main.py index 299b71a..de0714b 100644 --- a/main.py +++ b/main.py @@ -66,9 +66,10 @@ pinyinToneMarks = { def convert_pinyin_callback(match): tone= int(match.group(3)) vowel = match.group(1) + # the 5th tone is neutral if tone == 5: - return match + return match.group(0).replace('5', '') # for multiple vowels, use first one if it is a/e/o, otherwise use second one pos=0