vss-devel / zimmer

nodejs ZIM file creator
MIT License
20 stars 6 forks source link
mediawiki openzim zim

zimmer is a package for creating ZIM files from Mediawiki-powered wikis.

The package consists of 2 scripts:

wikizimmer.js unlike to mwoffliner does not depend on the Parsoid and Redis and zimmer.js unlike 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.

Installation

Requirement: node version >= 10.4.0

With npm globally

npm i -g git+https://github.com/vadp/zimmer

or

Manually

    ln -s wikizimmer.js <some directory in $PATH>/wikizimmer
    ln -s zimmer.js <some directory in $PATH>/zimmer

Usage

Run either of scripts with '--help' switch to see the list of all options available.

The process of creating a ZIM file from a wiki consists of 2 parts.

Example:

wikizimmer https://en.wikivoyage.org/wiki/Pisa

will dump all articles from the main name space (aka 0 or '') at the https://en.wikivoyage.org to the directory en.wikivoyage.org. The URL to a particular page is quite important in this case as this page's styling is used as a template for all other pages in the dump, so wikivoyage listings, for example, are rendered correctly at the static page of the dump.

zimmer --optimg en.wikivoyage.org

will pack the content of the en.wikivoyage.org into the en.wikivoyage.org.zim. zimmer.js with --optimg option will recompress the images in the dump to save some space.

Notes: