Skip to main content

Pressoir

Documentation complète : https://pressoir.org/

Utilisation rapide

  1. Installer uv : https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
  2. Se placer dans le dossier contenant les textes
  3. Construire le livre : uv run --with pressoir pressoir build serve
  4. Se rendre sur http://127.0.0.1:8000 pour visualiser le livre

Optionnellement, générer un PDF du livre :

  1. Lancer : uv run --with pressoir pressoir export
  2. Récupérer le PDF dans public/book.pdf

À partir d’un corpus Stylo

  1. Installer uv : https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
  2. Se placer dans un nouveau dossier
  3. Récupérer les textes : uv run --with pressoir pressoir stylo <corpus-id>
  4. Construire le livre : uv run --with pressoir pressoir build serve
  5. 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)

Source distribution for pressoir 4.12.0
File Size Uploaded
pressoir-4.12.0.tar.gz 7.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pressoir 4.12.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

4.12.0 This release

2 release files

4.11.2

2 release files

4.11.0

2 release files

4.10.0

2 release files

4.9.4

2 release files

4.9.3

2 release files

4.9.2

2 release files

4.9.0

2 release files

4.8.1

2 release files

4.8.0

2 release files

4.7.0

2 release files

4.6.0

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.8.0

2 release files

3.7.4

2 release files

3.7.3

2 release files

3.7.2

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.6

2 release files

3.6.5

2 release files

3.6.4

2 release files

3.6.3

2 release files

3.6.2

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.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