https://wiki.openzim.org/w/api.php?action=feedcontributions&user=Julianharty&feedformat=atomopenZIM - User contributions [en]2024-03-28T11:02:25ZUser contributionsMediaWiki 1.36.1https://wiki.openzim.org/w/index.php?title=Build_your_ZIM_file&diff=2868Build your ZIM file2017-09-08T08:57:11Z<p>Julianharty: /* Zimbalaka */ I've incorporated the notes from the original author which I found on archive.org. I've provided a link to the archived page too.</p>
<hr />
<div>[[File:Wikipedia-Book-creator.png|right|thumb|The ''[http://en.wikipedia.org/wiki/Special:Book Wikipedia Book Creator]'' is the easiest way to create custom ZIM files from Wikipedia]]<br />
A few ''tools allow people'' to create ZIM files.<br />
<br />
== Users ==<br />
<br />
=== MediaWiki Collection Extension ===<br />
<br />
''Unfortunately this feature was removed. Please subscribe and show your interest on [https://phabricator.wikimedia.org/T73660 this ticket] if you want to see it back].''<br />
<br />
<s><br />
You can create on Wikipedia and all other Wikimedia projects, ZIM files of article selections. [https://en.wikipedia.org/wiki/Special:Book 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.<br />
<br />
The Collection extension can be easily added to any MediaWiki installation:<br />
* [http://www.mediawiki.org/wiki/Extension:Collection Get the extension]<br />
* [http://www.mediawiki.org/wiki/Extension:Collection/openZIM Details on Collection and openZIM]<br />
</s><br />
<br />
=== Ask for a custom ZIM file ===<br />
<br />
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:<br />
* Text file with the list of article titles (one title per line, with underscores, UTF8)<br />
* The URL of the wiki you want to snapshot<br />
* Prepare a welcome page for the ZIM file (on the wiki, and share with us the title of that page)<br />
* ZIM file metadata:<br />
** Title<br />
** Description (only a few words)<br />
** 48x48 PNG logo<br />
<br />
=== Create a ZIM file from existing HTML contents ===<br />
See http://www.openzim.org/wiki/Zimwriterfs_instructions for an overview and read the section below on zimwriterfs for some additional context.<br />
<br />
== Developers ==<br />
[[Image:Schema ZIM File Creation.png|thumb|right|An example approach to create a ZIM file]]<br />
<br />
=== MWoffliner ===<br />
<br />
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.<br />
<br />
A virtual machine with MWoffliner is provided [http://download.kiwix.org/dev/ZIMmaker.ova here]. You might have to update the source code to get the last improvements.<br />
<br />
More information are available [https://github.com/kiwix/mwoffliner here].<br />
<br />
=== zimwriterfs ===<br />
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. <br />
Instructions on how to prepare and use zimwriterfs are here [[zimwriterfs_instructions]]<br />
[https://github.com/wikimedia/openzim/tree/master/zimwriterfs Go to zimwriterfs source code repository].<br />
<br />
A virtual machine with zimwriterfs is provided [http://download.kiwix.org/dev/ZIMmaker.ova here].<br />
<br />
=== Zimbalaka ===<br />
The following descirption is based on the notes published by the original author of Zimbalaka, as they're no longer available on the site they were published on. An archived copy is available on archive.org https://web.archive.org/web/20150531004251/http://www.arunmozhi.in:80/blog/zimbalaka-an-openzim-creator/#content <br />
<br />
Zimbalaka, is designed as a web hosted tool which enables #Wikipedia ZIM files to be created based on articles selections.<br />
<br />
It accepts two types of inputs: a list of pages or a Wikipedia category. Then Zimbalaka downloads those pages, removes all the clutter such as: sidebars, toolbox, edit links, etc., and provides a cleaned version as a ZIM file for download. It can be opened in Kiwix, etc.<br />
<br />
The ZIM is created with a simple welcome page with all the pages as a list of links. <br />
<br />
Zimbalaka has multilingual and multi-site support. That is, you can create a ZIM file from pages of any language of the 280+ existing Wikipedias, and also from sites like WikiBooks, Wiktionary, Wikiversity and such. You can even input any custom url like (<nowiki>http://sub.domain.com/</nowiki>), Zimblaka would add (/wiki/Page_title) to it and download the pages.<br />
<br />
==== Pain points ====<br />
A small pain point is that, Zimbalaka also strips the external references that occur at the end of the Wikipedia articles, as the original author didn’t find these useful content intended to be used in an offline environment.<br />
<br />
You cannot add a custom Welcome page in the zim file. Not a very big priority. The current file does its work of listing all the pages.<br />
<br />
You cannot include pages from multiple sites as a single zim file. The workaround is to create multiple files or use a tool called zimwriterfs, which has to be compiled from source (this is used by zimbalaka behind the scenes).<br />
<br />
==== Developers ====<br />
This tool is written using Flask – A simple Python web framework for the backend, Bootstrap as the frontend and uses the zimwriterfs compiled binary as the workhorse. The zimming tasks are run by Celery, which has been automated by supervisord. All the co-ordination and message passing happens via Redis.<br />
<br />
[https://github.com/tecoholic/Zimbalaka Here is the source code].<br />
<br />
=== zimwriterdb ===<br />
[[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.<br />
<br />
=== Wiki2html ===<br />
[[Wiki2html]] can be used to prepare static HTML files from a running Mediawiki instance.<br />
<br />
===[https://github.com/vadp/zimmer zimmer]===<br />
This package is primarily a tool for creating a ZIM dump from a Mediawiki-based wiki.<br />
<br />
The package consists of 2 scripts:<br />
* '''''wikizimmer.js''''' -- dumps the wiki's articles (name space 0) into a collection of static HTML files.<br />
* '''''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).<br />
<br />
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.<br />
<br />
The package is relatively easy to install and it can even process some wikis running rather old versions of the Mediawiki engine.<br />
<br />
There is also zimmer's counterpart -- [https://github.com/vadp/unzimmer unzimmer]. It unpacks a ZIM file into a directory, which could be useful for some debugging.<br />
<br />
== See also ==<br />
* [[ZIM File Archive]]<br />
* [[Bindings]]<br />
* [[Reader]]</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Zimwriterfs_instructions&diff=2862Zimwriterfs instructions2017-05-09T12:21:27Z<p>Julianharty: /* Configuring and Running Docker */ Added heading for the examples</p>
<hr />
<div>= zimwriterfs instructions =<br />
Here are some notes on how to prepare your materials and use `zimwriterfs`. The notes are incomplete as they're based on my limited experience using the tool in the prebuilt Docker Image. The Docker file is available at https://hub.docker.com/r/openzim/zimwriterfs/ <br />
== Preparations ==<br />
Some considerations can help you prepare your materials<br />
<br />
# Can it be read and navigated in a mainstream web browser e.g. using <code>file://localhost/mycontent</code> (replace mycontent with the correct URL)<br />
# Would you like to use the classic ZIM file internal structures? e.g. <code>./-/</code> for CSS and <code>./A/</code> for articles (in HTML format), etc.? If so, there's no need to use the <code>--uniqueNamespace</code> command-line option. Otherwise please use it.<br />
# Have you identified your welcome page and got a suitable icon?<br />
# Have you created a shared location available to the running Docker image to make the content easier to access by zimwriterfs?[1]<br />
# Would you like to distribute to a large base of users who may use a variety of machines and storage options? If so, it will be important to split the ZIM file into no more than 2GB chunks.<br />
<br />
[1] I added a shared folder so I could easily share data between the running Docker image and my macbook. This had to be configured using the command line. See https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine for tips on how to do this.<br />
<br />
=== Configuring and Running Docker ===<br />
Again some qualifications:<br />
<br />
* I've limited experience in using Docker.<br />
* This worked for me but might need tweaking for others.<br />
* I use Kitematic (available in Docker) to obtain a shell in the running Docker image.<br />
<br />
Here's how to share the current folder with the Docker image. The shared folder is at <code>/Volumes/shared</code> in the running Docker image.<br />
<code><br />
docker run -it -v $(pwd):/Volumes/shared -p 8888:8888 openzim/zimwriterfs<br />
</code><br />
<br />
== Examples of using zimwriterfs ==<br />
<code><br />
zimwriterfs --uniqueNamespace -w index.html -f icon.png -l EN -t "Testing Heuristics" -d "Early cut of the testing heuristics material." -c "Julian Harty" -p "Commercetest Ltd." /Volumes/shared/dist/ /Volumes/shared/th-ln.zim<br />
<br />
zimwriterfs -w index.html -f tess.png -l EN -t "Visions for Teaching and Learning", -d "Sample TESS content: Week 1" -c "Open University" -p "Julian Harty" /Volumes/shared/week_1__visions_for_teaching_and_learning.html/ /Volumes/shared/week1.zim<br />
</code><br />
<br />
== Test the ZIM locally ==<br />
Use at least one reader e.g. a Kiwix app or server to test the ZIM file contains the expected contents. The Welcome page is displayed, CSS is applied, Images appear, etc.<br />
<br />
== Known issues ==<br />
Symlinks to content cause zimwriterfs to abort https://github.com/openzim/libzim/issues/16</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Zimwriterfs_instructions&diff=2861Zimwriterfs instructions2017-05-09T12:19:37Z<p>Julianharty: /* Preparations */ Fixed typo</p>
<hr />
<div>= zimwriterfs instructions =<br />
Here are some notes on how to prepare your materials and use `zimwriterfs`. The notes are incomplete as they're based on my limited experience using the tool in the prebuilt Docker Image. The Docker file is available at https://hub.docker.com/r/openzim/zimwriterfs/ <br />
== Preparations ==<br />
Some considerations can help you prepare your materials<br />
<br />
# Can it be read and navigated in a mainstream web browser e.g. using <code>file://localhost/mycontent</code> (replace mycontent with the correct URL)<br />
# Would you like to use the classic ZIM file internal structures? e.g. <code>./-/</code> for CSS and <code>./A/</code> for articles (in HTML format), etc.? If so, there's no need to use the <code>--uniqueNamespace</code> command-line option. Otherwise please use it.<br />
# Have you identified your welcome page and got a suitable icon?<br />
# Have you created a shared location available to the running Docker image to make the content easier to access by zimwriterfs?[1]<br />
# Would you like to distribute to a large base of users who may use a variety of machines and storage options? If so, it will be important to split the ZIM file into no more than 2GB chunks.<br />
<br />
[1] I added a shared folder so I could easily share data between the running Docker image and my macbook. This had to be configured using the command line. See https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine for tips on how to do this.<br />
<br />
=== Configuring and Running Docker ===<br />
Again some qualifications:<br />
<br />
* I've limited experience in using Docker.<br />
* This worked for me but might need tweaking for others.<br />
* I use Kitematic (available in Docker) to obtain a shell in the running Docker image.<br />
<br />
Here's how to share the current folder with the Docker image. The shared folder is at <code>/Volumes/shared</code> in the running Docker image.<br />
<code><br />
docker run -it -v $(pwd):/Volumes/shared -p 8888:8888 openzim/zimwriterfs<br />
</code><br />
<br />
<code><br />
zimwriterfs --uniqueNamespace -w index.html -f icon.png -l EN -t "Testing Heuristics" -d "Early cut of the testing heuristics material." -c "Julian Harty" -p "Commercetest Ltd." /Volumes/shared/dist/ /Volumes/shared/th-ln.zim<br />
</code><br />
<br />
== Test the ZIM locally ==<br />
Use at least one reader e.g. a Kiwix app or server to test the ZIM file contains the expected contents. The Welcome page is displayed, CSS is applied, Images appear, etc.<br />
<br />
== Known issues ==<br />
Symlinks to content cause zimwriterfs to abort https://github.com/openzim/libzim/issues/16</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Zimwriterfs_instructions&diff=2860Zimwriterfs instructions2017-05-09T12:19:11Z<p>Julianharty: /* Preparations */ Added new section on using Docker</p>
<hr />
<div>= zimwriterfs instructions =<br />
Here are some notes on how to prepare your materials and use `zimwriterfs`. The notes are incomplete as they're based on my limited experience using the tool in the prebuilt Docker Image. The Docker file is available at https://hub.docker.com/r/openzim/zimwriterfs/ <br />
== Preparations ==<br />
Some considerations can help you prepare your materials<br />
<br />
# Can it be read and navigated in a mainstream web browser e.g. using <code>file://localhost/mycontent</code> (replace mycontent with the correct URL)<br />
# Would you like to use the classic ZIM file internal structures? e.g. <code>./-/</code> for CSS and <code>./A/</code> for articles (in HTML format), etc.? If so, there's no need to use the <code>--uniqueNamespace</code> command-line option. Otherwise please use it.<br />
# Have you identified your welcome page and got a suitable icon?<br />
# Have you created a shared location available to the running Docker image to make the content easier to access by zimwriterfs?[1]<br />
# Would you like to distribute to a large base of users who may use a variety of machines and storage options? If so, it will be important to split the ZIM file into no more than 2GB chunks.<br />
<br />
[1] I added a shared folder so I could easily share data between the running Docker image and my macbook. This had to be configured using the command line. See https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine for tips on how to do this.<br />
<br />
=== Configuring and Running Docker<br />
Again some qualifications:<br />
<br />
* I've limited experience in using Docker.<br />
* This worked for me but might need tweaking for others.<br />
* I use Kitematic (available in Docker) to obtain a shell in the running Docker image.<br />
<br />
Here's how to share the current folder with the Docker image. The shared folder is at <code>/Volumes/shared</code> in the running Docker image.<br />
<code><br />
docker run -it -v $(pwd):/Volumes/shared -p 8888:8888 openzim/zimwriterfs<br />
</code><br />
<br />
<code><br />
zimwriterfs --uniqueNamespace -w index.html -f icon.png -l EN -t "Testing Heuristics" -d "Early cut of the testing heuristics material." -c "Julian Harty" -p "Commercetest Ltd." /Volumes/shared/dist/ /Volumes/shared/th-ln.zim<br />
</code><br />
<br />
== Test the ZIM locally ==<br />
Use at least one reader e.g. a Kiwix app or server to test the ZIM file contains the expected contents. The Welcome page is displayed, CSS is applied, Images appear, etc.<br />
<br />
== Known issues ==<br />
Symlinks to content cause zimwriterfs to abort https://github.com/openzim/libzim/issues/16</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Zimwriterfs_instructions&diff=2859Zimwriterfs instructions2017-05-09T07:35:05Z<p>Julianharty: Added known issues section and the known issue I know about :)</p>
<hr />
<div>= zimwriterfs instructions =<br />
Here are some notes on how to prepare your materials and use `zimwriterfs`. The notes are incomplete as they're based on my limited experience using the tool in the prebuilt Docker Image. The Docker file is available at https://hub.docker.com/r/openzim/zimwriterfs/ <br />
== Preparations ==<br />
Some considerations can help you prepare your materials<br />
<br />
# Can it be read and navigated in a mainstream web browser e.g. using <code>file://localhost/mycontent</code> (replace mycontent with the correct URL)<br />
# Would you like to use the classic ZIM file internal structures? e.g. <code>./-/</code> for CSS and <code>./A/</code> for articles (in HTML format), etc.? If so, there's no need to use the <code>--uniqueNamespace</code> command-line option. Otherwise please use it.<br />
# Have you identified your welcome page and got a suitable icon?<br />
# Have you created a shared location available to the running Docker image to make the content easier to access by zimwriterfs?[1]<br />
# Would you like to distribute to a large base of users who may use a variety of machines and storage options? If so, it will be important to split the ZIM file into no more than 2GB chunks.<br />
<br />
[1] I added a shared folder so I could easily share data between the running Docker image and my macbook. This had to be configured using the command line. See https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine for tips on how to do this.<br />
<br />
<code><br />
zimwriterfs --uniqueNamespace -w index.html -f icon.png -l EN -t "Testing Heuristics" -d "Early cut of the testing heuristics material." -c "Julian Harty" -p "Commercetest Ltd." /Volumes/shared/dist/ /Volumes/shared/th-ln.zim<br />
</code><br />
<br />
== Test the ZIM locally ==<br />
Use at least one reader e.g. a Kiwix app or server to test the ZIM file contains the expected contents. The Welcome page is displayed, CSS is applied, Images appear, etc.<br />
<br />
== Known issues ==<br />
Symlinks to content cause zimwriterfs to abort https://github.com/openzim/libzim/issues/16</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Zimwriterfs_instructions&diff=2858Zimwriterfs instructions2017-05-09T07:31:10Z<p>Julianharty: /* zimwriterfs instructions */ Added link to Docker image.</p>
<hr />
<div>= zimwriterfs instructions =<br />
Here are some notes on how to prepare your materials and use `zimwriterfs`. The notes are incomplete as they're based on my limited experience using the tool in the prebuilt Docker Image. The Docker file is available at https://hub.docker.com/r/openzim/zimwriterfs/ <br />
== Preparations ==<br />
Some considerations can help you prepare your materials<br />
<br />
# Can it be read and navigated in a mainstream web browser e.g. using <code>file://localhost/mycontent</code> (replace mycontent with the correct URL)<br />
# Would you like to use the classic ZIM file internal structures? e.g. <code>./-/</code> for CSS and <code>./A/</code> for articles (in HTML format), etc.? If so, there's no need to use the <code>--uniqueNamespace</code> command-line option. Otherwise please use it.<br />
# Have you identified your welcome page and got a suitable icon?<br />
# Have you created a shared location available to the running Docker image to make the content easier to access by zimwriterfs?[1]<br />
# Would you like to distribute to a large base of users who may use a variety of machines and storage options? If so, it will be important to split the ZIM file into no more than 2GB chunks.<br />
<br />
[1] I added a shared folder so I could easily share data between the running Docker image and my macbook. This had to be configured using the command line. See https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine for tips on how to do this.<br />
<br />
<code><br />
zimwriterfs --uniqueNamespace -w index.html -f icon.png -l EN -t "Testing Heuristics" -d "Early cut of the testing heuristics material." -c "Julian Harty" -p "Commercetest Ltd." /Volumes/shared/dist/ /Volumes/shared/th-ln.zim<br />
</code><br />
<br />
== Test the ZIM locally ==<br />
Ue at least one reader e.g. a Kiwix app or server to test the ZIM file contains the expected contents. The Welcome page is displayed, CSS is applied, Images appear, etc.</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Build_your_ZIM_file&diff=2857Build your ZIM file2017-05-09T07:28:07Z<p>Julianharty: /* Users */ Added mention users can create a ZIM file using local contents.</p>
<hr />
<div>[[File:Wikipedia-Book-creator.png|right|thumb|The ''[http://en.wikipedia.org/wiki/Special:Book Wikipedia Book Creator]'' is the easiest way to create custom ZIM files from Wikipedia]]<br />
A few ''tools allow people'' to create ZIM files.<br />
<br />
== Users ==<br />
<br />
=== MediaWiki Collection Extension ===<br />
<br />
''Unfortunately this feature was removed. Please subscribe and show your interest on [https://phabricator.wikimedia.org/T73660 this ticket] if you want to see it back].''<br />
<br />
<s><br />
You can create on Wikipedia and all other Wikimedia projects, ZIM files of article selections. [https://en.wikipedia.org/wiki/Special:Book 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.<br />
<br />
The Collection extension can be easily added to any MediaWiki installation:<br />
* [http://www.mediawiki.org/wiki/Extension:Collection Get the extension]<br />
* [http://www.mediawiki.org/wiki/Extension:Collection/openZIM Details on Collection and openZIM]<br />
</s><br />
<br />
=== Ask for a custom ZIM file ===<br />
<br />
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:<br />
* Text file with the list of article titles (one title per line, with underscores, UTF8)<br />
* The URL of the wiki you want to snapshot<br />
* Prepare a welcome page for the ZIM file (on the wiki, and share with us the title of that page)<br />
* ZIM file metadata:<br />
** Title<br />
** Description (only a few words)<br />
** 48x48 PNG logo<br />
<br />
=== Create a ZIM file from existing HTML contents ===<br />
See http://www.openzim.org/wiki/Zimwriterfs_instructions for an overview and read the section below on zimwriterfs for some additional context.<br />
<br />
== Developers ==<br />
[[Image:Schema ZIM File Creation.png|thumb|right|An example approach to create a ZIM file]]<br />
<br />
=== MWoffliner ===<br />
<br />
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.<br />
<br />
A virtual machine with MWoffliner is provided [http://download.kiwix.org/dev/ZIMmaker.ova here]. You might have to update the source code to get the last improvements.<br />
<br />
More information are available [https://github.com/kiwix/mwoffliner here].<br />
<br />
=== zimwriterfs ===<br />
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. <br />
Instructions on how to prepare and use zimwriterfs are here [[zimwriterfs_instructions]]<br />
[https://github.com/wikimedia/openzim/tree/master/zimwriterfs Go to zimwriterfs source code repository].<br />
<br />
A virtual machine with zimwriterfs is provided [http://download.kiwix.org/dev/ZIMmaker.ova here].<br />
<br />
=== Zimbalaka ===<br />
Zimbalaka, a web hosted tool which allows to create #Wikipedia ZIM files based on articles selections.<br />
<br />
You can give it a try at [http://zimbalaka.openzim.org/ http://zimbalaka.openzim.org/].<br />
<br />
More details in this [http://www.arunmozhi.in/blog/zimbalaka-an-openzim-creator/ blog post]. [https://github.com/tecoholic/Zimbalaka Here is the source code].<br />
<br />
=== zimwriterdb ===<br />
[[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.<br />
<br />
=== Wiki2html ===<br />
[[Wiki2html]] can be used to prepare static HTML files from a running Mediawiki instance.<br />
<br />
===zimmer===<br />
[https://github.com/vadp/zimmer zimmer] is a command line JavaScript (nodejs) ZIM file creator. It's mostly a drop-in replacement for [[#zimwriterfs|zimwriterfs]] with a notable exception: it does't support ''withFullTextIndex'' option so far. Zimmer doesn't depend on [[zimlib]] and there is no need to compile it. That's probably why it could be useful for someone.<br />
<br />
There is also zimmer's counterpart -- [https://github.com/vadp/unzimmer unzimmer]. It unpacks a ZIM file into a directory, which could be useful for some debugging.<br />
<br />
== See also ==<br />
* [[ZIM File Archive]]<br />
* [[Bindings]]<br />
* [[Reader]]</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Zimwriterfs_instructions&diff=2856Zimwriterfs instructions2017-05-09T07:26:07Z<p>Julianharty: /* Preparations */ added tip on creating a shared folder.</p>
<hr />
<div>= zimwriterfs instructions =<br />
Here are some notes on how to prepare your materials and use `zimwriterfs`. The notes are incomplete as they're based on my limited experience using the tool in the prebuilt Docker Image.<br />
== Preparations ==<br />
Some considerations can help you prepare your materials<br />
<br />
# Can it be read and navigated in a mainstream web browser e.g. using <code>file://localhost/mycontent</code> (replace mycontent with the correct URL)<br />
# Would you like to use the classic ZIM file internal structures? e.g. <code>./-/</code> for CSS and <code>./A/</code> for articles (in HTML format), etc.? If so, there's no need to use the <code>--uniqueNamespace</code> command-line option. Otherwise please use it.<br />
# Have you identified your welcome page and got a suitable icon?<br />
# Have you created a shared location available to the running Docker image to make the content easier to access by zimwriterfs?[1]<br />
# Would you like to distribute to a large base of users who may use a variety of machines and storage options? If so, it will be important to split the ZIM file into no more than 2GB chunks.<br />
<br />
[1] I added a shared folder so I could easily share data between the running Docker image and my macbook. This had to be configured using the command line. See https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine for tips on how to do this.<br />
<br />
<code><br />
zimwriterfs --uniqueNamespace -w index.html -f icon.png -l EN -t "Testing Heuristics" -d "Early cut of the testing heuristics material." -c "Julian Harty" -p "Commercetest Ltd." /Volumes/shared/dist/ /Volumes/shared/th-ln.zim<br />
</code><br />
<br />
== Test the ZIM locally ==<br />
Ue at least one reader e.g. a Kiwix app or server to test the ZIM file contains the expected contents. The Welcome page is displayed, CSS is applied, Images appear, etc.</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Zimwriterfs_instructions&diff=2855Zimwriterfs instructions2017-05-09T07:19:25Z<p>Julianharty: Added first draft of instructions for using zimwriterfs</p>
<hr />
<div>= zimwriterfs instructions =<br />
Here are some notes on how to prepare your materials and use `zimwriterfs`. The notes are incomplete as they're based on my limited experience using the tool in the prebuilt Docker Image.<br />
== Preparations ==<br />
Some considerations can help you prepare your materials<br />
<br />
# Can it be read and navigated in a mainstream web browser e.g. using <code>file://localhost/mycontent</code> (replace mycontent with the correct URL)<br />
# Would you like to use the classic ZIM file internal structures? e.g. <code>./-/</code> for CSS and <code>./A/</code> for articles (in HTML format), etc.? If so, there's no need to use the <code>--uniqueNamespace</code> command-line option. Otherwise please use it.<br />
# Have you identified your welcome page and got a suitable icon?<br />
# Have you created a shared location available to the running Docker image to make the content easier to access by zimwriterfs?<br />
# Would you like to distribute to a large base of users who may use a variety of machines and storage options? If so, it will be important to split the ZIM file into no more than 2GB chunks.<br />
<br />
<code><br />
zimwriterfs --uniqueNamespace -w index.html -f icon.png -l EN -t "Testing Heuristics" -d "Early cut of the testing heuristics material." -c "Julian Harty" -p "Commercetest Ltd." /Volumes/shared/dist/ /Volumes/shared/th-ln.zim<br />
</code><br />
<br />
== Test the ZIM locally ==<br />
Ue at least one reader e.g. a Kiwix app or server to test the ZIM file contains the expected contents. The Welcome page is displayed, CSS is applied, Images appear, etc.</div>Julianhartyhttps://wiki.openzim.org/w/index.php?title=Build_your_ZIM_file&diff=2854Build your ZIM file2017-05-09T07:02:01Z<p>Julianharty: /* zimwriterfs */ Added the link, now I need to create that page.</p>
<hr />
<div>[[File:Wikipedia-Book-creator.png|right|thumb|The ''[http://en.wikipedia.org/wiki/Special:Book Wikipedia Book Creator]'' is the easiest way to create custom ZIM files from Wikipedia]]<br />
A few ''tools allow people'' to create ZIM files.<br />
<br />
== Users ==<br />
<br />
=== MediaWiki Collection Extension ===<br />
<br />
''Unfortunately this feature was removed. Please subscribe and show your interest on [https://phabricator.wikimedia.org/T73660 this ticket] if you want to see it back].''<br />
<br />
<s><br />
You can create on Wikipedia and all other Wikimedia projects, ZIM files of article selections. [https://en.wikipedia.org/wiki/Special:Book 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.<br />
<br />
The Collection extension can be easily added to any MediaWiki installation:<br />
* [http://www.mediawiki.org/wiki/Extension:Collection Get the extension]<br />
* [http://www.mediawiki.org/wiki/Extension:Collection/openZIM Details on Collection and openZIM]<br />
</s><br />
<br />
=== Ask for a custom ZIM file ===<br />
<br />
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:<br />
* Text file with the list of article titles (one title per line, with underscores, UTF8)<br />
* The URL of the wiki you want to snapshot<br />
* Prepare a welcome page for the ZIM file (on the wiki, and share with us the title of that page)<br />
* ZIM file metadata:<br />
** Title<br />
** Description (only a few words)<br />
** 48x48 PNG logo<br />
<br />
== Developers ==<br />
[[Image:Schema ZIM File Creation.png|thumb|right|An example approach to create a ZIM file]]<br />
<br />
=== MWoffliner ===<br />
<br />
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.<br />
<br />
A virtual machine with MWoffliner is provided [http://download.kiwix.org/dev/ZIMmaker.ova here]. You might have to update the source code to get the last improvements.<br />
<br />
More information are available [https://github.com/kiwix/mwoffliner here].<br />
<br />
=== zimwriterfs ===<br />
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. <br />
Instructions on how to prepare and use zimwriterfs are here [[zimwriterfs_instructions]]<br />
[https://github.com/wikimedia/openzim/tree/master/zimwriterfs Go to zimwriterfs source code repository].<br />
<br />
A virtual machine with zimwriterfs is provided [http://download.kiwix.org/dev/ZIMmaker.ova here].<br />
<br />
=== Zimbalaka ===<br />
Zimbalaka, a web hosted tool which allows to create #Wikipedia ZIM files based on articles selections.<br />
<br />
You can give it a try at [http://zimbalaka.openzim.org/ http://zimbalaka.openzim.org/].<br />
<br />
More details in this [http://www.arunmozhi.in/blog/zimbalaka-an-openzim-creator/ blog post]. [https://github.com/tecoholic/Zimbalaka Here is the source code].<br />
<br />
=== zimwriterdb ===<br />
[[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.<br />
<br />
=== Wiki2html ===<br />
[[Wiki2html]] can be used to prepare static HTML files from a running Mediawiki instance.<br />
<br />
===zimmer===<br />
[https://github.com/vadp/zimmer zimmer] is a command line JavaScript (nodejs) ZIM file creator. It's mostly a drop-in replacement for [[#zimwriterfs|zimwriterfs]] with a notable exception: it does't support ''withFullTextIndex'' option so far. Zimmer doesn't depend on [[zimlib]] and there is no need to compile it. That's probably why it could be useful for someone.<br />
<br />
There is also zimmer's counterpart -- [https://github.com/vadp/unzimmer unzimmer]. It unpacks a ZIM file into a directory, which could be useful for some debugging.<br />
<br />
== See also ==<br />
* [[ZIM File Archive]]<br />
* [[Bindings]]<br />
* [[Reader]]</div>Julianharty