Skip to main content

parody

A play on parity: keeping the print and web versions of a work in parity.

One authoring toolchain for books and course notebooks: pandoc markdown (with executed jupytext code cells) in, multiple targets out —

  • JSON artifact (schema-versioned; the contract consumed by ricopic.one's Django importer and other tools)
  • standalone HTML preview (no server needed; resolves the artifact's site-template tags itself)
  • print-quality PDF via LaTeX profiles (lualatex/latexmk; generic profile bundled, book-private profiles pluggable)

Parody unifies and replaces the toolchains of two ancestor systems: the homepage-django notebooks pipeline and the rtc-book meta-* book machinery. See NEW_PROJECT_SEED_PLAN.md for the full plan.

Install / develop

Requires Python ≥ 3.11 and pandoc (pinned version in parody/toolchain.py), or use the Dockerfile/devcontainer.

uv sync          # create venv + install
uv run parody --help
uv run pytest    # golden tests need the ancestor corpora; see tests/golden/

CLI

parody init <dir>                          # scaffold a content repo (incl. CI workflow)
parody build <project_dir> <output.json> [--clozes blank|key|full]  # JSON artifact
parody preview <project_dir> -o preview    # static HTML site for review
parody watch <project_dir>                 # rebuild on save (pip install 'parody[watch]')
parody pdf <project_dir> [--solutions] [--clozes MODE] [--section ch/sec]  # print PDF (needs TeX)
parody check <artifact.json>               # validate artifact against schema
parody check --toolchain                   # verify pinned toolchain versions

Content repos use parody.yaml + chapters/<ch>/<sec>.md; the legacy System A layout (__meta.yaml + chapter_*/) builds bit-compatibly and remains covered by golden tests.

Fill-in-the-blank (cloze) content

[answer]{.cloze} hides text behind a blank sized to it; []{.blank size=lg} is an empty blank with nothing behind it (sm/md/lg/xl = 2/5/10/20 em, or width=4cm). Block forms: ::: {.blank lines=6} for work space, ::: {.cloze} for a hidden passage. Inside math, use the macros — a span cannot live inside $…$: $\tau = \cloze{RC}$, $y = \clozeblank{3em}$. A figure can carry incomplete artwork with cloze="fig-blank.pdf", or by putting a <stem>-cloze.<ext> sibling next to it.

Three build modes, set by --clozes (or cloze: {default: …} in parody.yaml), independent of --solutions:

mode who it is for
blank (default) student handout — answers replaced by rules at build time
key instructor copy — answers shown, accented
full publication — answers as ordinary text, blanks dropped entirely
parody pdf . --clozes blank
parody build . artifact/book-full.json --clozes full

In blank mode the answer never reaches the browser or the PDF content stream — it is removed at build time, not hidden with CSS. Print measures the real box with \settowidth, so widths are exact; the web estimates from character count. A cloze inside an exercise solution always renders full.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parody-0.46.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parody-0.46.0-py3-none-any.whl (218.9 kB view details)

Uploaded Python 3

File details

Details for the file parody-0.46.0.tar.gz.

File metadata

  • Download URL: parody-0.46.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for parody-0.46.0.tar.gz
Algorithm Hash digest
SHA256 2af9c5ee2d60b16402a89649a6d10d101bfdd7beaf4f9fca148b2aef373018f7
MD5 cf7b1ababbf4e3abf662e8e90a7f8c00
BLAKE2b-256 518682e9e346f19c6d5f40f8fa48ab76bf51c9da8865a4c901b46b256424730d

See more details on using hashes here.

File details

Details for the file parody-0.46.0-py3-none-any.whl.

File metadata

  • Download URL: parody-0.46.0-py3-none-any.whl
  • Upload date:
  • Size: 218.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for parody-0.46.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20b67d4111fa75b3a834326a6d741c0e4cb954c1a01e0ad5159c6e57ea8b5052
MD5 e4c8fd48b74d5adee88eca90eaf7ad1a
BLAKE2b-256 53d52f978c4fb3ab1e42a22d04f19b47896e634434486730913275f9ab0e2434

See more details on using hashes here.

Release history Release notifications | RSS feed

0.57.1

2 files

0.55.0

2 files

0.54.4

2 files

0.54.3

2 files

0.54.2

2 files

0.54.1

2 files

0.54.0

2 files

0.53.0

2 files

0.52.2

2 files

0.52.1

2 files

0.52.0

2 files

0.51.0

2 files

0.50.1

2 files

0.50.0

2 files

0.49.0

2 files

0.48.0

2 files

0.47.0

2 files

0.46.1

2 files

This release

0.46.0 This release

2 files

0.45.0

2 files

0.43.0

2 files

0.42.0

2 files

0.41.0

2 files

0.40.0

2 files

0.39.0

2 files

0.38.0

2 files

0.37.0

2 files

0.36.0

2 files

0.35.2

2 files

0.35.1

2 files

0.35.0

2 files

0.34.2

2 files

0.34.1

2 files

0.34.0

2 files

0.33.0

2 files

0.32.0

2 files

0.31.0

2 files

0.30.0

2 files

0.29.4

2 files

0.29.3

2 files

0.29.2

2 files

0.29.1

2 files

0.28.1

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page