Skip to main content

No project description provided

Project description

Pressoir CLI

Installation

Pré-requis : Python3.8+

Installer et activer un environnement virtuel :

$ python3 -m venv venv
$ source venv/bin/activate

Installer les dépendances :

$ make install

Initialiser un livre

Par exemple :

$ pressoir-cli init --repository-path=../fia --collection sp

ou

$ pressoir-cli init --repository-path=../12-editionscritiques --collection pum

Note : si la destination n’existe pas ou n’a pas de dossier textes, une coquille complète du livre est créée.

Par exemple :

$ mkdir livre-test
$ cd livre-test
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install pressoir-cli
$ pressoir-cli init --collection=sp

Construire un livre

$ pressoir-cli build --repository-path=../fia-en

Avec ../fia-en qui est le chemin vers le dépôt du livre.

En bonus, il est possible de passer un chapitre particulier pour ne reconstruire que lui :

$ pressoir-cli build --repository-path=../fia-en --chapter=chapter1

Si vous êtes en local / développement, il faut passer l’option --local pour que les liens de parcours du livre fonctionnent.

Servir un livre

$ pressoir-cli serve --repository-path=../fia-en

Avec ../fia-en qui est le chemin vers le dépôt du livre qui a été construit.

Help

Commands

usage: pressoir-cli [-h]  ...

options:
  -h, --help  Show this help message and exit

Available commands:
  
    version   Return the current version of pressoir-cli.
    init      Initialize a new book to `repository_path` or current directory.
    docs      Generate documentation with pressoir-cli itself. #SoMeta
    build     Build a book from `repository_path` or current directory.
    serve     Serve an HTML book from `repository_path`/public or current
              directory/public.

Command: init

usage: pressoir-cli init [-h] [--repository-path REPOSITORY_PATH]
                         [--collection {pum,sp}]

options:
  -h, --help            show this help message and exit
  --repository-path REPOSITORY_PATH
                        Absolute or relative path to book’s sources (default:
                        current).
  --collection {pum,sp}, -c {pum,sp}
                        Name of the collection (Presses Universitaires or
                        Sens-Public).

Command: build

usage: pressoir-cli build [-h] [--repository-path REPOSITORY_PATH]
                          [--target-path TARGET_PATH] [--chapter CHAPTER]
                          [--verbose]

options:
  -h, --help            show this help message and exit
  --repository-path REPOSITORY_PATH
                        Absolute or relative path to book’s sources (default:
                        current).
  --target-path TARGET_PATH
                        Where the book will be built (default:
                        `repository_path`/public).
  --chapter CHAPTER, -c CHAPTER
                        Specify a given chapter id (e.g. `chapter1`).
  --verbose, -v         Display more informations during the build.

Command: serve

usage: pressoir-cli serve [-h] [--repository-path REPOSITORY_PATH]
                          [--port PORT]

options:
  -h, --help            show this help message and exit
  --repository-path REPOSITORY_PATH
                        Absolute or relative path to book’s sources (default:
                        current).
  --port PORT, -p PORT  Port to serve the book from (default=8000)

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

pressoir_cli-2.2.0.tar.gz (8.4 MB view details)

Uploaded Source

Built Distribution

pressoir_cli-2.2.0-py3-none-any.whl (8.4 MB view details)

Uploaded Python 3

File details

Details for the file pressoir_cli-2.2.0.tar.gz.

File metadata

  • Download URL: pressoir_cli-2.2.0.tar.gz
  • Upload date:
  • Size: 8.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for pressoir_cli-2.2.0.tar.gz
Algorithm Hash digest
SHA256 99f925e722f3b97aad926ebc3d48c94b6eee0aa86b86fb452cc525304559e199
MD5 74f3a6c0279d873c55115e473947f0b0
BLAKE2b-256 f9db7a3b79376429b92a9d97c7a39d3db19be9e208000bda9de64c4b45cd4f3f

See more details on using hashes here.

File details

Details for the file pressoir_cli-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pressoir_cli-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04e71283b11aa0e7e995a4cc8352d5382b9139f41a7f98e0a79af10c9e698767
MD5 2331fb0d2c33c27abb5c31c3f1a1985f
BLAKE2b-256 b5049bd3c22762b46ccc943ec1720024e3e60c8781882ea3101e6ff7a093528c

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