htmlcmp 2.2.0__tar.gz → 2.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/PKG-INFO +37 -1
- htmlcmp-2.3.0/README.md +85 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/pyproject.toml +4 -1
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp/compare_output_server.py +311 -393
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp/html_render_diff.py +24 -4
- htmlcmp-2.3.0/src/htmlcmp/static/common.js +38 -0
- htmlcmp-2.3.0/src/htmlcmp/static/compare.js +340 -0
- htmlcmp-2.3.0/src/htmlcmp/static/index.js +152 -0
- htmlcmp-2.3.0/src/htmlcmp/static/style.css +253 -0
- htmlcmp-2.3.0/src/htmlcmp/templates/compare.html +104 -0
- htmlcmp-2.3.0/src/htmlcmp/templates/index.html +69 -0
- htmlcmp-2.3.0/src/htmlcmp/templates/missing.html +15 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp.egg-info/PKG-INFO +37 -1
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp.egg-info/SOURCES.txt +7 -0
- htmlcmp-2.2.0/README.md +0 -49
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/setup.cfg +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp/__init__.py +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp/common.py +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp/compare_output_cli.py +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp/tidy_output.py +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp.egg-info/dependency_links.txt +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp.egg-info/entry_points.txt +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp.egg-info/requires.txt +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/src/htmlcmp.egg-info/top_level.txt +0 -0
- {htmlcmp-2.2.0 → htmlcmp-2.3.0}/tests/test_html_render_diff.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: htmlcmp
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Compare HTML files by rendered output
|
|
5
5
|
Author: Andreas Stefl
|
|
6
6
|
Maintainer-email: Andreas Stefl <stefl.andreas@gmail.com>
|
|
@@ -29,6 +29,42 @@ Provides various entry points to run:
|
|
|
29
29
|
|
|
30
30
|
Used for regression testing in https://github.com/opendocument-app/OpenDocument.core.
|
|
31
31
|
|
|
32
|
+
## Reviewing differences in the browser
|
|
33
|
+
|
|
34
|
+
`compare-html-server` serves two pages:
|
|
35
|
+
|
|
36
|
+
- the **overview** lists every comparable file with its status (`same`,
|
|
37
|
+
`different`, `pending`), a search box, status filters with counts, and an
|
|
38
|
+
`update ref` button per file plus `Update all in view`
|
|
39
|
+
- the **compare page** (click a path) shows reference (A) and monitored (B)
|
|
40
|
+
side by side with synchronised scrolling, a diff strip in between, and the
|
|
41
|
+
controls to work through a review
|
|
42
|
+
|
|
43
|
+
On the compare page:
|
|
44
|
+
|
|
45
|
+
- **Update reference** copies the monitored file over the reference one; the
|
|
46
|
+
file is then marked `✓ accepted` for the rest of the session (the mark
|
|
47
|
+
disappears again if the monitored file changes afterwards)
|
|
48
|
+
- **← / →** step to the previous and next document; tick *diffs only* to skip
|
|
49
|
+
files that already match
|
|
50
|
+
- the **diff strip** maps the whole page into the column: red bars mark the
|
|
51
|
+
regions that differ, the blue box marks the visible part of the document, and
|
|
52
|
+
a click jumps both panes to that position
|
|
53
|
+
|
|
54
|
+
| key | action |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `←` / `k`, `→` / `j` | previous / next document |
|
|
57
|
+
| `1` / `2` / `3` | reference only / side by side / monitored only |
|
|
58
|
+
| `d` | toggle the diff strip |
|
|
59
|
+
| `u` | update the reference |
|
|
60
|
+
| `r` | reload both panes |
|
|
61
|
+
| `Esc` | back to the overview |
|
|
62
|
+
| `?` | shortcut help |
|
|
63
|
+
|
|
64
|
+
Comparison results are computed live, so the pages update themselves while the
|
|
65
|
+
monitored directory is being regenerated. Accepted marks are kept in memory
|
|
66
|
+
only and are gone after a restart.
|
|
67
|
+
|
|
32
68
|
## Install via PyPI
|
|
33
69
|
|
|
34
70
|
```bash
|
htmlcmp-2.3.0/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# htmlcmp
|
|
2
|
+
|
|
3
|
+
Tool to compare (generated) HTML files visually and automatically using Selenium.
|
|
4
|
+
|
|
5
|
+
Provides various entry points to run:
|
|
6
|
+
- `compare-html` is a CLI tool to compare two directory structures containing HTML files
|
|
7
|
+
- `compare-html-server` starts a webserver and allows to inspect differences manually
|
|
8
|
+
- `html-render-diff` renders two HTML files and produces images
|
|
9
|
+
- `html-tidy` allows to run HTML tidy on a directory
|
|
10
|
+
|
|
11
|
+
Used for regression testing in https://github.com/opendocument-app/OpenDocument.core.
|
|
12
|
+
|
|
13
|
+
## Reviewing differences in the browser
|
|
14
|
+
|
|
15
|
+
`compare-html-server` serves two pages:
|
|
16
|
+
|
|
17
|
+
- the **overview** lists every comparable file with its status (`same`,
|
|
18
|
+
`different`, `pending`), a search box, status filters with counts, and an
|
|
19
|
+
`update ref` button per file plus `Update all in view`
|
|
20
|
+
- the **compare page** (click a path) shows reference (A) and monitored (B)
|
|
21
|
+
side by side with synchronised scrolling, a diff strip in between, and the
|
|
22
|
+
controls to work through a review
|
|
23
|
+
|
|
24
|
+
On the compare page:
|
|
25
|
+
|
|
26
|
+
- **Update reference** copies the monitored file over the reference one; the
|
|
27
|
+
file is then marked `✓ accepted` for the rest of the session (the mark
|
|
28
|
+
disappears again if the monitored file changes afterwards)
|
|
29
|
+
- **← / →** step to the previous and next document; tick *diffs only* to skip
|
|
30
|
+
files that already match
|
|
31
|
+
- the **diff strip** maps the whole page into the column: red bars mark the
|
|
32
|
+
regions that differ, the blue box marks the visible part of the document, and
|
|
33
|
+
a click jumps both panes to that position
|
|
34
|
+
|
|
35
|
+
| key | action |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `←` / `k`, `→` / `j` | previous / next document |
|
|
38
|
+
| `1` / `2` / `3` | reference only / side by side / monitored only |
|
|
39
|
+
| `d` | toggle the diff strip |
|
|
40
|
+
| `u` | update the reference |
|
|
41
|
+
| `r` | reload both panes |
|
|
42
|
+
| `Esc` | back to the overview |
|
|
43
|
+
| `?` | shortcut help |
|
|
44
|
+
|
|
45
|
+
Comparison results are computed live, so the pages update themselves while the
|
|
46
|
+
monitored directory is being regenerated. Accepted marks are kept in memory
|
|
47
|
+
only and are gone after a restart.
|
|
48
|
+
|
|
49
|
+
## Install via PyPI
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install htmlcmp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Download and run the docker image
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
docker pull ghcr.io/opendocument-app/odr_core_test
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
docker run -ti \
|
|
63
|
+
-v $(pwd):/repo \
|
|
64
|
+
-p 8000:8000 \
|
|
65
|
+
ghcr.io/opendocument-app/odr_core_test \
|
|
66
|
+
compare-html-server /repo/REFERENCE /repo/MONITORED --compare --driver firefox --port 8000
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Manually build the docker image
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
docker build --tag odr_core_test test/docker
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Run locally
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
PYTHONPATH=$(pwd)/src:$PYTHONPATH python ./src/htmlcmp/compare_output_server.py \
|
|
79
|
+
/path/to/REFERENCE \
|
|
80
|
+
/path/to/MONITORED \
|
|
81
|
+
--compare \
|
|
82
|
+
--driver firefox \
|
|
83
|
+
--port 8000 \
|
|
84
|
+
-vv
|
|
85
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "htmlcmp"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.3.0"
|
|
4
4
|
description = "Compare HTML files by rendered output"
|
|
5
5
|
classifiers = []
|
|
6
6
|
authors = [
|
|
@@ -33,6 +33,9 @@ download = "https://pypi.org/project/pyodr/#files"
|
|
|
33
33
|
tracker = "https://github.com/opendocument-app/compare-html/issues"
|
|
34
34
|
"release notes" = "https://github.com/opendocument-app/compare-html/releases"
|
|
35
35
|
|
|
36
|
+
[tool.setuptools.package-data]
|
|
37
|
+
htmlcmp = ["templates/*.html", "static/*.css", "static/*.js"]
|
|
38
|
+
|
|
36
39
|
[tool.pytest.ini_options]
|
|
37
40
|
pythonpath = ["src"]
|
|
38
41
|
|