Pressoir
Documentation complète : https://pressoir.org/
Utilisation rapide
- Installer uv : https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
- Se placer dans le dossier contenant les
textes - Construire le livre :
uv run --with pressoir pressoir build serve - Se rendre sur http://127.0.0.1:8000 pour visualiser le livre
Optionnellement, générer un PDF du livre :
- Lancer :
uv run --with pressoir pressoir export - Récupérer le PDF dans
public/book.pdf
À partir d’un corpus Stylo
- Installer uv : https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
- Se placer dans un nouveau dossier
- Récupérer les textes :
uv run --with pressoir pressoir stylo <corpus-id> - Construire le livre :
uv run --with pressoir pressoir build serve - Se rendre sur http://127.0.0.1:8000 pour visualiser le livre
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 init --repository-path=../fia --collection sp
ou
$ pressoir 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
$ pressoir init --collection=sp
Construire un livre
$ pressoir 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 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 serve --repository-path=../fia-en
Avec ../fia-en qui est le chemin vers le dépôt du livre qui a été construit.
Générer les md+tex+pdf d’un livre
Expérimental : il est possible avec la commande pressoir export de générer des fichiers markdown, tex et pdf à partir des sources. Ils vont être créés dans public/book.{md|tex|pdf}.
Il est nécessaire d’avoir (xe)latex pour effectuer cette génération.
Help
Commands
usage: pressoir [-h] ...
options:
-h, --help Show this help message and exit
Available commands:
version Return the current version of pressoir.
init Initialize a new book to `repository_path` or current directory.
docs Generate documentation with pressoir itself. #SoMeta
build Build a book from `repository_path` or current directory.
export Generate a single md+tex+pdf file from `repository_path` or
current directory.
serve Serve an HTML book from `repository_path`/public or current
directory/public.
stylo Initialize a new book to current directory from Stylo.
Command: init
usage: pressoir 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, -c {pum,sp,blank}
Name of the collection (default: blank).
Command: docs
usage: pressoir docs [-h] [--target-path TARGET_PATH]
options:
-h, --help show this help message and exit
--target-path TARGET_PATH
Command: build
usage: pressoir build [-h] [--repository-path REPOSITORY_PATH]
[--csl-path CSL_PATH] [--target-path TARGET_PATH]
[--templates-folder TEMPLATES_FOLDER]
[--chapter CHAPTER] [--keep-statics] [--verbose]
options:
-h, --help show this help message and exit
--repository-path REPOSITORY_PATH
Absolute or relative path to book’s sources (default:
current).
--csl-path CSL_PATH Path to .csl file (default: Pandoc’s default).
--target-path TARGET_PATH
Where the book will be built (default:
`repository_path`/public).
--templates-folder TEMPLATES_FOLDER
Folder with header.html/footer.html for before/after
inclusion.
--chapter, -c CHAPTER
Specify a given chapter id (e.g. `chapter1`).
--keep-statics Do not override the statics with regular ones
(default: False).
--verbose, -v Display more informations during the build (default:
False).
Command: export
usage: pressoir export [-h] [--repository-path REPOSITORY_PATH]
[--template-path TEMPLATE_PATH] [--csl-path CSL_PATH]
[--target-path TARGET_PATH] [--verbose]
options:
-h, --help show this help message and exit
--repository-path REPOSITORY_PATH
Path to book’s sources (default: current).
--template-path TEMPLATE_PATH
Path to .tex template (default: Pandoc’s default).
--csl-path CSL_PATH Path to .csl file (default: Pandoc’s default).
--target-path TARGET_PATH
Where the book will be built (default:
`repository_path`/public).
--verbose, -v Display a lot of informations, useful for debugging.
Command: serve
usage: pressoir 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, -p PORT Port to serve the book from (default=8000)
Command: stylo
usage: pressoir stylo [-h] [--stylo-instance STYLO_INSTANCE]
[--stylo-export STYLO_EXPORT] [--from-scratch]
[--keep-metadata]
stylo_id
positional arguments:
stylo_id Corpus id from Stylo.
options:
-h, --help show this help message and exit
--stylo-instance STYLO_INSTANCE
Instance of Stylo (default: stylo.huma-num.fr).
--stylo-export STYLO_EXPORT
Stylo export URL (default: https://export.stylo.huma-
num.fr).
--from-scratch Do not ask to override local files (default: False).
--keep-metadata Do not override the `livre.yaml` metadata file
(default: False).
Release files for pressoir 4.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pressoir-4.12.0.tar.gz | 7.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pressoir-4.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 MB
Release files / pressoir-4.12.0.tar.gz
| Download URL | pressoir-4.12.0.tar.gz |
|---|---|
| Size | 7.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d828e153015475c06770d627c0b7e712bae10028edcd08f513767db9243af99e
|
|
BLAKE2b-256 checksum How to use checksums |
839c97bcfed60d4a57e80a1b46bc48168e36717c79c974c501f8190bfd1cd470
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.17.0 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"26.6.2"},"implementation":{"name":"CPython","version":"3.14.2"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.5.4 30 Sep 2025","python":"3.14.2","system":{"name":"Darwin","release":"25.6.0"}} HTTPX2/2.5.0
|
Release files / pressoir-4.12.0-py3-none-any.whl
| Download URL | pressoir-4.12.0-py3-none-any.whl |
|---|---|
| Size | 7.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2aa1d36008a94f0d0d6379706b74797a06189cc3fcd97287f7ac055c1ad7f1c
|
|
BLAKE2b-256 checksum How to use checksums |
700ec47188fc5c12f59b30eaa554728a62164ddf6a35e8b2bba2b72beecbf68d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.17.0 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"26.6.2"},"implementation":{"name":"CPython","version":"3.14.2"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.5.4 30 Sep 2025","python":"3.14.2","system":{"name":"Darwin","release":"25.6.0"}} HTTPX2/2.5.0
|