html-snapshot
Capture any HTML page as a PNG and (optionally) emit a structured layout report for automated checks.
Quick start (no install)
# one-time: ensure Playwright's Chromium runtime is available
uvx playwright install chromium
# generate a slide screenshot, plus an optional JSON layout report
uvx html-snapshot /path/to/slide.html \
--output slide.png \
--report slide.json
uvx runs the tool in an isolated environment downloaded from PyPI. The script auto-installs Chromium if it is missing (skip with --no-auto-install).
Install once, reuse often
Prefer a persistent CLI?
uv tool install html-snapshot # adds `html-snapshot` to your PATH
html-snapshot /path/to/slide.html --output slide.png --report slide.json
Or use pip:
pip install html-snapshot
html-snapshot /path/to/slide.html --output slide.png
CLI options
| Option | Description |
|---|---|
html_path |
Path to the local HTML file to render |
-o / --output |
Output PNG path (default: input with .png suffix) |
--report |
Optional JSON layout report (words, bounding boxes, warnings) |
--width / --height |
Viewport size (default: 1400×900) |
--delay |
Wait time after load before capture |
--no-full-page |
Capture only the viewport |
--no-auto-install |
Require Chromium to be pre-installed |
Direct-from-GitHub fallback
If you’d rather run the latest commit without PyPI:
uvx --from git+https://github.com/oneryalcin/html-snapshot html-snapshot sample.html --output slide.png
Release files for html-snapshot 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| html_snapshot-0.1.3.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| html_snapshot-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / html_snapshot-0.1.3.tar.gz
| Download URL | html_snapshot-0.1.3.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e75c9eaf450ddc0c42bbb8de36dcdc7abff5b5800fccae1aa147a54d5a24c54
|
|
BLAKE2b-256 checksum How to use checksums |
f24a08df6d130d152f4e7c010211ae9bdd63ceb7c466d2240657351817d3c8b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.5
|
Release files / html_snapshot-0.1.3-py3-none-any.whl
| Download URL | html_snapshot-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0fa501f7d0e087dfb21c4c332c52384f7e42aea9a8be2b1b84d5c87ee9c7958
|
|
BLAKE2b-256 checksum How to use checksums |
7faf1f0aa54a7d06fe7c09c76efcfd2ebc524163d61cd1f1143182a7292c952b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.5
|