Metadata-Version: 2.4
Name: htmlcmp
Version: 1.2.2
Summary: Compare HTML files by rendered output
Author: Andreas Stefl
Maintainer-email: Andreas Stefl <stefl.andreas@gmail.com>
Project-URL: homepage, https://opendocument.app/
Project-URL: source, https://github.com/opendocument-app/compare-html
Project-URL: download, https://pypi.org/project/pyodr/#files
Project-URL: tracker, https://github.com/opendocument-app/compare-html/issues
Project-URL: release notes, https://github.com/opendocument-app/compare-html/releases
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: pillow
Requires-Dist: selenium
Requires-Dist: flask
Requires-Dist: watchdog

# htmlcmp

Tool to compare (generated) HTML files visually and automatically using Selenium.

Provides various entry points to run:
- `compare-html` is a CLI tool to compare two directory structures containing HTML files
- `compare-html-server` starts a webserver and allows to inspect differences manually
- `html-render-diff` renders two HTML files and produces images
- `html-tidy` allows to run HTML tidy on a directory

Used for regression testing in https://github.com/opendocument-app/OpenDocument.core.

## Install via PyPI

```bash
pip install htmlcmp
```

## Download and run the docker image

```bash
docker pull ghcr.io/opendocument-app/odr_core_test
```

```bash
docker run -ti \
  -v $(pwd):/repo \
  -p 8000:8000 \
  ghcr.io/opendocument-app/odr_core_test \
  compare-html-server /repo/REFERENCE /repo/MONITORED --compare --driver firefox --port 8000
```

## Manually build the docker image

```bash
docker build --tag odr_core_test test/docker
```

## Run locally

```bash
PYTHONPATH=$(pwd)/src:$PYTHONPATH python ./src/htmlcmp/compare_output_server.py \
  /path/to/REFERENCE \
  /path/to/MONITORED \
  --compare \
  --driver firefox \
  --port 8000 \
  -vv
```
