rsconstruct 0.9.81

Rust based fast build system
# Pdfunite Processor

## Purpose

Merges PDF files from subdirectories into single combined PDFs using [pdfunite](https://poppler.freedesktop.org/).

## How It Works

Scans subdirectories of the configured source directory for files matching the
configured extension. For each subdirectory, it locates the corresponding PDFs
(generated by an upstream processor such as marp) and merges them into a single
output PDF.

This processor is designed for course/module workflows where slide decks in
subdirectories are combined into course bundles.

## Source Files

- Input: PDFs from upstream processor (e.g., `out/marp/pdf/{subdir}/*.pdf`)
- Output: `out/courses/{subdir}.pdf`

## Configuration

```toml
[processor.pdfunite]
command = "pdfunite"                   # The pdfunite command to run
source_dir = "marp/courses"           # Base directory containing course subdirectories
source_ext = ".md"                     # Extension of source files in subdirectories
source_output_dir = "out/marp/pdf"     # Where the upstream processor puts PDFs
args = []                              # Additional arguments to pass to pdfunite
output_dir = "out/courses"             # Output directory for merged PDFs
dep_inputs = []                      # Additional files that trigger rebuilds when changed
```

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `command` | string | `"pdfunite"` | The pdfunite executable to run |
| `source_dir` | string | `"marp/courses"` | Directory containing course subdirectories |
| `source_ext` | string | `".md"` | Extension of source files to look for |
| `source_output_dir` | string | `"out/marp/pdf"` | Directory where the upstream processor outputs PDFs |
| `args` | string[] | `[]` | Extra arguments passed to pdfunite |
| `output_dir` | string | `"out/courses"` | Output directory for merged PDFs |
| `dep_inputs` | string[] | `[]` | Extra files whose changes trigger rebuilds |

## Batch support

Each input file is processed individually, producing its own output file.

## Clean behavior

This processor is a Generator — `rsconstruct clean outputs` removes each declared output file individually with no directory recursion. After all per-product cleans complete, the orchestrator removes any parent directories that are now empty. Pass `--no-empty-dirs` to keep them. See [Clean behavior](../processors.md#clean-behavior) and [`rsconstruct clean`](../commands.md#rsconstruct-clean).