Skip to content

Instantly share code, notes, and snippets.

@PiotrCzapla
Last active September 9, 2026 20:35
Show Gist options
  • Select an option

  • Save PiotrCzapla/be8dad0390ef7443b2c3b8acd8fcf987 to your computer and use it in GitHub Desktop.

Select an option

Save PiotrCzapla/be8dad0390ef7443b2c3b8acd8fcf987 to your computer and use it in GitHub Desktop.
Included recording guides: literal ID suffixes

Included recording guides

Scope values are literal ID suffixes. Save the Markdown as scopes.md and the Python as build.py, then run python build.py with the reviewed code installed.

# Recording guide

Use both guides before recording. Compare [@sec-setup__mic; @sec-setup__camera].

::: {.include scope="__mic"}
# Microphone guide

## Setup {#sec-setup}

Connect the microphone and set the input level.

## Sound check {#sec-check}

Record ten seconds and listen through headphones. Recheck [@sec-setup] if the signal is too quiet.
:::

::: {.include scope="__camera"}
# Camera guide

## Setup {#sec-setup}

Place the camera at eye level and check the framing.

## Picture check {#sec-check}

Record a short clip and inspect the focus. Recheck [@sec-setup] if the picture is soft.
:::
from pathlib import Path
from mdhtml import md2mdhtml
from mdhtml2docx import mdhtml2docx

root = Path(__file__).parent
html = md2mdhtml((root/'scopes.md').read_text())
(root/'scopes.mdhtml').write_text(html)
print(mdhtml2docx(html, root/'scopes.docx', number_headings='decimal'))

This is an actual LibreOffice render. The suffix version produces the same visible page as the earlier example; its bookmark names and source use suffixes.

Rendered recording guides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment