Fix up merged PRs: main's newer params docs fit describe's grammar; help pages for bench and render-transition

file.export's slide range and transition.sound's keys parse as parameters, and the subcommands
main added since #303 have their own help page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-14 14:40:09 -04:00
co-authored by Claude Opus 5.5
parent b590cb0b0b
commit 3b28496c36
4 changed files with 27 additions and 3 deletions
+24
View File
@@ -30,6 +30,20 @@ slide. Prints each image's path and size.
--edit draw what the editor shows: placeholder prompts and their dashed outlines
deckcraft-cli render deck.deckcraft --slide 2 slide-3.png",
},
Subcommand {
name: "render-transition",
usage: "render-transition FILE --slide N --t T[,T...] [--width PX] OUT.png",
summary: "draw frames of the transition into a slide as PNG images",
details: "Draws the transition into slide N of FILE at each time T, from 0 (the slide before) to 1 (slide N),
as PNG images. With one T, OUT.png is the image; with several, each frame is written next to it as
OUT-t0.250.png and so on. Prints each image's path, size, transition and time.
--slide N the slide the transition leads into; indices start at 0
--t T,T... the times to draw, comma-separated
--width PX the image width in pixels, twice the slide width in points by default
deckcraft-cli render-transition deck.deckcraft --slide 1 --t 0.25,0.5,0.75 fade.png",
},
Subcommand {
name: "convert",
@@ -114,6 +128,16 @@ and prints its answer as JSON. COMMAND [PARAMS] runs a command, as run --cmd doe
details: "Runs a Model Context Protocol server on stdin and stdout. It works on its own presentation without a
window, or with --connect PORT (or host:port) on the DeckCraft app started with --control PORT.
--sample opens the sample presentation.",
},
Subcommand {
name: "bench",
usage: "bench (FILE | --sample) [--runs N] [--json]",
summary: "time opening, drawing, saving and exporting a presentation",
details: "Times how long FILE, or the sample presentation with --sample, takes to open, to draw each slide, to
save as .deckcraft and .pptx, to reopen as .pptx and to export as .pdf, and the peak memory. Prints the
median and slowest of N runs (5 by default, 1 to 1000) as a table, or as JSON with --json.
deckcraft-cli bench deck.pptx --runs 10",
},
Subcommand {
name: "links",
+1 -1
View File
@@ -14,7 +14,7 @@ fn stderr(o: &Output) -> String {
String::from_utf8_lossy(&o.stderr).into_owned()
}
const SUBCOMMANDS: [&str; 9] = ["info", "render", "convert", "run", "commands", "describe", "app", "mcp", "links"];
const SUBCOMMANDS: [&str; 11] = ["info", "render", "render-transition", "convert", "run", "commands", "describe", "app", "mcp", "bench", "links"];
fn words(s: &str) -> String {
s.split_whitespace().collect::<Vec<_>>().join(" ")
+1 -1
View File
@@ -24,7 +24,7 @@ pub fn specs() -> Vec<CommandSpec> {
cmd!(noundo "file.saveAs", "Save As…", ["File"], Some("Cmd+Shift+S"), "{path, format?}", has_doc, save_as),
cmd!(noundo "file.saveTemplate", "Save as Template…", ["File"], None, "{path}", has_doc, save_as),
cmd!(query "file.saveBytes", "Save to Data", [], None, "{format?: deckcraft|pptx} → {data: base64}", has_doc, save_bytes_cmd),
cmd!(noundo "file.export", "Export…", ["File"], None, "{path, format?: png|jpeg|pptx|deckcraft|outline|pdf (else by path), slide?: index, all?: bool, scale?: px per pt, layout?: slides|notes|handouts (pdf), perPage?: 1|2|3|4|6|9, paper?: letter|a4|legal|a3 (pdf), orientation?: portrait|landscape (pdf), dpi?, slides?: [index]|\"1-3,5\", includeHidden?, textLayer?, frame?}", has_doc, export),
cmd!(noundo "file.export", "Export…", ["File"], None, "{path, format?: png|jpeg|pptx|deckcraft|outline|pdf (else by path), slide?: index, all?: bool, scale?: px per pt, layout?: slides|notes|handouts (pdf), perPage?: 1|2|3|4|6|9, paper?: letter|a4|legal|a3 (pdf), orientation?: portrait|landscape (pdf), dpi?, slides?: [index]|range (\"1-3,5\"), includeHidden?, textLayer?, frame?}", has_doc, export),
cmd!(
query "file.info",
"Info",
+1 -1
View File
@@ -35,7 +35,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Sound",
["Transitions", "Timing"],
None,
"{builtin?: chime|click|camera|whoosh|drumRoll|laser | path? | data: base64, name?; none?: true (No Sound); stopPrevious?: true; loop?: bool (Loop Until Next Sound); index?} — the sound plays as the slide comes in",
"{builtin?: chime|click|camera|whoosh|drumRoll|laser | path? | data: base64, name?, none?: true (No Sound), stopPrevious?: true, loop?: bool (Loop Until Next Sound), index?} — the sound plays as the slide comes in",
has_slide,
sound
),