GithubHelp home page GithubHelp logo

dauinh / nautilus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openzim/nautilus

0.0 0.0 0.0 159 KB

Turns a collection of documents into a browsable ZIM file

License: GNU General Public License v3.0

Shell 3.31% JavaScript 34.18% Python 50.59% CSS 4.88% HTML 4.06% Handlebars 0.85% Dockerfile 2.13%

nautilus's Introduction

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 it can also 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 .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"]
     }
]

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 include 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 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 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

nautilus's People

Contributors

rgaudin avatar kelson42 avatar haksoat avatar popolechien avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.