Delegates to deckifyr build in the bundled Python engine: plans
(deckifyr.plan) and composes (deckifyr.pptx, spec section 10) a
.pptx and manifest for text/markdown/image/shape/group/
table/reportifyr/quarto elements. A quarto element requires
the external quarto binary on PATH (spec section 8.1, issue #3);
every other element type needs nothing beyond this package's own
Python dependencies.
Usage
deck_build(
presentation,
strict = TRUE,
rscript_bin = NULL,
quarto_bin = NULL,
soffice_bin = NULL,
trusted_binaries_only = FALSE,
allow_outside_project = FALSE
)Arguments
- presentation
Path to
presentation.yaml.- strict
Reject unitless geometry when
TRUE(default).- rscript_bin, quarto_bin, soffice_bin
Run this executable instead of whatever
presentation.yaml'sbuild.reportifyr.flextable.binary,build.quarto.binaryorbuild.preview.binarysays (NULL, the default, keeps the project file's own setting). For a launcher that treats project files as untrusted user data (deckifyr.policy).- trusted_binaries_only
If
TRUE, a project file that names a non-defaultbinary(and no override was given for it) fails withE_UNTRUSTED_BINARYbefore anything runs, anddesign.base,layouts,build.output,build.manifestandbuild.reportifyr's paths must stay inside the project (E_PATH_OUTSIDE_PROJECT). DefaultFALSE: existing projects behave exactly as before.- allow_outside_project
With
trusted_binaries_only = TRUE, let those paths resolve outside the project (e.g. a shared organization design). DefaultFALSE.
Value
A parsed list from the CLI's JSON output:
outputThe written
.pptxpath.manifestThe manifest path, or
NULLifpresentation.yaml'sbuild.manifestis unset.slide_countNumber of slides composed.
warning_countNumber of non-fatal build warnings – includes a skipped preview render when
build.previews: trueand LibreOffice isn't installed.warningsThe warnings themselves, a list with one entry per warning:
code(a stable identifier such as"W_MISSING_SIDECAR"),message, and theslide/elementids it came from (NULLfor a build-level warning). Present whether or not a manifest is written.previewsPer-slide preview PNG paths, only non-empty when
build.previews: trueactually rendered them.preview_pdfThe intermediate PDF LibreOffice produced alongside those PNGs, or
NULLif previews weren't rendered.artifactsA list of every file the build produced (
kind,path,sha256), so provenance can be recorded without re-hashing.status,result_version"ok"and the version of the result schema (currently1); new keys may be added within a version, so treat unknown entries as ignorable.
Details
presentation.yaml's build.previews: true makes an ordinary build
also render a PNG per slide (plus the intermediate PDF LibreOffice
produces along the way) alongside the .pptx – the same thing the
web editor's own "Render slide previews" checkbox controls (see
vignette("web-app")). Unlike deck_preview(), a missing LibreOffice
here does not fail the build: it's an opportunistic, secondary output
riding along on a build whose actual deliverable (the .pptx) has
already been written to disk by the time previews would render, so a
missing soffice only adds one entry to the returned list's
warning_count/manifest warnings – output/manifest are still
returned normally. deck_preview() has no such fallback: rendering
previews is its entire purpose, so a missing LibreOffice there is
always a hard failure.
Examples
if (FALSE) { # \dontrun{
# Build the bundled minimal example project (requires a provisioned
# Python/uv/pyro toolchain -- see vignette("getting-started")).
presentation <- system.file(
"examples", "minimal-deck", "presentation.yaml",
package = "deckifyr"
)
result <- deck_build(presentation)
result$output
} # }
