https://github.com/edgaraafelix/screenshotter
Take screenshots to any page from your command line
https://github.com/edgaraafelix/screenshotter
commanderjs node-js nodejs npm npm-package puppeteer screenshot screenshotter
Last synced: 3 months ago
JSON representation
Take screenshots to any page from your command line
- Host: GitHub
- URL: https://github.com/edgaraafelix/screenshotter
- Owner: edgaraafelix
- License: mit
- Created: 2018-12-10T13:34:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T10:33:48.000Z (over 7 years ago)
- Last Synced: 2025-10-04T01:19:51.358Z (9 months ago)
- Topics: commanderjs, node-js, nodejs, npm, npm-package, puppeteer, screenshot, screenshotter
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Screenshotter
-------
Experimenting with [puppeteer](https://github.com/GoogleChrome/puppeteer/) and [commander.js](https://github.com/tj/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
| Name | Type | Default | Description |
|-------------|--------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| --url | string | N/A | The page URL to navigate to. |
| --element | string | N/A | Which element to screenshot instead of the full page. |
| --full-page | bool | true | Whether to screenshot the full page. |
| --width | int | N/A | Custom screenshot width. Depends on ```--full-page``` to be ```false``` |
| --height | int | N/A | Custom screenshot height. Depends on ```--full-page``` to be ```false``` |
| --device | string | N/A | Which device to emulate. List of all available devices is available in the source code: [DeviceDescriptors.js](https://github.com/GoogleChrome/puppeteer/blob/master/DeviceDescriptors.js). |
| --path | string | process.cwd() | Where to save the file generated by the screenshot action. By default it will save within the directory you are executing ```screenshotter```. |
#### Dependencies
- [puppeteer](https://github.com/GoogleChrome/puppeteer/)
- [commander.js](https://github.com/tj/commander.js/)
- [lodash](https://github.com/lodash/lodash)
#### License
Licensed under the MIT license.