Skip to main content

Kolibri plugin to add a Zim file viewer

Project description

Kolibri Zim plugin

This is a Kolibri plugin to add a Zim file viewer.

Kolibri Zim plugin showing Wikipedia

Usage

Install a release from pypi:

pip install kolibri-zim-plugin

If you are using Kolibri 0.14.7, upgrade its bundled le-utils to the newest (unstable) version:

pip install git+https://github.com/learningequality/le-utils.git@master --target=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/kolibri/dist --upgrade

Enable the plugin in Kolibri:

kolibri plugin enable kolibri_zim_plugin

Now, Zim content in Kolibri will be rendered using the Zim plugin.

For some example content, try adding the Wikipedia channel, either from Kolibri's user interface (you can use the channel token nurob-nikis) or with a management command:

kolibri manage importchannel network f62db29be20453c4a267132e93a9e602
kolibri manage importcontent network f62db29be20453c4a267132e93a9e602

Development

Getting started

Create a pipenv shell and then install additional dependencies using bootstrap.sh:

pipenv shell
./scripts/bootstrap.sh

Install kolibri-zim-plugin in editable mode:

pip install -e .

To build front end code:

yarn build

Refer to the Usage instructions to upgrade le-utils and enable the plugin.

Submitting changes

Before submitting changes, please be sure to run the pre-commit checks:

pre-commit run

If you can configure git to run these checks automatically:

pre-commit install -f --install-hooks

Creating a release

If you are releasing a new version, use bump-version with with major, minor, or patch. For example:

yarn bump-version patch

This creates a new commit and a git tag. Push this to the remote:

git push
git push --tags

Create a .whl file:

yarn dist

The file will be placed in the dist/ directory.

Finally, upload the .whl file to PyPi:

yarn release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kolibri_zim_plugin-1.2.1-py2.py3-none-any.whl (82.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kolibri_zim_plugin-1.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: kolibri_zim_plugin-1.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 82.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for kolibri_zim_plugin-1.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 943363902afdb604cf930da77ebcfd0fef658078a325cbdf0ac3a7a142d4e84e
MD5 dad37d0049be18978a2c83a9e2e76ff1
BLAKE2b-256 aad185821c4b410d7b1150f08116367b8dbcda8a8aa835f60021a516e4455454

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page