nautiluszim


Namenautiluszim JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/openzim/nautilus
Summaryturns a collection of documents into a browsable ZIM file
upload_time2023-05-05 15:50:26
maintainer
docs_urlNone
authorkiwix
requires_python>=3.7
licenseGPLv3+
keywords kiwix zim offline
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Nautilus
=============

[![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)
[![PyPI version shields.io](https://img.shields.io/pypi/v/nautiluszim.svg)](https://pypi.org/project/nautiluszim/)
[![Docker](https://ghcr-badge.deta.dev/openzim/nautilus/latest_tag?label=docker)](https://ghcr.io/openzim/nautilus)

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

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"]
     }
]
```

## 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.

# Requirements

* `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.
* [`handlebars`](https://handlebarsjs.com) is used to compile JS templates

# Installation

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

## docker

```
docker run -v my_dir:/output ghcr.io/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 the `LANGUAGE` environment variable (as ISO-639-1) for the translations to work.

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

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/openzim/nautilus",
    "name": "nautiluszim",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "kiwix zim offline",
    "author": "kiwix",
    "author_email": "reg@kiwix.org",
    "download_url": "https://files.pythonhosted.org/packages/5b/c7/fdd464df6dfb12306873f72273e2da034ce9763ca98b37b0ac76a35bda6f/nautiluszim-1.1.1.tar.gz",
    "platform": null,
    "description": "Nautilus\n=============\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[![PyPI version shields.io](https://img.shields.io/pypi/v/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\n`nautilus` turns a collection of documents into a browsable [ZIM file](https://openzim.org).\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```\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# Requirements\n\n* `wget` and `unzip` to install JS dependencies. See `get_js_deps.sh` if you want to do it manually.\n* `wget` is used to download archive files as well.\n* [`handlebars`](https://handlebarsjs.com) is used to compile JS templates\n\n# Installation\n\n`nautilus` is a python program. if you are not using the docker image, you are advised to use it in a virtual-environment. See `requirements.txt` for the list of python dependencies.\n\n## docker\n\n```\ndocker run -v my_dir:/output ghcr.io/openzim/nautilus nautiluszim --help\n```\n\n## pip\n\n```\npip install nautiluszim\nnautiluszim --help\n```\n\n# Usage\n\n```\nnautiluszim --archive my-content.zip\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\n## Development\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n",
    "bugtrack_url": null,
    "license": "GPLv3+",
    "summary": "turns a collection of documents into a browsable ZIM file",
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/openzim/nautilus"
    },
    "split_keywords": [
        "kiwix",
        "zim",
        "offline"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "38325c41149448567873427bd4063059807e6492ce5979e4a0889a0c92ef4faa",
                "md5": "e422337bb9ad3919c3ecd3cf4678a136",
                "sha256": "849b89b83d7ee7642569059c09bfcc1d20e48355c652fb79a15fee50c382c628"
            },
            "downloads": -1,
            "filename": "nautiluszim-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e422337bb9ad3919c3ecd3cf4678a136",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4193157,
            "upload_time": "2023-05-05T15:50:23",
            "upload_time_iso_8601": "2023-05-05T15:50:23.869358Z",
            "url": "https://files.pythonhosted.org/packages/38/32/5c41149448567873427bd4063059807e6492ce5979e4a0889a0c92ef4faa/nautiluszim-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5bc7fdd464df6dfb12306873f72273e2da034ce9763ca98b37b0ac76a35bda6f",
                "md5": "237a4b8008aabb11458ca27310f6b39a",
                "sha256": "e0950f59a2326419a8a27ae2e8b99a85cfe6564a3856ece09202dd75606e6883"
            },
            "downloads": -1,
            "filename": "nautiluszim-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "237a4b8008aabb11458ca27310f6b39a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3927017,
            "upload_time": "2023-05-05T15:50:26",
            "upload_time_iso_8601": "2023-05-05T15:50:26.263733Z",
            "url": "https://files.pythonhosted.org/packages/5b/c7/fdd464df6dfb12306873f72273e2da034ce9763ca98b37b0ac76a35bda6f/nautiluszim-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-05 15:50:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "openzim",
    "github_project": "nautilus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "nautiluszim"
}
        
Elapsed time: 0.06112s