Debug your ZIM file

From openZIM
Revision as of 15:52, 8 April 2025 by Benoit74B (talk | contribs) (Created page with "Thanks to the Zimdump tool, you can inspect the content of a ZIM file. ===Inspect metadata=== For instance to inspect the Name metadata of your <code>tests_en_test1_2025...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Thanks to the Zimdump tool, you can inspect the content of a ZIM file.

Inspect metadata

For instance to inspect the Name metadata of your tests_en_test1_2025-04.zim:

zimdump --ns M --url Name tests_en_test1_2025-04.zim

You can also export the illustration:

zimdump --ns M --url Illustration_48x48@1 tests_en_test1_2025-04.zim > tests_en_test1_2025-04.png

Inspect Xapian indexes

As of libzim 7 to 9, ZIM files contains two Xapian indexes: one for title search (also called suggestion search) and one for full text search.

You can extract these indexes as raw file and inspect them with Xapian delve tool:

zimdump show --ns=X --url="fulltext/xapian" tests_en_test1_2025-04.zim > tests_en_test1_2025-04.fulltext.xapian
xapian-delve tests_en_test1_2025-04.fulltext.xapian

or

zimdump show --ns=X --url="title/xapian" tests_en_test1_2025-04.zim > tests_en_test1_2025-04.title.xapian
xapian-delve tests_en_test1_2025-04.title.xapian

Simulate searches

Note that you might be interested as well into zimsearch (included in zim-tools as well) to simulate searches