Skip to main content

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.

Metadata

Release files for mindtouch2zim 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mindtouch2zim 0.1.1
File Size Uploaded Provenance Actions
mindtouch2zim-0.1.1.tar.gz 5.3 MB With provenance Details for mindtouch2zim-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mindtouch2zim 0.1.1
File Interpreter ABI Platform Actions
mindtouch2zim-0.1.1-py3-none-any.whl Python 3 none any Details for mindtouch2zim-0.1.1-py3-none-any.whl

Total release size: 10.6 MB

Release files / mindtouch2zim-0.1.1.tar.gz

Download URL mindtouch2zim-0.1.1.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ad3499e634da4ac4fd27d564fb1c939548cc3f074a2c11767e47504cda94b600
BLAKE2b-256 checksum
How to use checksums
c6528e694ae00972c04349c8acc904619515ebeb19d2741b104c4bd52bd55a3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 14, 2025.

Transparency log

Release files / mindtouch2zim-0.1.1-py3-none-any.whl

Download URL mindtouch2zim-0.1.1-py3-none-any.whl
Size 5.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
586e9cfb2bd1a55e17c0ecd7bab3dd5ffc0c51de649e5091131ddebbd790fd34
BLAKE2b-256 checksum
How to use checksums
2463706b5a6efc145b455928313a835c531170ec1a714c0bce57e1e2ca65ba3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 14, 2025.

Transparency log

Security for mindtouch2zim 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mindtouch2zim-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 14, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page