Skip to main content

Make ZIM file from Mindtouch / Nice CXone Expert libraries

Project description

Mindtouch scraper

This scraper transform content on a Mindtouch / Nice CXone Expert instance into a in ZIM file, a clean and user friendly format for storing content for offline usage.

While meant to be generic for any Mindtouch instance, it has so far been tested only on libretexts.org instance, so it is highly expectable some rough edges might need to be polished until it works on all Mindtouch instance.

CodeFactor License: GPL v3 codecov PyPI version shields.io PyPI - Python Version Docker

Installation

There are three main ways to install and use mindtouch2zim from most recommended to least:

Install using a pre-built container
  1. Download the image using docker:

    docker pull ghcr.io/openzim/mindtouch
    
Build your own container
  1. Clone the repository locally:

    git clone https://github.com/openzim/mindtouch.git && cd mindtouch
    
  2. Build the image:

    docker build -t ghcr.io/openzim/mindtouch .
    
Run the software locally using Hatch
  1. Clone the repository locally:

    git clone https://github.com/openzim/mindtouch.git && cd mindtouch
    
  2. Install Hatch:

    pip3 install hatch
    
  3. Start a hatch shell to install software and dependencies in an isolated virtual environment.

    hatch shell
    
  4. Run the mindtouch2zim command:

    mindtouch2zim --help
    

Usage

# Get help
docker run -v output:/output ghcr.io/openzim/mindtouch mindtouch2zim --help
# Create a ZIM for https://geo.libretexts.org
docker run -v output:/output ghcr.io/openzim/mindtouch mindtouch2zim --library-url https://geo.libretexts.org --name libretexts.org_en_geo --creator LibreTexts --title "LibreTexts Geosciences" --description "Geosciences courses from libretexts.org"

Developing

Use the commands below to set up the project once:

# Install hatch if it isn't installed already. pip install hatch

# Local install (in default env) / re-sync packages hatch run pip list

# Set-up pre-commit pre-commit install

The following commands can be used to build and test the scraper:

# Show scripts hatch env show

# linting, testing, coverage, checking hatch run lint:all
❯ hatch run lint:fixall

# run tests on all matrixed' envs hatch run test:run

# run tests in a single matrixed' env hatch env run -e test -i py=3.12 coverage

# run static type checks hatch env run check:all

# building packages hatch build

Contributing

This project adheres to openZIM's Contribution Guidelines.

This project has implemented openZIM's Python bootstrap, conventions and policies v1.0.3.

See details for contributions in CONTRIBUTING.md.

Project details


Download files

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

Source Distribution

mindtouch2zim-0.1.0.tar.gz (5.3 MB view details)

Uploaded Source

Built Distribution

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

mindtouch2zim-0.1.0-py3-none-any.whl (5.4 MB view details)

Uploaded Python 3

File details

Details for the file mindtouch2zim-0.1.0.tar.gz.

File metadata

  • Download URL: mindtouch2zim-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mindtouch2zim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc321a3f725e2071a649d1d6f68af4c03fe928c4fed3ee1f3c5eba0503eb7bd5
MD5 775a3c9df6039f5fe96daca297942ffd
BLAKE2b-256 c3e114402c252f593df4ed4bc9c271aef271341b0c19a0a2f1e59d1055d720d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mindtouch2zim-0.1.0.tar.gz:

Publisher: Publish.yml on openzim/mindtouch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mindtouch2zim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mindtouch2zim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mindtouch2zim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4313329006287cc421705ee527f9da313c85905156f8f683e54802efd42d1c77
MD5 dc93383705f601deae72d139253328dc
BLAKE2b-256 7df0206b5973cf842b680fba56505045e3bc3de5f079681338a8c64f7850aa4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mindtouch2zim-0.1.0-py3-none-any.whl:

Publisher: Publish.yml on openzim/mindtouch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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