noinkling / anki-simple-mandarin-ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Mandarin Ruby

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.

Installation

Requirements

  • Python >= 3.3 with pip
  • curl in PATH
    • Windows users: should already be present in recent versions of Windows 10 (curl.exe)

Building

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:

Windows command prompt

py -m pip install -r requirements-dev.txt
build.cmd

Bash / Linux shell

python -m pip install -r requirements-dev.txt
./build

Copying

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.

Licenses

This project's code is licensed under GPLv3.

Dependencies

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.

ruby.svg (the Ruby logo) is licensed under CC BY-SA 2.5.

About

License:GNU General Public License v3.0


Languages

Language:Python 52.0%Language:Batchfile 25.4%Language:Shell 22.6%