Build your ZIM file

From openZIM
Revision as of 18:41, 30 December 2015 by Kelson (talk | contribs) (→‎zimwriterfs)
Jump to navigation Jump to search

A few tools allow people to create ZIM files.

The Wikipedia Book Creator is the easiest way to create custom ZIM files from Wikipedia

Users

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:
    • Title
    • Description (only a few words)
    • 48x48 PNG logo

Developers

 
An example approach to create a ZIM file

MWoffliner

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 installed is provided here. You might have to update the source code to get the last improvments.

More information are available here.

zimwriterfs

zimwriterfs is a console tool to create ZIM files from a localy stored directory containing a "self-sufficient" HTML content (with pictures, javascript, stylesheets). The result will contain all the files of the local directory compressed and merged in the ZIM file. Nothing more, nothing less. For now, zimwriterfs only works on POSIX compatible systems. You simply need to compile it and run it. The software does not need a lot of resources, but if you create a pretty big ZIM files, then it could take a while to complete. Go to zimwriterfs source code repository.

A virtual machine with zimwriterfs is provided here.

Zimbalaka

Zimbalaka, a web hosted tool which allows to create #Wikipedia ZIM files based on articles selections. More details in this blog post. Here is the source code.

zimwriterdb

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

Wiki2html can be used to prepare static HTML files from a running Mediawiki instance.

See also