htmlsz
Estimate rendered HTML height without a browser.
Usage
from htmlsz import estimate_height
estimate_height("<p>Hello world</p>")
estimate_height('<img src="plot.png">', img_dir=".")
estimate_height is tuned for SolveIt-style HTML fragments such as:
- markdown rendered into
<div class="prose">... - Pygments
<div class="highlight"><pre>... - mixed notebook outputs containing
<pre>,<img>, markdown HTML, and raw fragments
It returns content height only. Card chrome and wrapper padding should be added by the caller if needed.
Development
pip install -e .[dev]
Versioning
Version lives in htmlsz/__init__.py as __version__.
Bump it with:
ship_bump --part 2 # patch
ship_bump --part 1 # minor
ship_bump --part 0 # major
Release
- Ensure your GitHub issues are labeled (
bug,enhancement,breaking). - Run:
ship_release_gh
ship_pypi
Metadata
Release files for htmlsz 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| htmlsz-0.1.0.tar.gz | 11.6 kB | Without provenance | Details for htmlsz-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| htmlsz-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for htmlsz-0.1.0-py3-none-any.whl |
Total release size: 21.3 kB
Release files / htmlsz-0.1.0.tar.gz
| Download URL | htmlsz-0.1.0.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7f118be8374f539a59e119d2b3ac04ba5560dc2e8a6730c6e84f3b9f469e44c
|
|
BLAKE2b-256 checksum How to use checksums |
0338ac69d02931adb6c1fdd984f8a6552aa0ed16a3813d4d96e7d48689071fbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / htmlsz-0.1.0-py3-none-any.whl
| Download URL | htmlsz-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1afa1f8362a653c10115f49f8cd02cc4dcde6f93f386457bc5f6c7bfeaca0b0b
|
|
BLAKE2b-256 checksum How to use checksums |
c1262e65f13043845191f522e4ab0b142b790236fe8305cc0bfa8aea9a1815af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for htmlsz 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.