Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

screengrab

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screengrab

A command line tool to create multiple website screenshots in bulk

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ScreenGrab Quality Gate Status

ScreenGrab is a command line tool to create multiple website screenshots in bulk.

It is a wrapper around Puppeteer that allows you to generate screenshots based on a config file. You can define a base url and multiple paths and sizes. The tool will go to each URL, resize the viewport to each defined size and make a full-page screenshot.

Installation

To use ScreenGrab, run:

npm i -g screengrab

It will download Puppeteer and a recent version of Chromium.

Usage

ScreenGrab requires a config file to be provided:

screengrab -c config.yaml

It will read the config file, launch headless Chromium and save screenshots into the current folder (it can be overridden in the config file).

Configuration

Configuration is done via a yaml file. ScreenGrab currently supports the following keys:

baseUrl: "http://localhost.com:4000"
paths: #required, list of paths to visit. No need to include leading and trailing / except for the root
    - /
    - objects
    - objects/foo
    - objects/foo/1
sizes:
    width: 640 #required
    height: 480 #optional, default = 800
    density: 2 #optional, default = 1
output: screenshots #optional, path to the folder to save screenshots, default = current dir
batchSize: 3 #optional, indicates number of screenshots done in parallel

Parallel execution

The batchSize parameter allows to specify number of screenshots done in parallel. This effectively sets number of pages open in Chrome. The default value is 1, which means that all screenshots will be done sequentially. Setting this value to -1 will make ScreenGrab take all screenshots in parallel.

Keywords

FAQs

Package last updated on 24 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc