Difference between revisions of "Build your ZIM file"

From openZIM
Jump to navigation Jump to search
m (Fixed typos and added clarification)
Line 1: Line 1:
[[Image:Schema ZIM File Creation.png|500px|right]]
[[Image:Schema ZIM File Creation.png|500px|right]]
There is currently only one binary to build a ZIM file, the [[ZIMwriter]]. This binary uses a pre-filled Postgres Database with a [http://svn.openzim.org/viewvc.cgi/trunk/zimwriter/db/zim-postgresql.sql?view=markup predefined scheme]. For example :
 
== 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.
 
* Get the extension here: http://www.mediawiki.org/wiki/Extension:Collection
* Details on Collection and openZIM: http://www.mediawiki.org/wiki/Extension:Collection/openZIM
 
== ZIM Writer ==
<tt>zimwriter</tt> is part of the openZIM software package that can be downloaded here: [[Releases]].
 
This binary uses a pre-filled Postgres Database with a [http://svn.openzim.org/viewvc.cgi/trunk/zimwriter/db/zim-postgresql.sql?view=markup predefined scheme]. For example :


<source lang="bash">
<source lang="bash">
Line 11: Line 23:
One tool is currently able to create/fill this database:
One tool is currently able to create/fill this database:


== buildZimFileFromDirectory.pl ==
=== buildZimFileFromDirectory.pl ===
This [http://kiwix.svn.sourceforge.net/viewvc/kiwix/dumping_tools/scripts/buildZimFileFromDirectory.pl?view=markup script] is part of the [http://www.kiwix.org/index.php/Tools Kiwix tools] and allows to build a ZIM file from a HTML directory containing all necessary ressources.  
This [http://kiwix.svn.sourceforge.net/viewvc/kiwix/dumping_tools/scripts/buildZimFileFromDirectory.pl?view=markup script] is part of the [http://www.kiwix.org/index.php/Tools Kiwix tools] and allows to build a ZIM file from a HTML directory containing all necessary ressources.  



Revision as of 07:27, 10 March 2011

Schema ZIM File Creation.png

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.

ZIM Writer

zimwriter is part of the openZIM software package that can be downloaded here: Releases.

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