Created
April 23, 2012 17:02
-
-
Save balexand/2472303 to your computer and use it in GitHub Desktop.
screenshot.coffee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # install phantomjs using Homebrew (http://mxcl.github.com/homebrew/) | |
| # by running `brew install phantomjs` then run this script with `phantomjs screenshot.coffee` | |
| page = require('webpage').create() | |
| page.viewportSize = { width: 768, height: 600 } | |
| page.open 'http://bridgidgallagher.com/blog', (status) -> | |
| console.log status | |
| window.setTimeout -> | |
| console.log "render" | |
| page.render("screenshot.png") | |
| phantom.exit() | |
| , 2000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment