https://github.com/bitjson/webshotgun
Webshotgun uses slimerjs to screenshot a list of urls.
https://github.com/bitjson/webshotgun
Last synced: 4 months ago
JSON representation
Webshotgun uses slimerjs to screenshot a list of urls.
- Host: GitHub
- URL: https://github.com/bitjson/webshotgun
- Owner: bitjson
- License: mit
- Created: 2015-03-08T19:04:03.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T02:04:22.000Z (almost 9 years ago)
- Last Synced: 2025-03-25T03:42:02.111Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webshotgun
[](https://www.npmjs.com/package/webshotgun)
Webshotgun allows you to rapidly take high fidelity screenshots of websites.
Webshotgun uses [SlimerJS](https://slimerjs.org/), scripting for Firefox. Because SlimerJS always uses a very recent version of firefox, modern CSS support and rendering is much more reliable than tools based on [PhantomJS](http://phantomjs.org/).
## Quickstart
Be sure you've installed [Node](https://nodejs.org/) and [Firefox](https://www.mozilla.org/firefox/). You can get started quickly with the CLI:
```bash
$ npm install -g webshotgun
$ webshotgun --dest 'shots' google.com reddit.com nodejs.org
```
For more information on the CLI, use the `--help` flag:
```bash
$ webshotgun --help
Usage: webshotgun [options]
Options:
-h, --help output usage information
-V, --version output the version number
-f, --file Read urls from a JSON – ["URL", "URL", ... ] – or CSV file. (URLs separated by whitespace or commas.)
-d, --dest Set the directory in which to save screenshots. [default: './webshotgun']
-w, --width Set the viewport width (in pixels) at which to take screenshots. [default: '1500']
-t, --tree Organize screenshots into a folder tree matching the URL structure.
-q, --quiet Silence standard output.
Examples:
$ webshotgun google.com reddit.com nodejs.org
$ webshotgun --file urls.json --tree
$ webshotgun --file urls.csv
$ webshotgun --file urls.txt --width 500 --dest mobile-shots
```
## API
```bash
$ npm install webshotgun
```
```js
var webshotgun = require('webshotgun');
webshotgun.shoot({
dest: 'destination folder',
urls: ['http://google.com', 'http://reddit.com', 'http://nodejs.org'],
quiet: true,
tree: true,
width: 2000
}, function() {
console.log('Capture complete.')
});
```
## Development
Run `npm link` to link the CLI during development.