Build your ZIM file

From openZIM
Revision as of 22:58, 23 September 2009 by Ijon (talk | contribs) (Fixed typos and added clarification)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Schema ZIM File Creation.png

There is currently only one binary to build a ZIM file, the ZIMwriter. This binary uses a pre-filled Postgres Database with a predefined scheme. For example :

zimwriter -s 1024 
  --db "postgresql:dbname=mydb" my_zim_file

We want to provide in the future a binary able to work with other input (for example: Wikimedia Foundation XML dumps, or HTML directory).

One tool is currently able to create/fill this database:

buildZimFileFromDirectory.pl

This script is part of the Kiwix tools and allows to build a ZIM file from a HTML directory containing all necessary ressources.

You need:

  1. Checkout the dumping tools : svn co http://kiwix.svn.sourceforge.net/viewvc/kiwix/dumping_tools/
  2. Install all necessary Perl modules
  3. run the script like following: ./buildZimFileFromDirectory.pl --htmlPath=./html [--indexerPath=./zimindexer] [--zimFilePath=articles.zim]

Wiki2html

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

See also