Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Latest commit

 

History

History
74 lines (50 loc) · 1.51 KB

README.md

File metadata and controls

74 lines (50 loc) · 1.51 KB

URLdiff

Computes and displays the visual differences between two URLs

urldiff takes two URLs, renders them as images and compares them pixel by pixel outputs the visual difference in percentage between the two URLs and and generates a colour image of the differences.

Gem Version

Install:

gem install urldiff

Requires:

  • Gems
gem install oily_png imgkit wkhtmltoimg_binary

Tested on Ruby 2.1.0

Usage:

urldiff.rb -i sitelist.csv -o output.csv

Options:

-i FILE read from CSV
-o FILE output (append) results to CSV
-f URL compare one site - First site
-s URL compare one site - Second site

Example:

# cat sites.csv
http://www.google.com.au,http://www.google.co.nz

# urldiff.rb -i sites.csv -o output.csv

Rendering http://www.google.com.au
Rendering http://www.google.co.nz
Calculating Diff...
pixels (total):     1024000
pixels changed:     6269
pixels changed (%): 0.61220703125%

Generating DIFF-www.google.com.au-www.google.co.nz.png

Appending output to output.csv

# cat output.csv
http://www.google.com,http://www.google.co.nz,0.61220703125%

# ls *.png
www.google.com.au.png
www.google.co.nz.png
DIFF-www.google.com.au-www.google.co.nz.png

Screenshots:

First URL:

First URL

Second URL:

Second URL

Image Diff:

Image Diff