One-off benchmark harness to compare:
JustHTML(html).to_markdown()BeautifulSoup(html, "lxml").get_text()with a small newline cleanup
Install dependencies (recommended: use a virtualenv):
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txtIf python -m venv fails on Debian/Ubuntu, install python3-venv and retry.
python benchmark.py --n 100 --rounds 20To run only one engine:
python benchmark.py --engine justhtml --n 100 --rounds 20
python benchmark.py --engine bs4 --n 100 --rounds 20Put exported .html emails in a directory and run:
python benchmark.py --dir /path/to/htmls --n 100 --rounds 20Notes:
- Only the first
--nfiles (sorted by filename) are used. - JustHTML output is Markdown; bs4 output is plain text.