Export set
export_setExport multiple SVG documents in one call, applying the same export specs to each. Returns per-doc results, total byte count, and a cross-doc consistency verdict.
Instructions
Batch-export a SET of documents in one call: per-doc results + aggregate + verdict.
When to use: exporting a whole multi-document system (e.g. a 12-icon set) at the same sizes /
formats in one call, with the set's total byte footprint and a cross-doc consistency check. For
a SINGLE document use export_batch; for an icon set from one doc use create_icon_set.
Key params: doc_ids is a non-empty, duplicate-free set; specs is the SAME typed ExportSpec
list export_batch takes (applied to EVERY document). dry_run / byte_budget / out_dir /
name_prefix behave exactly as on export_batch (composed, not reimplemented), per document; a
name_prefix is recommended with out_dir so the per-doc files do not collide. The whole set
is rejected if ANY document's export_batch fails (no partial result).
Return shape: ExportSetResult — per_doc (each {doc_id, result} with the standard
BatchResult), total_items and total_bytes aggregated across the set (projected on a dry
run, actual on a real run), and consistency — the structured cross-doc verdict over the set's
viewBox / stroke-width / id-naming conventions (per property: agree/disagree + the differing
values + which doc_ids differ).
Example: export_set(["d1","d2","d3"], [{"format": "png", "width_px": 64}], dry_run=False, out_dir="dist", name_prefix="icon")
Risk class: low (artifact-only export to a sandbox-checked dir; composes the per-doc engine).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| specs | Yes | ||
| doc_ids | Yes | ||
| dry_run | No | ||
| out_dir | No | ||
| byte_budget | No | ||
| name_prefix | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | Yes | ||
| per_doc | Yes | ||
| consistency | Yes | Structured cross-document consistency audit over a set. One :class:`ConsistencyProperty` per audited property (``viewBox``, ``stroke_width``, ``id_naming``). ``consistent`` is True iff EVERY audited property agrees across the set. Not prose: an agent reads ``properties`` to see precisely which property disagrees and which ``doc_ids`` carry which value. | |
| total_bytes | Yes | ||
| total_items | Yes |