Basic Anki addon for annotating Chinese characters with pinyin ruby text in an ad-hoc manner.
Uses pypinyin with a more comprehensive phrase dictionary to try and get better results.
In early stages so functionality is very basic:
- Designed to work only on plain, unformatted text. May remove or mess up existing formatting.
- Ruby markup is character by character, which has the side-effect of making multi-character word selection a pain.
- No customization options like numbered tones / bopomofo / colours / bracketed output.
- No included functionality for overwriting/removing existing ruby. Anki's built-in undo should at least work though.
- Only tested on Anki 2.1.40.
- Not available on AnkiWeb.
- Python >= 3.3 with pip
curl
inPATH
- Windows users: should already be present in recent versions of Windows 10 (
curl.exe
)
- Windows users: should already be present in recent versions of Windows 10 (
Note: Currently only one build dependency needs installing (vendorize
), but you may prefer to create and activate a Python virtual environment first anyway.
From the repo's root directory run the appropriate commands:
py -m pip install -r requirements-dev.txt
build.cmd
python -m pip install -r requirements-dev.txt
./build
Assuming the build succeeds, copy (or symlink) the src
directory to your Anki addon directory and rename it to simple-mandarin-ruby
or something else appropriate.
This project's code is licensed under GPLv3.
pypinyin code is licensed under the MIT License.
Character pinyin data is partially derived from the Unihan Database (license) and ZDIC (public domain / CC0).
Phrase pinyin data is partially derived from CC-CEDICT (licensed under CC BY-SA 4.0) and ZDIC.