Any kind of contributions are welcome, especially for adding support for more dictionaries or improving existing ones.
Extracting information from the ZIM files involves parsing the HTML content.
See greek.py
for an example of how it's done for Greek. After you add a new file for your language under the dictionaries
subfolder, simply add the class name to the parsers list in dictionaries/__init__.py
and you're good to go!
The add-on is packaged using a Makefile. To build the add-on and test your changes:
- Install requirements:
pip install -r requirements.txt
. - Run
make zip
to producebuild/zim_reader.ankiaddon
. This will also generate the PyQt forms under src/forms. - You can then either extract the zip to your add-ons folder or symlink the src folder.
If you want to contribute some changes, also making sure to do the following is appreciated:
- Run
make check
to check for various lint warnings. - Fix any formatting issues automatically using
make fix
. - Fix any Mypy and Pylint errors caused by your changes manually.
The add-on was written with the intention to provide other add-ons access to its functionality in mind. See how this is done in my fork of the Create subs2srs cards with mpv add-on.
TODO: document the interface.