Skip to content

feat: several outputs per project - #14

Merged
apiad merged 5 commits into
mainfrom
outputs
Oct 20, 2026
Merged

apiad merged 5 commits into
mainfrom
outputs

Conversation

@apiad

@apiad apiad commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Part 1 of 3 for #13. Spec: docs/superpowers/specs/2026-10-20-html-book-design.html; plan: docs/superpowers/plans/2026-10-20-html-book.html (tasks 1-3).

What changed

  • project.py: outputs: in scriptorium.yaml becomes Project.outputs: list[Output]. Each output has a name and a format (pdf or html); a pdf takes file, page, vars, an html output takes dir, vars, cover, image-max-width, js, css. An unknown key, a key of the other format, or an unknown format raises ProjectError naming the output and the key. No outputs: means one pdf output writing book.pdf, so existing projects are unchanged.
  • prepare(..., page=) and render_pdf(..., page=) merge a page block (size, margin) over the theme's for one render. A5 joins the named sizes.
  • scriptorium render X.yaml builds every output and prints one line each; --only NAME (repeatable) picks; -o is refused when more than one output is selected. --format {pdf,html} is for single files. HTML outputs exit 2 with "not available yet" until part 2.
  • README "Several outputs" section, CHANGELOG entry, and the spec and plan.

Measured

  • tests/test_outputs.py: 14 new tests, all seen failing first. Locally test_outputs, test_book, test_furniture, test_galley pass; CI runs the rest.
  • Real CLI on a two-output project: pdfinfo reports 419.528 x 595.276 pts for the A5 output and A4 for the other.

🤖 Generated with Claude Code

apiad and others added 5 commits October 20, 2026 10:03
Refs #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apiad apiad mentioned this pull request Oct 20, 2026
@apiad
apiad merged commit 7ed8467 into main Oct 20, 2026
2 checks passed
@apiad
apiad deleted the outputs branch October 20, 2026 14:32
@apiad
apiad restored the outputs branch October 20, 2026 14:33
@apiad
apiad deleted the outputs branch October 20, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant