Skip to main content

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,blank}]

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,blank}, -c {pum,sp,blank}
                        Name of the collection (default: blank).

Command: docs

usage: pressoir-cli docs [-h] [--target-path TARGET_PATH]

options:
  -h, --help            show this help message and exit
  --target-path TARGET_PATH

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)

Release files for pressoir-cli 2.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pressoir-cli 2.2.5
File Size Uploaded
pressoir_cli-2.2.5.tar.gz 11.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pressoir-cli 2.2.5
File Interpreter ABI Platform
pressoir_cli-2.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 MB

Release files / pressoir_cli-2.2.5.tar.gz

Download URL pressoir_cli-2.2.5.tar.gz
Size 11.6 MB
Tags Source
SHA-256 checksum
How to use checksums
bf06927d865e17324eed3aeaf951aa5e4d34ee7b67fab85e43844af23cec0781
BLAKE2b-256 checksum
How to use checksums
f31f89cd974f49bc0b55d1c2234f4998b224c980333b9d555ea6b170f5c16bd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.0

Release files / pressoir_cli-2.2.5-py3-none-any.whl

Download URL pressoir_cli-2.2.5-py3-none-any.whl
Size 11.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
18a6fb330fa591598746186b51108ed1cb72287894b1b8e9b41d42e77025d377
BLAKE2b-256 checksum
How to use checksums
da6bdce8c1d89ccb7fc031b5439ca8a5bc0b27bf0729b4efba19f1c7990941c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.0

Release history Release notifications | RSS feed

This release

2.2.5 This release

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page