|
4 years ago | |
---|---|---|
example | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
contrast.py | 4 years ago | |
requirements.txt | 4 years ago | |
requirements_test.txt | 4 years ago |
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.
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 within
http://localhost:8080 that does not exist in
http://www.production.website`.