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,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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pressoir_cli-2.2.4.tar.gz
.
File metadata
- Download URL: pressoir_cli-2.2.4.tar.gz
- Upload date:
- Size: 11.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f478352ca92149d2fb4623ccb8f612b0d2ea07324740c1ac8ec4223d62ea193 |
|
MD5 | bd6c8fce9764783bc9d9857b236c3870 |
|
BLAKE2b-256 | 187c45304e0854ca2520b2812809dea5e372c1700ebad086cd2b75e95bf0ccdb |
File details
Details for the file pressoir_cli-2.2.4-py3-none-any.whl
.
File metadata
- Download URL: pressoir_cli-2.2.4-py3-none-any.whl
- Upload date:
- Size: 11.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c35327f6e146154375d19c94e5bb55dce5fbf5d848377026273185ed484c4b6 |
|
MD5 | 5276959d693f13630cbf0affd074c30a |
|
BLAKE2b-256 | 699ea1a5cf3cb1696b879b63141a33a152c78895e8f7115d55583582772cdc9f |