An Anki addon that automatically fills card fields with Chinese word definitions, Vietnamese translations, pinyin, and audio pronunciations when you enter Chinese vocabulary.
- Automatic Field Population: Enter Chinese text and automatically get definitions, translations, and pronunciations
- Chinese to Vietnamese Translation: Native support for Chinese-Vietnamese language pairs
- Multiple Data Sources:
- Chinese definitions and explanations
- Vietnamese translations
- Pinyin romanization
- Audio pronunciations
- Configurable Field Mapping: Customize which fields get populated with what data
- Keyboard Shortcuts: Quick activation with
Ctrl+Alt+D - Custom Note Types: Pre-configured templates optimized for Chinese-Vietnamese learning
- Download the latest release from Releases
- In Anki, go to
Tools>Add-ons>Install from file... - Select the downloaded
.ankiaddonfile - Restart Anki
After installation:
- Go to
Tools>Add-ons - Select "AutoDefine Chinese-Vietnamese"
- Click
Configto customize:- Field mappings
- Translation sources
- Keyboard shortcuts
- Cache settings
- Create or edit a card with Chinese vocabulary
- Enter Chinese text in your designated input field
- Press
Ctrl+Alt+Dor use the auto-trigger feature - Watch as definitions, translations, and pronunciations are automatically filled
Default field configuration:
- Chinese: Source vocabulary field
- Vietnamese: Vietnamese translation
- Pinyin: Romanized pronunciation
- Audio: Pronunciation audio file
- Python 3.12+
- Anki 25.09.x
uvfor dependency managementjustfor running tasks
git clone https://github.com/yourusername/autodefine-cn-vn.git
cd autodefine-cn-vn
just install # Installs dependencies with uvSee the justfile for all available commands. Most commonly used:
just test # Run tests
just lint # Check code style
just format # Format code
just fix # Auto-fix lint and format issues
just ci # Run full CI pipeline (format, lint, test)
just link-to-anki # Set up addon for development testing (macOS)
just run-anki-macos # Run Anki on macosjust link-to-anki # Builds and symlinks to Anki's addon folderThis command will automatically build the addon and create a symlink to Anki's addon directory.
After making code changes, run just link-to-anki again and restart Anki to test your changes.
To iterate quickly on your changes, you should symlink the addon to Anki's addon folder. The manual testing cycle then becomes: make code changes, rebuild, restart Anki, and test.
Steps:
-
Find where Anki stores addons: Open Anki > Tools > Add-ons > View Files
-
Build the addon and create a symlink:
# Build the addon (includes vendored dependencies) just build # Create symlink (example paths - adjust for your system) ln -s $HOME/workplace/autodefine-cn-vn/build/autodefine_cn_vn \ $HOME/.local/share/Anki2/addons21/autodefine_cn_vn
Create a "Test" profile for safer testing, then run Anki from terminal to see debug output:
just run-anki-macos- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Inspired by AutoDefine Oxford Learners Dictionaries
- Built for the Anki spaced repetition system
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues or have suggestions:
- Open an Issue
- Check the Wiki for troubleshooting
- Join discussions in Discussions
Note: This addon is currently under development. Please report any bugs or feature requests through GitHub Issues.