Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.08 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.08 KB

screenshots

Automated screenshots for a list of URLs at various device widths.

Requirements

Install setuptools, pip and brew the NPR News Apps way (chapters 0 and 1): http://blog.apps.npr.org/2013/06/06/how-to-setup-a-developers-environment.html

Create a virtual environment to isolation your packages:

mkvirtualenv screenshots

Install necessary python packages:

  1. brew install imagemagick
  2. pip install selenium
  3. ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install imgdiff

Clone the project and modify settings

  1. cd path/to/project/
  2. git clone [email protected]:gotoplanb/screenshots.git
  3. cp settings-example.py settings.py
  4. Edit screenshot.py to comment out the login section if you don't need authentication stuff
  5. Edit bootstrap.py to comment out the login section if you don't need authentication stuff
  6. Edit settings.py and add as many URLs as you want to screenshot
  7. Run python bootstrap.py to create the first batch of images. You just have to do this once.

Get new screenshots

python screenshot.py