Skip to content

print

Renders bracket Excel workbooks into grouped, print-ready PDFs (competitor tags, name sheets, bracket trees, and more) using LibreOffice.

bracket-creator print --type <type> (--input <dir> | --tournament-data <dir>) [flags]

This is the command-line counterpart of the tournament app's Export PDFs button. Both share the same rendering engine. Use the CLI when you want PDFs without running the server, or when you want to generate them on a separate, LibreOffice-equipped machine. Refer to When to use the CLI.

Input modes

Provide exactly one:

Flag What it reads
--input <dir> A directory of pre-existing bracket .xlsx files (for example, output from create-pools or create-knockout).
--tournament-data <dir> A tournament app data directory; the workbooks are generated on the fly from competition state.

Some competitions can be left out of the booklet

With --tournament-data, a competition is skipped, rather than aborting the whole booklet, when it has nothing renderable:

  • A Swiss competition has no pools and no fixed bracket, so there is nothing to lay out on a printed sheet yet. To follow a Swiss competition on the day, use the live standings view in the tournament app instead.
  • A competition whose stored bracket no longer matches its current settings cannot be rendered until the draw is regenerated or the settings are restored. That happens, for example, when the qualifier count was changed after the bracket was built.

Each skipped competition is named in a warning on the console. Every other competition still prints as usual. By default the command still exits successfully, even if every competition was skipped. Pass --fail-on-skip-all to make a scripted run detect that case.

Types

--type selects which sheets to render (required):

Type Output
registration The data sheet from every workbook
names The "Names to Print" sheets, A3 landscape, with title pages
tags The competitor "Tags" sheets, with title pages (team workbooks excluded). Tags carry a QR code when the tournament's public URL is set.
pools-trees Pool Draw + Tree sheets (a participant booklet), page-numbered
full-bracket Pool Draw + Pool/Elimination Matches + Trees, page-numbered
all Every type, written into --output-dir

Other flags

Flag Short Default Description
--output -o (none) Output PDF path for a single --type. Mutually exclusive with --output-dir.
--output-dir (none) Output directory. Required for --type=all; for a single --type, give this or --output.
--team-file any filename containing team An .xlsx basename to treat as a team workbook (excluded from tags). Repeatable.
--fail-on-skip-all off Exit with a non-zero status if every competition was skipped, so a scripted run can detect that no booklet was produced. Refer to Some competitions can be left out of the booklet.

An output target is always required. For a single --type, provide exactly one of --output or --output-dir. --type=all requires --output-dir and rejects --output.

Usage

Generate every PDF group from a folder of bracket workbooks:

bracket-creator print --type=all --input=./xlsx/ --output-dir=./pdfs

Generate everything from a tournament-data directory:

bracket-creator print --type=all --tournament-data=tournament-data/ --output-dir=./pdfs

Competitor tags only, to a single file:

bracket-creator print --type=tags --input=./xlsx/ -o ./tags.pdf

When to use the CLI

The tournament app's in-app export needs LibreOffice in the running server. The CLI lets you keep the server on the lean default image (no LibreOffice) and render PDFs elsewhere:

  • Offline / CLI-only events: you built brackets with create-pools or the Legacy Web UI and never ran the tournament app. Only the CLI can render those into PDFs (--input).
  • Out-of-band generation: run print --tournament-data ... on a LibreOffice-equipped machine instead of bundling LibreOffice into every deployment.
  • Batch or scripted PDF generation.

LibreOffice requirement

print renders through LibreOffice (soffice). Install it with your platform's package manager (ensuring soffice is on PATH), or set $LIBREOFFICE_PATH to the soffice binary. If LibreOffice is not found, the command exits with installation instructions. The published bracket-creator-mobile-pdf image bundles it.