Pyglossary on Termux

1. TERMUX INSTALL & SETUP

Install Termux (F-Droid recommended): https://f-droid.org/en/packages/com.termux/

After install:

pkg update && pkg upgrade -y
pkg install -y nano vim curl wget unzip tar

Access main storage

termux-setup-storage

2. SYSTEM DEPENDENCIES

pkg install -y git clang make pkg-config libxml2 libxslt libicu libzim

3. PYTHON & VIRTUAL ENVIRONMENT

pkg install -y python
python3 -m venv pg-env
source pg-env/bin/activate
pip install --upgrade pip
pip install prompt_toolkit

4. PYGLOSSARY INSTALL

pip install pyglossary

5. FEATURE-SPECIFIC DEPENDENCIES

--remove-html-all or FreeDict/XDXF/JMDict/AppleDict/CC-CEDICT

pkg install -y libxml2 libxslt
pip install lxml beautifulsoup4

cc-kedict

pkg install -y libxml2 libxslt
pip install lxml PyYAML

Aard2 (.slob)

pkg install -y libicu
pip install PyICU git+https://github.com/itkach/slob.git

Kobo E-Reader Dictionary

pip install marisa-trie

Zim

pkg install -y libzim
pip install libzim

AppleDict

pkg install -y libxml2 libxslt
pip install lxml beautifulsoup4 html5lib

6. UNIVERSAL DICTIONARY CONVERSION

Syntax:

pyglossary "INPUTFILE" "OUTPUTFILE" --write-format=OUTPUT_FORMAT

Example: StarDict (.ifo) → Slob (.slob)

pyglossary "/storage/emulated/0/dicts/sample.ifo" \
"/storage/emulated/0/dicts/sample.slob" \
--write-format=Slob

Example: StarDict (.ifo) → XDXF (.xdxf)

pyglossary "/storage/emulated/0/dicts/sample.ifo" \
"/storage/emulated/0/dicts/sample.xdxf" \
--write-format=Xdxf

Example: Zim (.zim) → Stardict (.ifo)

pyglossary "/storage/emulated/0/dicts/wiki.zim" \
"/storage/emulated/0/dicts/wiki.ifo" \
--write-format=Stardict

Done! Now you can convert Any → Any dictionary


You'll only receive email when they publish something new.

More from பிரசாந்த்
All posts