Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,42 @@ Provides various entry points to run:

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

## Reviewing differences in the browser

`compare-html-server` serves two pages:

- the **overview** lists every comparable file with its status (`same`,
`different`, `pending`), a search box, status filters with counts, and an
`update ref` button per file plus `Update all in view`
- the **compare page** (click a path) shows reference (A) and monitored (B)
side by side with synchronised scrolling, a diff strip in between, and the
controls to work through a review

On the compare page:

- **Update reference** copies the monitored file over the reference one; the
file is then marked `✓ accepted` for the rest of the session (the mark
disappears again if the monitored file changes afterwards)
- **← / →** step to the previous and next document; tick *diffs only* to skip
files that already match
- the **diff strip** maps the whole page into the column: red bars mark the
regions that differ, the blue box marks the visible part of the document, and
a click jumps both panes to that position

| key | action |
| --- | --- |
| `←` / `k`, `→` / `j` | previous / next document |
| `1` / `2` / `3` | reference only / side by side / monitored only |
| `d` | toggle the diff strip |
| `u` | update the reference |
| `r` | reload both panes |
| `Esc` | back to the overview |
| `?` | shortcut help |

Comparison results are computed live, so the pages update themselves while the
monitored directory is being regenerated. Accepted marks are kept in memory
only and are gone after a restart.

## Install via PyPI

```bash
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ download = "https://pypi.org/project/pyodr/#files"
tracker = "https://github.com/opendocument-app/compare-html/issues"
"release notes" = "https://github.com/opendocument-app/compare-html/releases"

[tool.setuptools.package-data]
htmlcmp = ["templates/*.html", "static/*.css", "static/*.js"]

[tool.pytest.ini_options]
pythonpath = ["src"]

Expand Down
Loading
Loading