@helvio/web-screenshot
Screenshots Pages to PNG
Last updated a year ago by helvio .
ISC · Bugs · Original npm · Tarball · package.json
$ cnpm install @helvio/web-screenshot -g
SYNC missed versions from official npm registry.

Build Status

web-screenshot

A tool to take screenshots of websites headlessly.

Installation

npm install -g @helvio/web-screenshot --unsafe-perm

--unsafe-perm is necessary to install puppeteer on your computer.

Usage

$ web-screenshot --help
Usage: screenshot [options]

Options:
  -u, --url <url>        URL (website) to screenshot
  -x, --x [x]            Leftmost Pixel (default: 0)
  -y, --y [y]            Top Pixel (default: 0)
  -w, --width [width]    Width (default: 0)
  -h, --height [height]  Height (default: 0)
  -o, --out [out]        Absolute or Relative Path to save the screenshot
  -c, --crop             Auto crop same-color borders
  -h, --help             Output usage information
  -d, --debug            Set debug flag
  -a, --auth             NTLM Credentials in username:password format

Tips

  • You can call web-screenshot with the URL only, such as web-screenshot -u github.com.
  • The program will append http:// to your URL and save the output file as github.com.png.
  • If width or height are 0, a Full Page screenshot is taken.
  • The base viewport is 1920x1080.
  • After the ScreenShot is taken, the borders can be cropped using --crop. Powered by Jimp.
  • You can screenshot just a rectangle (or clip) of a webpage by providing x, y, w and h, such as
web-screenshot -u https://google.com -x 700 -y 190 -w 300 -h 115 -o google_logo.png --crop

Coordinates are approximate and you can either use a tool to measure the pixels or trial and error.

The command outputs the image:

google_logo.png

google_logo.png

Happy Screenshotting!

Current Tags

  • 1.2.4                                ...           latest (a year ago)

15 Versions

  • 1.2.4                                ...           a year ago
  • 1.2.3                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.10                                ...           a year ago
  • 1.1.9                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 16
Last Month 17
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |