| Crates.io | wiktionary-zim-trimmer |
| lib.rs | wiktionary-zim-trimmer |
| version | 1.0.2 |
| created_at | 2025-11-19 01:21:25.315533+00 |
| updated_at | 2025-11-20 19:49:29.565789+00 |
| description | A tool for reducing sizes of Wiktionary ZIM archives by filtering languages and removing specified parts of the content |
| homepage | |
| repository | https://codeberg.org/tomekb234/wiktionary-zim-trimmer |
| max_upload_size | |
| id | 1939260 |
| size | 211,447 |
A tool for reducing sizes of Wiktionary ZIM archives by filtering languages and removing specified parts of the content
See the manual for more information.
Wiktionary ZIM files can be downloaded from the Wikimedia downloads page or from the Kiwix Library.
Note that this program only supports the newest Wiktionary ZIM archive and does not guarantee backward compatibility with older ones.
ZIM files can be read with Kiwix, a free and open-source offline web browser.
First, check if this program can be installed with your preferred package manager (if any). If not, you can either build it from source or download a prebuilt version from the releases page.
To use a prebuilt version on Windows, make sure that the latest Visual C++ Redistributable is also installed.
Note: Prebuilt versions are bundled with libzim releases obtained from the libzim downloads page.
To build this program from source, first install the following:
libzim, version 9.4 or any compatible.The source code of this program is distributed on crates.io, and the easiest method of building and installing it is by simply entering the following in the terminal:
cargo install wiktionary-zim-trimmer
You can also obtain the source code from the project's repository. Refer to Cargo manual for build and install instructions.
This program can be used with a command-line interface. See the manual for instructions.
If you have downloaded a prebuilt version from the releases page,
remember to first enter the program's directory in the terminal.
On GNU/Linux, you should then type ./wiktionary-zim-trimmer instead of wiktionary-zim-trimmer.
You can also add the directory to your PATH environment variable to allow running wiktionary-zim-trimmer from any directory
(and in this way de facto installing the program).
Wiktextract is a project aiming to parse whole Wiktionary and provide its content in a formal, machine-readable format. This is very valuable for linguistic research, and it can also be used to generate alternative presentation formats of Wiktionary. Ebook dictionary creator is one such project, using Wiktextract data to generate a presentation format of Wiktionary suitable for ebook readers. You may want to use it instead of wiktionary-zim-trimmer if you prefer to see only word definitions, in a plain and concise format without additional details provided by Wiktionary.
Before writing wiktionary-zim-trimmer, I also used Wiktextract to generate a "trimmed Wiktionary" for personal use, but it was not perfect — Wiktextract does not capture (as of writing this file) all the details that I find interesting (e.g. usage notes), and I guess it is rather awkward to have to reinvent HTML presentation of fully detailed Wiktionary data when Wiktionary itself is presented in HTML in the first place. I considered working with Wikitext, but (properly) rendering it to HTML is too burdensome (requires setting up MediaWiki) and takes too long. Working directly with HTML thus seemed to be the best solution (despite all the risks with this approach), and hence wiktionary-zim-trimmer was born.
This program is released under the GNU General Public License, version 3 or later. See LICENSE for more details.