Takes CC-CEDICT Chinese-English dictionary, converts it to StarDict format, specifically for use with Koreader / sdcv. Aimed to fix koreader#9907.
First time using Rust!
Needs cargo
.
cargo run
# cedict.csv created, turn it into stardict format
penelope -i cedict.csv -j csv --csv-fs "\t" --csv-ls "\n\n" -f cn -t en -p stardict -o cedict.zip --merge-definitions --merge-separator "\n" -d --title "CC-CEDICT 汉英词典"
unzip cedict.zip
Test that it worked:
sdcv --utf8-input --utf8-output --data-dir . -c -e 我
sdcv --utf8-input --utf8-output --data-dir . -c -e -n --json 跑步
Both of those should give correct definitions.
- Have
cargo test
check thatsdcv
gives the correct output. - HTML output
- Monthly releases? (via GitHub Actions)