An HTML diffing app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Will Barton 701bea13da Add a license and README 4 years ago
example Initial proof-of-concept 4 years ago
LICENSE Add a license and README 4 years ago
README.md Add a license and README 4 years ago
contrast.py Clean up command-line argument handling 4 years ago
requirements.txt Initial proof-of-concept 4 years ago
requirements_test.txt Initial proof-of-concept 4 years ago

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 inhttp://www.production.website`.