Skip to main content

turns a collection of documents into a browsable ZIM file

Project description

Nautilus

CodeFactor License: GPL v3 PyPI version shields.io

nautilus turns a collection of documents into a browsable ZIM file.

It downloads the video (webm or mp4 format – optionnaly recompress them in lower-quality, smaller size), the thumbnails, the subtitles and the authors' profile pictures ; then, it create a static HTML files folder of it before creating a ZIM off of it.

Preparing the archive

To be used with nautilus, your archive should be a ZIP file.

  • it doesn't need to be structured, but it can.
  • it doesn't need to be compressed. It's usually recommended not to.
  • it should contain a collection.json file, but not required (see bellow).
  • it should only contain to-be-included files. No filtering is done.
  • Audio and video files should be in ogg format with .ogg/.ogv extension to be supported on all platform (mp3/mp4 would work only on platform with native support).
cd content/path
zip -r -0 -T ../content_name.zip *

JSON collection file

Either inside the archive ZIP as /collection.json or elsewhere, specified via --collection mycollection.json, you must supply a JSON file describing your content.

The user-interface only gives access to files referenced properly in the collection.

At the moment, the JSON files needs to provide the following fields for each item in an Array:

[
    {
        "title": "...",
        "description": "...",
        "authors": "...",
        "files": ["relative/path/to/file"]
     }
]

Requirements

  • zimwriterfs for ZIM file packaging. Use --no-zim to skip this step.
  • wget and unzip to install JS dependencies. See get_js_deps.sh if you want to do it manually.
  • wget is used to download archive files as well.

Installation

nautilus is a python program. if you are not using the docker image, you are advised to use it in a virtualenv. See requirements.txt for the list of python dependencies.

docker

docker run -v my_dir:/output openzim/nautilus nautiluszim --help

pip

pip install nautiluszim
nautiluszim --help

Usage

nautiluszim --archive my-content.zip

Notes

  • On macOS, the locale setting is buggy. You need to launch it with LANGUAGE environment variable (as ISO-639-1) for the translations to work.
LANGUAGE=fr nautiluszim --language fra

Development

See 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

nautiluszim-1.0.1.tar.gz (3.9 MB view details)

Uploaded Source

Built Distribution

nautiluszim-1.0.1-py3-none-any.whl (4.2 MB view details)

Uploaded Python 3

File details

Details for the file nautiluszim-1.0.1.tar.gz.

File metadata

  • Download URL: nautiluszim-1.0.1.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0

File hashes

Hashes for nautiluszim-1.0.1.tar.gz
Algorithm Hash digest
SHA256 291f9dd757e19c9ea8bd1662b2707d2c8616c21a1d67cd6572634f528501f97c
MD5 adf812ec2ac13c21d7d64b486540bd81
BLAKE2b-256 d6058cbca3a562f8ab60fa12a0720c1eb9c4c4d60e92a02a21bd754eca8bae35

See more details on using hashes here.

File details

Details for the file nautiluszim-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: nautiluszim-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0

File hashes

Hashes for nautiluszim-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 69d615d197ea8c5b74c5c0e7e3baa429d2200869866b575264d2ff9f5a2b46ed
MD5 6d85cddacd113897338c6568c94ea363
BLAKE2b-256 4f32aeab29caa4f4fad8549f963ea224a4192c81b68e1374a231d9797f4bb4e1

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