Skip to main content

Turn StackExchange dumps into ZIM files for offline usage

Project description

Sotoki

Sotoki (Stack Overflow to Kiwix) is an openZIM scraper to create offline versions of Stack Exchange websites such as Stack Overflow.

It is based on Stack Exchange's Data Dumps hosted by The Internet Archive.

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

Usage

Sotoki works off a domain that you must provide. That is the domain-name of the stackexchange website you want to scrape. Run sotoki --list-all to get a list of those

Docker

docker run -v my_dir:/output ghcr.io/openzim/sotoki sotoki --help

Installation

sotoki is a Python3 software. If you are not using the Docker image, you are advised to use it in a virtual environment to avoid installing software dependencies on your system.

python3 -m venv ./env  # creates a virtual python environment in ./env folder
./env/bin/pip install -U pip  # upgrade pip (package manager). recommended
./env/bin/pip install -U sotoki  # install/upgrade sotoki inside virtualenv

# direct access to in-virtualenv sotoki binary, without shell-attachment
./env/bin/sotoki --help
# alias or link it for convenience
sudo ln -s $(pwd)/env/bin/sotoki /usr/local/bin/

# alternatively, attach virtualenv to shell
source env/bin/activate
sotoki --help
deactivate  # unloads virtualenv from shell

Developers

Anybody is welcome to improve the Sotoki.

To run Sotoki off the git repository, you'll need to download a few external dependencies that we pack in Python releases. Just run python src/sotoki/dependencies.py.

See requirements.txt for the list of python dependencies.

Users

You don't have to make your own ZIM files of Stack Exchange's Web sites. Updated ZIM files are built on a regular basis for all of them. Look at https://library.kiwix.org/?category=stack_exchange to download them.

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

sotoki-2.1.1.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

sotoki-2.1.1-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file sotoki-2.1.1.tar.gz.

File metadata

  • Download URL: sotoki-2.1.1.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sotoki-2.1.1.tar.gz
Algorithm Hash digest
SHA256 13d8d21bb97984099e961fbe16f96ea731d87d8cbdcf9a7f0e36a4f61bdec1fd
MD5 dec2b7101b6054457ca7ab1d5feb3634
BLAKE2b-256 fba2004bdf8103afe00e35fb6f1724efcc3e24fe4f05cca3ad449508bb391d84

See more details on using hashes here.

File details

Details for the file sotoki-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: sotoki-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for sotoki-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef0384492ed7bcc5d3810df4451c1faae60596658f355129bd0d7f987662d3da
MD5 3823f01bcf317bc5709ac98683f16eb8
BLAKE2b-256 1900dcde22b242e14da7084c0c49164f483f3d4130c65692b90860920a86237f

See more details on using hashes here.

Supported by

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