nautiluszim


Namenautiluszim JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
Summaryturns a collection of documents into a browsable ZIM file
upload_time2024-05-25 17:25:11
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.11
licenseGPL-3.0-or-later
keywords offline openzim zim
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Nautilus

`nautilus` turns a collection of documents into a browsable [ZIM file](https://openzim.org).

[![CodeFactor](https://www.codefactor.io/repository/github/openzim/nautilus/badge)](https://www.codefactor.io/repository/github/openzim/nautilus)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![codecov](https://codecov.io/gh/openzim/nautilus/branch/main/graph/badge.svg)](https://codecov.io/gh/openzim/nautilus)
[![PyPI version shields.io](https://img.shields.io/pypi/v/nautiluszim.svg)](https://pypi.org/project/nautiluszim/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nautiluszim.svg)](https://pypi.org/project/nautiluszim)
[![Docker](https://ghcr-badge.deta.dev/openzim/nautilus/latest_tag?label=docker)](https://ghcr.io/openzim/nautilus)

It downloads the video (webm or mp4 format – optionally recompress it in lower-quality, smaller size), the thumbnails, the subtitles and the authors' profile pictures ; then, it creates 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 it can also be provided separately (see below).
* it should only contain to-be-included files. No filtering is done.
* Audio and video files should be in ogg format with an `.ogg`/`.ogv` extension to be supported on all platforms (`mp3`/`mp4` would work only on platforms 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 file needs to provide the following fields for each item in an array:

```json
[
    {
        "title": "...",
        "description": "...",
        "authors": "...",
        "files": ["relative/path/to/file"]
    },
    {
        "title": "...",
        "description": "...",
        "authors": "...",
        "files": [
            {
                "archive-member": "01 BOOK for printing .pdf",  // optional, member name inside archive (same as simpler format)
                "url": "http://books.com/310398120.pdf",  // optional, has precedence over `archive-member`, url to download file from
                "filename": "My book.pdf",  // optional, filename to use in ZIM, regardless of original one
            }
        ]
    }
]
```

## About page

Either inside the archive ZIP as `/about.html` or elsewhere, specified via `--about myabout.html`,

- You may supply an about page in HTML format. It will be displayed in a modal popup and will be included.
- At its bottom your *secondary-logo* if provided.

* Use only content tags (no `<html />` nor `<head />` nor `<script />` etc)
* Use inline styling if required, but no styling is recommended.
* Include one logo inline if required.

## Usage

```sh
❯ nautuluszim --help
usage: nautuluszim [-h] [-V]

# everything bundled in a ZIP
nautiluszim --archive my-content.zip

# In this mode every file entry must have a valid url.
nautiluszim --collection https://example.com/to-your-collection-file
```

### Installation

You'd want to install it in a dedicated virtual-environment (`python3 -m venv some-env && source ./some-env/bin/activate`)

```sh
❯ pip install nautiluszim
```

### Contributing

```sh
❯ pip install -e .
```

#### Notes

* On macOS, the locale setting is buggy. You need to launch it with the `LANGUAGE` environment variable (as ISO-639-1) for the translations to work.

```
LANGUAGE=fr nautiluszim --language fra
```

Nautilus adheres to openZIM's [Contribution Guidelines](https://github.com/openzim/overview/wiki/Contributing).

Nautilus has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/docs/Policy.md) **v1.0.0**.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nautiluszim",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.11",
    "maintainer_email": null,
    "keywords": "offline, openzim, zim",
    "author": null,
    "author_email": "openZIM <dev@openzim.org>",
    "download_url": "https://files.pythonhosted.org/packages/bf/d4/81ac92b4e82af1b571a26243ace5dc7d1f18846e3980e1bc17b5dd55ee8f/nautiluszim-1.2.1.tar.gz",
    "platform": null,
    "description": "\n# Nautilus\n\n`nautilus` turns a collection of documents into a browsable [ZIM file](https://openzim.org).\n\n[![CodeFactor](https://www.codefactor.io/repository/github/openzim/nautilus/badge)](https://www.codefactor.io/repository/github/openzim/nautilus)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![codecov](https://codecov.io/gh/openzim/nautilus/branch/main/graph/badge.svg)](https://codecov.io/gh/openzim/nautilus)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/nautiluszim.svg)](https://pypi.org/project/nautiluszim/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nautiluszim.svg)](https://pypi.org/project/nautiluszim)\n[![Docker](https://ghcr-badge.deta.dev/openzim/nautilus/latest_tag?label=docker)](https://ghcr.io/openzim/nautilus)\n\nIt downloads the video (webm or mp4 format \u2013 optionally recompress it in lower-quality, smaller size), the thumbnails, the subtitles and the authors' profile pictures ; then, it creates a static HTML files folder of it before creating a ZIM off of it.\n\n# Preparing the archive\n\nTo be used with nautilus, your archive should be a ZIP file.\n* it doesn't need to be structured, but it can.\n* it doesn't need to be compressed. It's usually recommended not to.\n* it should contain a `collection.json` file, but it can also be provided separately (see below).\n* it should only contain to-be-included files. No filtering is done.\n* Audio and video files should be in ogg format with an `.ogg`/`.ogv` extension to be supported on all platforms (`mp3`/`mp4` would work only on platforms with native support).\n\n```\ncd content/path\nzip -r -0 -T ../content_name.zip *\n```\n\n## JSON collection file\n\nEither inside the archive ZIP as `/collection.json` or elsewhere, \nspecified via `--collection mycollection.json`, you must supply a JSON file describing your content.\n\nThe user-interface only gives access to files referenced properly in the collection.\n\nAt the moment, the JSON file needs to provide the following fields for each item in an array:\n\n```json\n[\n    {\n        \"title\": \"...\",\n        \"description\": \"...\",\n        \"authors\": \"...\",\n        \"files\": [\"relative/path/to/file\"]\n    },\n    {\n        \"title\": \"...\",\n        \"description\": \"...\",\n        \"authors\": \"...\",\n        \"files\": [\n            {\n                \"archive-member\": \"01 BOOK for printing .pdf\",  // optional, member name inside archive (same as simpler format)\n                \"url\": \"http://books.com/310398120.pdf\",  // optional, has precedence over `archive-member`, url to download file from\n                \"filename\": \"My book.pdf\",  // optional, filename to use in ZIM, regardless of original one\n            }\n        ]\n    }\n]\n```\n\n## About page\n\nEither inside the archive ZIP as `/about.html` or elsewhere, specified via `--about myabout.html`,\n\n- You may supply an about page in HTML format. It will be displayed in a modal popup and will be included.\n- At its bottom your *secondary-logo* if provided.\n\n* Use only content tags (no `<html />` nor `<head />` nor `<script />` etc)\n* Use inline styling if required, but no styling is recommended.\n* Include one logo inline if required.\n\n## Usage\n\n```sh\n\u276f nautuluszim --help\nusage: nautuluszim [-h] [-V]\n\n# everything bundled in a ZIP\nnautiluszim --archive my-content.zip\n\n# In this mode every file entry must have a valid url.\nnautiluszim --collection https://example.com/to-your-collection-file\n```\n\n### Installation\n\nYou'd want to install it in a dedicated virtual-environment (`python3 -m venv some-env && source ./some-env/bin/activate`)\n\n```sh\n\u276f pip install nautiluszim\n```\n\n### Contributing\n\n```sh\n\u276f pip install -e .\n```\n\n#### Notes\n\n* On macOS, the locale setting is buggy. You need to launch it with the `LANGUAGE` environment variable (as ISO-639-1) for the translations to work.\n\n```\nLANGUAGE=fr nautiluszim --language fra\n```\n\nNautilus adheres to openZIM's [Contribution Guidelines](https://github.com/openzim/overview/wiki/Contributing).\n\nNautilus has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/docs/Policy.md) **v1.0.0**.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "turns a collection of documents into a browsable ZIM file",
    "version": "1.2.1",
    "project_urls": {
        "Donate": "https://www.kiwix.org/en/support-us/",
        "Homepage": "https://github.com/openzim/nautilus"
    },
    "split_keywords": [
        "offline",
        " openzim",
        " zim"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c3b8e2184ad31e25f3626b2ec2352a9df0838ecf860878162d3b988fdbf460c4",
                "md5": "df3ec4dfecf1e8856ff67de85d6507e0",
                "sha256": "60cf62ac0aa1880eaff96814e9172407958f5e91555969a7193054d3f0ba466e"
            },
            "downloads": -1,
            "filename": "nautiluszim-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "df3ec4dfecf1e8856ff67de85d6507e0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.11",
            "size": 43710,
            "upload_time": "2024-05-25T17:25:09",
            "upload_time_iso_8601": "2024-05-25T17:25:09.821170Z",
            "url": "https://files.pythonhosted.org/packages/c3/b8/e2184ad31e25f3626b2ec2352a9df0838ecf860878162d3b988fdbf460c4/nautiluszim-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bfd481ac92b4e82af1b571a26243ace5dc7d1f18846e3980e1bc17b5dd55ee8f",
                "md5": "5b29c29c3b821c522e2806f5aed11131",
                "sha256": "fa7ae7d6462f005336e8aa4c2b24489509b0e0c8d92f07a2c9629afb901b7cc2"
            },
            "downloads": -1,
            "filename": "nautiluszim-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5b29c29c3b821c522e2806f5aed11131",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.11",
            "size": 46665,
            "upload_time": "2024-05-25T17:25:11",
            "upload_time_iso_8601": "2024-05-25T17:25:11.559362Z",
            "url": "https://files.pythonhosted.org/packages/bf/d4/81ac92b4e82af1b571a26243ace5dc7d1f18846e3980e1bc17b5dd55ee8f/nautiluszim-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-25 17:25:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "openzim",
    "github_project": "nautilus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nautiluszim"
}
        
Elapsed time: 0.25270s