---
name: markdown-deck
description: Markdown → polished slide deck. Splits on `---` separators, each section becomes a slide. Outputs a single self-contained HTML file with arrow-key navigation, OR a PDF via headless Chrome / wkhtmltopdf. Built-in dark editorial theme with serif headlines, monospace body, optional accent color. No extra deps beyond Python stdlib + the markdown library. Use when the user asks for a presentation, slide deck, pitch deck, talk slides, or wants to "turn this README into slides".
---


# markdown-deck

Turn any markdown file into a polished slide deck.

## How it works
- Splits the input markdown on lines that are exactly `---`
- Each chunk becomes one slide
- Renders to a single self-contained HTML file (CSS + JS embedded) — no internet, no reveal.js
- Arrow keys (or space / page-up / page-down) navigate. `F` toggles fullscreen. `Home` / `End` jump to first/last slide.
- Optional PDF export via headless Chrome (preferred) or wkhtmltopdf

## Usage

```
python3 scripts/deck.py --input talk.md
python3 scripts/deck.py --input talk.md --output talk.html
python3 scripts/deck.py --input talk.md --format pdf --output talk.pdf
python3 scripts/deck.py --input talk.md --accent "#ff3b3b" --title "Q4 Plan"
python3 scripts/deck.py --input talk.md --theme light
```

## Flags

- `--input` (required) — path to markdown file
- `--output` — output path. Defaults to `<input-stem>.html` (or `.pdf` for `--format pdf`)
- `--format` — `html` (default) or `pdf`
- `--accent` — hex color for the accent stripe / links / progress bar (default `#ff3b3b`)
- `--title` — deck title in the browser tab. Defaults to first H1 or filename
- `--theme` — `dark` (default) or `light`

## Theme

Dark editorial: bg `#0a0a0a`, fg `#f5f5f5`, serif H1 (Charter / Times), monospace body (Menlo / JetBrains Mono), thin accent stripe top-left, slide counter bottom-right.

Light flips to bg `#fafafa` / fg `#0a0a0a` and keeps the same typography.

## PDF

Tries in order: `chromium`, `chromium-browser`, `chrome`, `Google Chrome`, `google-chrome`, then `wkhtmltopdf`. If none available, prints an install hint and exits.
