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 ../fia --collection sp
ou
$ pressoir-cli init ../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.
Construire un livre
$ pressoir-cli build ../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 ../fia-en --chapter=chapter1
Servir un livre
$ pressoir-cli serve ../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:
init Initialize a new book to `repository_path`.
build Build a book from `repository_path`.
serve Serve an HTML book from `repository_path`/public.
Command: init
usage: pressoir-cli init [-h] [--collection {pum,sp}] repository_path
positional arguments:
repository_path Absolute or relative path to book’s sources.
options:
-h, --help show this help message and exit
--collection {pum,sp}, -c {pum,sp}
Name of the collection (Presses Universitaires or
Sens-Public).
Command: build
usage: pressoir-cli build [-h] [--target-path TARGET_PATH] [--chapter CHAPTER]
repository_path
positional arguments:
repository_path Absolute or relative path to book’s sources.
options:
-h, --help show this help message and exit
--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`).
Command: serve
usage: pressoir-cli serve [-h] [--port PORT] repository_path
positional arguments:
repository_path Absolute or relative path to book’s sources.
options:
-h, --help show this help message and exit
--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
pressoir_cli-1.0.0.tar.gz
(6.3 MB
view hashes)
Built Distribution
Close
Hashes for pressoir_cli-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20761cfabe4b51028818e8058b9fb166122e6cb964d0a1ddee601179b8692496 |
|
MD5 | 4c4436930705e191ac3a1ea20f09f8f8 |
|
BLAKE2b-256 | a1b91c42071610e93cc02368826c57fd22368a6f523829217401e7d8d0ad48b8 |