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.1.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.1-py3-none-any.whl (5.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mindtouch2zim-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ad3499e634da4ac4fd27d564fb1c939548cc3f074a2c11767e47504cda94b600
MD5 0cceb39d6b80c486347d5ef3b7528a98
BLAKE2b-256 c6528e694ae00972c04349c8acc904619515ebeb19d2741b104c4bd52bd55a3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mindtouch2zim-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: mindtouch2zim-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 586e9cfb2bd1a55e17c0ecd7bab3dd5ffc0c51de649e5091131ddebbd790fd34
MD5 5add77cd23a46bbff2e4994241b79aab
BLAKE2b-256 2463706b5a6efc145b455928313a835c531170ec1a714c0bce57e1e2ca65ba3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mindtouch2zim-0.1.1-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