An HTML diffing app
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
LICENSE
README.md
contrast.py
requirements.txt
requirements_test.txt

README.md

Contrast

Contrast is a little utility that allows you to see HTML diffs in a web browser. The idea is that you have two running web servers that serve up the same layout but different content within a specific CSS selector. Contrast runs its own web server, and for every request's path, it make the same request to two configured web servers (left and right sides of the diff), diffs them, and then returns the diffed page (with HTML <ins> and <del> tags) as the response.

Usage

A virtual environment using Python 3.4 is recommended. Dependencies can be installed from the requirements.txt file:

pip install requirements.txt

To run the contrast webserver:

./contrast.py --left www.production.website --right localhost:8080 --selector #content

This will insert <del> tags for everything within #content on http://www.production.website that does not exist in http://localhost:8080'. It will insert tags for everything withinhttp://localhost:8080` that does not exist in http://www.production.website.