Metadata-Version: 2.4
Name: htmlsz
Version: 0.1.0
Summary: Estimate rendered HTML height without a browser
Author: htmlsz contributors
License: Apache-2.0
Project-URL: Homepage, https://github.com/AnswerDotAI/htmlsz
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lxml
Requires-Dist: Pillow
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: fastship; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# htmlsz

Estimate rendered HTML height without a browser.

## Usage

```python
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

```bash
pip install -e .[dev]
```

## Versioning

Version lives in `htmlsz/__init__.py` as `__version__`.
Bump it with:

```bash
ship_bump --part 2   # patch
ship_bump --part 1   # minor
ship_bump --part 0   # major
```

## Release

1) Ensure your GitHub issues are labeled (`bug`, `enhancement`, `breaking`).
2) Run:

```bash
ship_release_gh
ship_pypi
```
