Skip to main content

Turn an HTML page into slide decks (PDF/SVG) through several engines at once.

Project description

vexy-dex

Turn any web page into slide decks — several at once — and keep the slides you like.

vexy-dex takes one URL, figures out where the slides hiding inside the page should break, and renders it to PDF through several engines in parallel. Each engine writes its own folder of single-page PDFs. You skim the folders and build your final deck from the best version of each slide: the hero from one engine, the text-heavy slides from another. No two engines paginate a page the same way, and that's the whole point — you get a menu, not a verdict.

It runs offline after the first fetch, it's a single Python CLI, and it doesn't try to be a slide editor.

Status: specification complete, implementation starting. This repo currently holds the design — see spec/. The roadmap is in spec/24 and TODO.md.

Why it exists

Web pages are infinite vertical scrolls; slides are fixed 16:9 rectangles. Forcing one into the other with a naive "print to PDF" cuts headings in half and orphans images. vexy-dex paginates intelligently — it renders the page at the real slide size, watches where the browser actually breaks content, and snaps slide boundaries to sections and headings instead of arbitrary pixel rows.

Then it refuses to pick a winner. A Webflow hero looks best through Chromium; a documentation page looks best through a pure-CSS print engine. vexy-dex runs them all and lets you choose.

How it works

A six-stage pipeline, orchestrated in Python, shelling out to browser and Node engines where they do the job better:

  1. Read — fetch the HTML and download every asset so it works offline.
  2. Analyze — recognize the page (Webflow, MkDocs Material, …) and plan the slide breaks at your target aspect ratio.
  3. Normalize — restructure the DOM into clean, slide-shaped sections.
  4. Prepare — inject the paged-media CSS / reveal.js wrapping each engine wants.
  5. Render — export to PDF through every chosen engine, in parallel.
  6. Write — split each PDF into named single-page slides, optionally as SVG, with an HTML preview to browse.

The full design is 24 chapters in spec/; the tool decisions and their rationale are in RESEARCH.md.

Planned usage

# Everything, every available strategy, default 16:9
vexy-dex build https://www.vexy.art/lines/

# Pick strategies and aspect ratio, also emit SVGs
vexy-dex build https://blog.fontlab.com/ \
    --strategies weasyprint,playwright --aspect 4:3 --svg

# Re-run a single stage on an existing PDF
vexy-dex split out/lines/playwright/_combined.pdf --out out/lines/playwright --svg

Output lands as:

out/lines/
  playwright/   01-slide.pdf  02-slide.pdf  …  index.html
  weasyprint/   01-slide.pdf  …
  decktape/     01-slide.pdf  …
  _meta/        slideplan.json  run-summary.json

A failed engine degrades to a warning — the run still gives you the decks that worked, and tells you how to fix the one that didn't.

What it recognizes

  • Webflow — absorbs and modernizes the webflow2reveal transform (now first-class vexy-dex code, superseding that legacy tool): each section becomes a slide, chrome is dropped, backgrounds are classified light/dark.
  • MkDocs Material — extracts the content column, splits by heading, keeps code blocks and tables intact.
  • Everything else — a generic path (via trafilatura) extracts the article body and splits by <h2>. Bubble, Docusaurus, and Framer get light-touch rules on top.

New frameworks are plugins, not core changes.

The engines

Strategy Engine Best for
playwright Headless Chromium Webflow, JS-heavy, highly styled pages
weasyprint Pure-Python CSS MkDocs and other clean, static HTML
vivliostyle Chromium typesetting Long-form / documentation, strong paged media
decktape Puppeteer + reveal.js The reveal.js path, crisp per-slide capture
prince PrinceXML (opt-in) Reference-quality paged media, if you have a licence

Install only what you want — a strategy whose tool is missing is skipped with a note, never a crash.

Optional: smarter breaks with a local vision model

For pages with no clean structure, vexy-dex can ask a small local vision-language model (MiniCPM-V 4.6, via Ollama or llama.cpp) to refine the slide breaks from a screenshot. It's strictly opt-in (--vision), cached, and never required — the deterministic plan always runs first.

Requirements (planned)

  • Python 3.12+, installed with uv.
  • Playwright Chromium (playwright install chromium).
  • Optional: Node (@vivliostyle/cli, decktape), monolith, poppler (for SVG, pulled in by vexy-pdfsvgpy), Prince, and Ollama/llama.cpp for vision.

Project layout

spec/           # the 24-chapter specification (start at 00-tldr.md)
research/       # the source research reports
RESEARCH.md     # synthesized conclusions and tool decisions
IDEA.md         # the original concept, kept in sync
TODO.md         # actionable task list, linked to spec chapters
CLAUDE.md       # guidance for AI coding agents / contributors

Contributing

Read spec/00-tldr.md and CLAUDE.md first. The spec is the contract: implement against a chapter, and if you must deviate, update that chapter in the same change. Tests run offline against fixtures; every function gets one.

Licence

See LICENSE. Note the dependency licence hazards documented in spec/24 (Vivliostyle and PyMuPDF are AGPL; Prince is proprietary) — vexy-dex shells out to AGPL engines rather than linking them.

Project details


Download files

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

Source Distribution

vexy_dex-1.0.1.tar.gz (344.4 kB view details)

Uploaded Source

Built Distribution

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

vexy_dex-1.0.1-py3-none-any.whl (87.8 kB view details)

Uploaded Python 3

File details

Details for the file vexy_dex-1.0.1.tar.gz.

File metadata

  • Download URL: vexy_dex-1.0.1.tar.gz
  • Upload date:
  • Size: 344.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vexy_dex-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e898b8093b1464498fcadf28ac5a18b96e5710c8bed7a07f9f8ea8b4777c1648
MD5 5a02c6b4baffb21b1a2f86b8c5841a4c
BLAKE2b-256 ee5decdcb5a43003edcfa3c3bcf8188e8f82b5643f90e0c501978e95e8dbf505

See more details on using hashes here.

File details

Details for the file vexy_dex-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: vexy_dex-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 87.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vexy_dex-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a00dfd84deecad482dab53fe10d1a7e90c6dfdcfa0723b13e93b6a45225510ff
MD5 4913b06d9529973c4448974d31fba558
BLAKE2b-256 76561146d923f7fd52d6d11cafe35013e411b72c3d9dc38374933e0aa62792cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page