Expand description
§Quillmark
Quillmark is a schema-driven document engine that turns Markdown with card-yaml metadata blocks into a fully typeset document (PDF, SVG, PNG).
use quillmark::{quill_from_path, Document, OutputFormat, Quillmark, RenderOptions};
let quill = quill_from_path("path/to/quill").unwrap();
let engine = Quillmark::new();
let parsed = Document::parse("~~~\n$quill: my_quill\n$kind: main\ntitle: Hello\n~~~\n\n# Hello World").unwrap().document;
let result = engine.render(&quill, &parsed, &RenderOptions {
output_format: Some(OutputFormat::Pdf),
..Default::default()
}).unwrap();Re-exports§
pub use orchestration::Quillmark;
Modules§
- orchestration
- Orchestration
Structs§
- Artifact
- An artifact produced by rendering.
- Card
- A single card-yaml block (root or composable).
bodyis the content (Content) form of the prose after the closing fence — the empty content when none follows; checkcard.body().is_blank(). Markdown is a projection:Card::body_markdownre-emits it. - Card
Schema - Schema definition for a card kind (composable content blocks)
- Change
Set - What a committed
LiveSession::applychanged. - Content
- One content field as a content: the text plus the structure that rides on it.
- Delta
- A per-field edit against a base content. Ops apply left-to-right, consuming
base positions;
Retain/Deleteadvance the base cursor,Insertadds new text. USV throughout. - Diagnostic
- Structured diagnostic information.
- Document
- A fully-parsed Quillmark document. Serde routes through
StoredDocument; for the plate wire shape seeDocument::to_plate_json. - Field
Schema - Schema definition for a template field.
- Live
Session - Opaque, backend-backed live render session: a persistent compiler that
serves reads (
render,paintseams,regions) from its current compile and takes edits viaapply. Reads between edits see a stable document —applyis transactional, swapping the compile only on success — so immutability is an invariant between commits, not a type. - Location
- Parsed
- The record of one parse: the
Documentand any non-fatal warnings. Returned byDocument::parse, the single parse entry. Warnings live here and only here —Documentis the value (equality, the storage DTO, and mutators all exclude warnings);Parsedis the parse event. A caller that wants only the document writesDocument::parse(md)?.document. - Quill
- Portable, validated quill data: the file bundle, parsed config, and metadata of an authored quill, tagged with its declared backend id.
- Quill
Config - Top-level configuration for a Quillmark project
- Quill
Ignore - Simple gitignore-style pattern matcher for .quillignore
- Render
Error - Main error type for rendering operations: a non-empty collection of
Diagnostics. - Render
Options - Internal rendering options.
- Render
Result
Enums§
- Field
Type - Field type hint enum for type-safe field type definitions.
- File
Tree Node - A node in the file tree structure
- Output
Format - Output formats supported by backends.
- Parse
Error - Severity
- Fatality is this two-value ladder and nothing else:
Errorblocks the stage that emits it,Warningnever does. There is no lint-level configuration and no warning-to-error promotion; an informational aside is aDiagnostic::hint, not a severity. - Validation
Error - Validation error with a structured field path.
Traits§
- Backend
- Backend trait for rendering different output formats.
Functions§
- quill_
from_ path - Load a quill from a filesystem directory. Honours a root
.quillignore, else a default ignore set. (The fs walk lives here; core stays fs-agnostic.) - quill_
from_ path_ with_ warnings quill_from_path, keeping the config’s advisory diagnostics rather than dropping them — the door for a caller that reports them (quillmark validate -v).- tree_
from_ path - Walk a filesystem path into an in-memory
FileTreeNode— the tree half ofquill_from_path, for a caller that wants to edit the tree beforeQuill::from_treereads it.