Zhudi is a GTK4 graphical interface to the EDICT dictionaries. The following ones are included by default:
- Traditional & Simplified Chinese characters;
- Zhuyin & Pinyin pronunciation;
- Display of shape-based input methods: cangjie5/倉頡5, array30/行列30, wubi86/五筆86;
- Runs entirely locally on your own device;
- Follows the XDG spec.
Since this project is written in Python 3.10+ & GTK4, it should be able to run on any given platform. However, I only have tested it under GNU/Linux (Gnome).
In order to run Zhudi, you need the following packages:
- python 3.10+
- python-gobject
- pygobject-devel
- gobject-introspection
You also need to have GTK 4 installed.
Zhudi can be installed using python's package manager pip as follows:
pip install git+https://github.com/Jiehong/Zhudi
Run it by running the zhudi python module in the directory you installed it from:
cd /path/to/zhudi
python -m zhudiYou should see the GUI up and running:
Locally, you can use poetry.
First time:
poetry installThen:
poetry run python -m zhudiYou also have access to a limited command line search as follows:
$ zhu 我
我 ㄨㄛˇ I
⇾ me
Unlike the GUI, this only provides the first and best match so far.
dict_test.u8 is used to test the splitting of the dictionary, and then for the rest of the unittests.
First, test that splitting the dictionary is working well:
poetry run python test_cli.pyThen, test the rest of the units:
poetry run python -m unittestSource files are formatted with black:
poetry run python -m black zhudi && poetry run python -m black testsDownload any EDICT dictionary with the *.u8 format, and modify db_fill.py to read it.
Then run:
poetry run python db_fill.py