Skip to main content

laudo

Convert markdown files to docx or pdf using docxtpl templates.

Installation

The recommended way to install the laudo CLI is with pipx, which installs it in an isolated environment and puts the command on your PATH.

Requires Python 3.13+ and LibreOffice (only for PDF output).

1. Install pipx

Ubuntu/Debian:

sudo apt update
sudo apt install pipx
pipx ensurepath

Arch Linux:

sudo pacman -S python-pipx
pipx ensurepath

macOS (Homebrew):

brew install pipx
pipx ensurepath

Windows (PowerShell):

py -m pip install --user pipx
py -m pipx ensurepath

Restart your terminal afterwards so the PATH change takes effect. For other systems, see the pipx installation guide.

2. Install laudo

From PyPI:

pipx install laudo

A specific version:

pipx install laudo==0.2.3

The latest code from GitHub:

pipx install git+https://github.com/renatormc/laudo.git

From a local clone, in editable mode (code changes take effect without reinstalling):

git clone https://github.com/renatormc/laudo.git
pipx install --editable ./laudo

If Python 3.13+ is not your default interpreter, point pipx at it:

pipx install --python python3.13 laudo

Check the installation:

laudo --help

3. Upgrade or uninstall

pipx upgrade laudo                # upgrade to the latest release
pipx install --force laudo        # reinstall (e.g. after switching source)
pipx uninstall laudo

pipx list shows the installed version and the Python interpreter in use.

To use the Python API from your own code, install laudo into that project's virtual environment instead (e.g. uv add laudo or pip install laudo).

Usage

CLI

laudo [gui] [--dir <folder>]               # main GUI (default with no command)
laudo gen [--dir <folder>] [--debug] [--pdf] [--output <path>] [--template <path>]
laudo captions [--dir <folder>]
laudo template <name> [--dir <folder>]
laudo vars [--dir <folder>]
laudo init <name> [--dir <folder>]
laudo reduce-images <source> <dest> [--max <pixels>]
laudo install

Python API

from laudo import convert

convert("my_project/", "output.docx")
convert("my_project/", "output.pdf")

Reducing images

laudo reduce-images shrinks images so that neither side exceeds the chosen size (aspect ratio is kept):

laudo reduce-images fotos/ fotos_small/          # folder -> folder (recursive)
laudo reduce-images report.docx report.docx      # images embedded in a .docx/.odt
laudo reduce-images report.docx small.docx --max 600

Without --max, an interactive list lets you pick the size (default 450px).

Input Folder Structure

my_project/
├── template.docx          # docxtpl template with Jinja2 placeholders
├── fotos/                 # Images (captions edited via GUI)
│   ├── image1.png
│   └── events/
│       └── party.jpg
├── context.txt            # (optional) Variables one per line: key = value
├── intro.md               # One or more .md files
└── chapter-1.md

Template

A standard Word document using docxtpl syntax with Jinja2 placeholders like {{ variable }} or {{p intro|markdown }}.

To use a template from a shared folder, create .laudo/.template with the template name and set the LAUDOS_TEMPLATES_FOLDER environment variable.

context.txt

Optional file with variables in key = value format, one per line. Lines starting with # and empty lines are ignored. These variables are available for substitution inside .md files via {{ varname }}.

Markdown files

Every .md file is read and its content is injected as a template variable named after the filename (without extension, spaces → underscores):

File Template variable
intro.md intro
chapter 1.md chapter_1

Inside markdown files you can reference context variables with {{ varname }} and embed image groups with image_group(name, cols).

Images

All images in fotos/ (including subdirectories) are available as the pics variable in templates. Use pics.group("events") to get images from a subfolder, or pics.all for all images. Captions are edited via the laudo captions GUI.

Template helpers

  • {{p variable\|markdown }} — render markdown as formatted docx content
  • {{p subdoc("file.docx", key=val) }} — embed a sub-template
  • {{p image("fotos/logo.png", width=50) }} — inline image with size control

License

MIT

Metadata

Release files for laudo 0.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 laudo 0.2.5
File Size Uploaded Provenance Actions
laudo-0.2.5.tar.gz 140.0 kB Without provenance Details for laudo-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for laudo 0.2.5
File Interpreter ABI Platform Actions
laudo-0.2.5-py3-none-any.whl Python 3 none any Details for laudo-0.2.5-py3-none-any.whl

Total release size: 284.6 kB

Release files / laudo-0.2.5.tar.gz

Download URL laudo-0.2.5.tar.gz
Size 140.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cfb9ece7e94f5b54f6cfbc221dd2f0f84b07665c61dfec46ee1378885153dfc2
BLAKE2b-256 checksum
How to use checksums
ced2ae49852d4d13681e4c605af5d864342c2f63e049fa1ec2639b0fd551202c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / laudo-0.2.5-py3-none-any.whl

Download URL laudo-0.2.5-py3-none-any.whl
Size 144.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43b2a4e1d3e1274ab8820900bc243bf3c6daba37cada7302230256fea5e2a0ac
BLAKE2b-256 checksum
How to use checksums
5e8178362f0ef605e7f79da523d6426595c704e3f4d0d9bb58a77c5cd4d93c25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for laudo 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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