danielt998 / HanziToAnki

This is a program that takes a Chinese text as input and converts it to an Anki Deck
MIT License
21 stars 0 forks source link

Introduction

Pass HanziToAnki a file via command-line or GUI, and generate clashcards Anki/Pleco(to-do)/Memrise(to-do) flashcards.

You can generate the flashcards from any Chinese input - a news article you're studying, song lyrics, or even your exported WeChat logs!

Command-line options:

Note if using Gradle, you can do:

./gradlew run --args="<whatever>"

Features:

Please feel free to make suggestions, open/comment on issues, or share code!

Development

Feel free to fork, create branches, and raise PRs.

If you get an error about "Invalid source release", check that echo $JAVA_HOME points to your JDK. We recommend sdkman for setting up Java.

To make a heroku-like local deployment, run:

./gradlew stage
heroku local web

Tests

You can either run tests with IntelliJ, or with ./gradlew test

If gradlew doesn't have permissions, run chmod +x gradlew (or chmod +x gradlew.bat on Windows) in the root of this project.

Code formatting

We run a few automated checks with Github Actions in our PRs. We recommend doing the following before raising a PR:

With the CheckStyle plugin, you can import the repository's google_checks.xml file. The IDE should use this for formatting checks.

License

This project uses a modified version of the CEDICT Chinese dictionary, which can be found here: https://cc-cedict.org/wiki/