diff --git a/great_docs/core.py b/great_docs/core.py index 371156cb..12823c53 100644 --- a/great_docs/core.py +++ b/great_docs/core.py @@ -15193,14 +15193,19 @@ def _write_metadata_partial(self, config: dict) -> None: html_config["template-partials"] = partials def _prerender_term_player(self, log) -> None: # pragma: no cover - """Pre-render .termshow recordings into SVG keyframes + manifest.json. + """ + Pre-render `.termshow` recordings for the Quarto shortcode + + Render recordings from the source directory as SVG keyframes and a + `manifest.json`, applying companion `.termshow.yml` scripts when present. + Write output to `/termshow//`. + Paths are relative to the source directory, so recordings with the same name + in different directories have separate output directories. - Discovers all .termshow files in the project root, applies any - companion .termshow.yml scripts, and renders SVG frames into - great-docs/termshow// so the Quarto - shortcode can reference them. Keying output by relative path (rather - than basename) keeps same-named recordings in different directories - from overwriting each other. + Parameters + ---------- + log : + Build logger that receives progress and warning messages. """ # Find all .termshow files in the project root (they live outside @@ -15215,15 +15220,12 @@ def _prerender_term_player(self, log) -> None: # pragma: no cover if not termshow_files: return - try: - from great_docs._term_player import ( - apply_script, - generate_manifest, - parse_termshow, - ) - from great_docs._term_player.script import load_script - except ImportError: - return + from great_docs._term_player import ( + apply_script, + generate_manifest, + parse_termshow, + ) + from great_docs._term_player.script import load_script rendered_count = 0 manifest_bytes = 0