1.0.0 • Published 5 years ago

screenshotter-cli v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Screenshotter

Experimenting with puppeteer and commander.js to build a tool to take screenshots to any page from your command line.

Installation

npm install -g screenshotter-cli

Usage

Basic Example:

screenshotter --url https://github.com

With custom path:

screenshotter --url https://github.com --path ~/Public

With specific element;

screenshotter --url https://github.com --element ".jumbotron-codelines"

Emulate device:

screenshotter --url https://github.com --device "iPhone 6"

Options

NameTypeDefaultDescription
--urlstringN/AThe page URL to navigate to.
--elementstringN/AWhich element to screenshot instead of the full page.
--full-pagebooltrueWhether to screenshot the full page.
--widthintN/ACustom screenshot width. Depends on --full-page to be false
--heightintN/ACustom screenshot height. Depends on --full-page to be false
--devicestringN/AWhich device to emulate. List of all available devices is available in the source code: DeviceDescriptors.js.
--pathstringprocess.cwd()Where to save the file generated by the screenshot action. By default it will save within the directory you are executing screenshotter.

Dependencies

License

Licensed under the MIT license.