Build your ZIM file
A few tools allow people to create ZIM files.
MediaWiki Collection Extension
Unfortunately this feature was removed. Please subscribe and show your interest on this ticket if you want to see it back].
You can create on Wikipedia and all other Wikimedia projects, ZIM files of article selections. For example on http://en.wikipedia.org. This is based on the MediaWiki Collection Extension. The Collection extension for MediaWiki provides the ability to select articles and export them in different formats, such as PDF, ODF and ZIM. The main purpose of Collection extension is to create printed books - instead of export you can also choose to have the selected articles printed on demand as a real book.
The Collection extension can be easily added to any MediaWiki installation:
Ask for a custom ZIM file
If you have a deployment project (so, this file is not only for you own personal purpose), you may ask the Kiwix team to create a ZIM file for you. To do that you need to prepare the following information:
- Text file with the list of article titles (one title per line, with underscores, UTF8)
- The URL of the wiki you want to snapshot
- Prepare a welcome page for the ZIM file (on the wiki, and share with us the title of that page)
- ZIM file metadata:
- Description (only a few words)
- 48x48 PNG logo
Create a ZIM file from existing HTML contents
See http://www.openzim.org/wiki/Zimwriterfs_instructions for an overview and read the section below on zimwriterfs for some additional context.
MWoffliner is a tool which allows to "dump" a Wikimedia project (Wikipedia, Wiktionary, ...) to a local storage. It should also work for any Mediawiki instance having parsoid installed. It goes through all articles (or a selection if specified) of the project and write HTML/pictures to your local filesystem.
A virtual machine with MWoffliner is provided here. You might have to update the source code to get the last improvements.
More information are available here.
A virtual machine with zimwriterfs is provided here.
Zimbalaka, a web hosted tool which allows to create #Wikipedia ZIM files based on articles selections.
zimwriterdb is part of the openZIM project. This binary uses a pre-filled Postgres Database and create the corresponding ZIM file; the schema for the database is linked on the main zimwriterdb page.
Wiki2html can be used to prepare static HTML files from a running Mediawiki instance.
This package is primarily a tool for creating a ZIM dump from a Mediawiki-based wiki.
The package consists of 2 scripts:
- wikizimmer.js -- dumps the wiki's articles (name space 0) into a collection of static HTML files.
- zimmer.js -- builds a ZIM file from a static HTML files collection. Historically, zimmer.js is mostly a drop-in replacement for zimwriterfs with a notable exception: it doesn't support withFullTextIndex option (index format is not documented).
The major point is that wikizimmer.js unlikely to mwoffliner doesn't depend on the Parsoid and Redis and zimmer.js unlikely to zimwriterfs doesn't depend on the zimlib.
The package is relatively easy to install and it can even process some wikis running rather old versions of the Mediawiki engine.
There is also zimmer's counterpart -- unzimmer. It unpacks a ZIM file into a directory, which could be useful for some debugging.