Expand description
WISP → PDF export.
Renders an organisation’s Written Information Security Program — the
markdown policy set under security/ — into a single branded PDF with a
cover page, table of contents, page numbers, and a provenance stamp.
Design and decisions live in docs/wisp-pdf-export.md. The short version:
- The default renderer is Typst (pure Rust, compiled into the binary),
so a plain
cargo installproduces a working renderer with no external toolchain. WeasyPrint / Chromium are opt-in HTML backends (not yet wired). - The branding partials are required, operator-owned files (Typst
templates by default), scaffolded by
initand checked byexport. - Provenance reuses the same primitives as the evidence chain: the WISP
repo’s
git_headcommit and a SHA-256 over the assembled markdown.
This module owns the format-neutral pipeline:
source resolution → markdown assembly → doc::WispDoc → Typst emission.
The final Typst→PDF compile (the typst crate) is wired separately; see
render.
Re-exports§
Modules§
- doc
- The backend-neutral assembled document.
- markdown
- Markdown → Typst conversion, driven by
pulldown-cmark. - render
- Render backends. The default
Typstbackend compiles in-binary; theWeasyprint/ChromiumHTML backends are opt-in and not wired yet (seedocs/wisp-pdf-export.md§8). - scaffold
wisp init— scaffold the generic, operator-owned partials.- source
- WISP source resolution, assembly, provenance, and the
exportentry point. - template
- The bundled generic partials, plus locating/validating an operator’s template directory.
- typst_
emit - Compose the top-level Typst document (
main.typ) from aWispDocand the operator’s partials.
Structs§
- Export
Options - Inputs to
export.Nonefields fall back to_config.yaml’swisp:block and then to built-in defaults. - Export
Report - Outcome of
export. - Init
Options - Inputs to
init.diris the template directory to scaffold into. - Init
Report - Outcome of
init.
Enums§
- Format
- Partial flavour. Determined by the chosen renderer: the in-binary Typst
backend uses
.typpartials; the opt-in HTML backends use HTML + CSS. - Renderer
- Rendering backend. Only
Typstis implemented today; the others are reserved for the opt-in HTML backends documented in the spec (§8). - Status
- Document status, surfaced on the cover/footer and as a watermark.