jdlorimer / chinese-support-redux

Anki add-on providing support for Chinese study
https://ankiweb.net/shared/info/1128979221
GNU General Public License v3.0
100 stars 50 forks source link

Add a tone number Pinyin field #56

Open PandaScience opened 5 years ago

PandaScience commented 5 years ago

Is your feature request related to a problem? Please describe. I just started out learning Mandarin last week and immediately found Anki and your really great chinese-support addon. Thanks for maintaining! I also bought the Hanping Pro dictionary app on Android which I think has some really nice sound database. However, as far as I can see you can only combine Anki+Hanping using sth. like

<a href='android-app://com.embermitre.hanping.app.pro#Intent;action=com.hanpingchinese.cmn.intent.action.PLAY;S.p={{text:Pinyin}};S.s={{text:Simplified}};S.t={{text:Traditional}};S.LANG=cmn;S._SOURCE=anki;end'>

in cards, where S.p seems to be the important part for it to work. Unfortunately, it only takes pinyin in numbered form.

Describe the solution you'd like Could you please add to config.json another field, e.g. NumPinyin, that will be filled with the corresponding numbered pinyin instead of the one with converted tone markings? That would also be helpful for cards with {{type:NumPinyin}} when learning with "simple" keyboards.

I would do it myself and provide a pull request, but because of lack of documentation it's somehow hard to go through your code.

Describe alternatives you've considered Writing a JavaScript converter in each card's code.

jdlorimer commented 5 years ago

On the face of it, I think this would be straightforward to add. Give me a few days.

jdlorimer commented 4 years ago

Or months.

PandaScience commented 2 years ago

Or years :laughing:

PandaScience commented 2 years ago

I just started with anki/chinese again this week and found this old issue. Had some free time today and gave it a shot. Seems to work, at least for my purpose :wink: (PR #206)