Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mabhub/puppeteer-screenshot-cli
Simple wrapper around Puppeteer to take screenshot from command line.
https://github.com/mabhub/puppeteer-screenshot-cli
chrome chromium command-line javascript puppeteer screenshot
Last synced: 5 days ago
JSON representation
Simple wrapper around Puppeteer to take screenshot from command line.
- Host: GitHub
- URL: https://github.com/mabhub/puppeteer-screenshot-cli
- Owner: mabhub
- Created: 2018-02-08T17:57:00.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T13:42:29.000Z (almost 3 years ago)
- Last Synced: 2024-11-06T23:17:16.411Z (7 days ago)
- Topics: chrome, chromium, command-line, javascript, puppeteer, screenshot
- Language: JavaScript
- Homepage:
- Size: 87.9 KB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Puppeteer screenshot CLI
Simple wrapper around [Puppeteer](https://github.com/GoogleChrome/puppeteer) to take screenshot from command line.
## Usage
```shell
npm i [-g] puppeteer-screenshot-clipuppeteer-screenshot --url 'http://perdu.com' --selector 'h1' --output ./perdu.jpg
puppeteer-screenshot -u 'http://perdu.com' -s 'body' -o - > /tmp/perdu.jpg
puppeteer-screenshot 'http://perdu.com' > perdu.jpg```
### Options
```
Headless screenshot with Puppeteer-u, --url string URL to navigate page to. The url should include scheme, e.g. https://.
-o, --output string The file path to save the image to. If path is a relative path, then it is
resolved relative to current working directory. If no path is provided, the
image won't be saved to the disk.-s, --selector string A CSS selector of an element to wait for.
Default: body-t, --type string Specify screenshot type, can be either jpeg or png.
Default: png-q, --quality number The quality of the image, between 0-100. Not applicable to png images.
-w, --width number Viewport width in pixels
Default: 800-h, --height number Viewport height in pixels
Default: 600--timeout number Maximum time to wait for in milliseconds.
Default: 30000-f, --fullPage When true, takes a screenshot of the full scrollable page.
Defaults: false.--headless Whether to run browser in headless mode.
Default: true-?, --help This help
```## See also
- [puppeteer-trace-cli](https://www.npmjs.com/package/puppeteer-trace-cli)
Simple wrapper around [Puppeteer](https://github.com/GoogleChrome/puppeteer) to trace webpage from command line.