Giter Club home page Giter Club logo

wraith's Introduction

Wraith

Wraith is a screenshot comparison tool, created by developers at BBC News.

What is it?

Wraith uses either PhantomJS or SlimerJS to create screenshots of different environments and then creates a diff of the two images, the affected areas are highlighted in blue

Photo of BBC News with a diff

Requirements

You'll need either PhantomJS or SlimerJS, ImageMagick & Ruby 1.9.3 or greater. It's up to you to decide which browser engine you want to run it against.

On Mac OS X, the install script will install PhantomJS & ImageMagick for you, assuming you have homebrew installed, otherwise it'll tell you to install them.

Installation

curl -fsSL https://raw.github.com/bbc-news/wraith/go | bash

Config

All config will be placed in config.yml. You can specify domains, paths, screen widths & HTTP headers.

# Add only 2 domains, key will act as a label
domains:
  uk: "http://google.com"
  france: "http://google.fr"

#Type screen widths below, here are a couple of examples
screen_widths:
  - 320
  - 600
  - 768
  - 1024
  - 1280

#Type page URL paths below, here are a couple of examples
paths:
  search_page: /imghp
  map_page: /maps

Using Wraith

rake

Output

After each screenshot is captured, the compare task will run, this will output a diff.png and a data.txt. The data.txt for each file will show the number of pixels that have changed. There is a main data.txt which is in the root of the output folder that will combine all of these values to easier view all the pixel changes.

Contributing

If you want to add functionality to this project, pull requests are welcome.

  • Create a branch based off master and do all of your changes with in it.
  • If it you have to pause to add a 'and' anywhere in the title, it should be two pull requests.
  • Make commits of logical units and describe them properly
  • Check for unnecessary whitespace with git diff --check before committing.
  • If possible, submit tests to your patch / new feature so it can be tested easily.
  • Assure nothing is broken by running all the test
  • Please ensure that it complies with coding standards.

Please raise any issues with this project as a GitHub issue.

## Changelog

Merge pull request #15 from timabell/move-data-file
Merge pull request #14 from timabell/unnamed-paths
Merge pull request #5 from BBC-News/typekit-fix
Merge pull request #8 from jaredly/patch-1
Merge pull request #2 from Kami/fix_ruby_compatibility
Merge pull request #1 from BBC-News/freedom

Licence

Wraith is available to everyone under the terms of the MIT open source licence. Take a look at the LICENSE file in the code.

Credits

wraith's People

Contributors

dblooman avatar jcleveley avatar timabell avatar kami avatar jaredly avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.