1.9.2 • Published 7 days ago

@helvio/web-screenshot v1.9.2

Weekly downloads
1
License
ISC
Repository
-
Last release
7 days ago

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:
  -V, --version          output the version number
  -u, --url <url>        URL (website) to screenshot
  -t, --time [s]         Number of seconds to wait for page to load (default: 3)
  -x, --x [x]            Leftmost Pixel (default: 0)
  -y, --y [y]            Top Pixel (default: 0)
  -w, --width [width]    Width (default: 1920)
  -h, --height [height]  Height (default: 1080)
  -o, --out [out]        Absolute or Relative Path to save the screenshot
  -c, --crop             Auto crop same-color borders
  -d, --debug            Prints debug messages
  -a, --auth [auth]      NTLM Credentials in username:password format
  --help                 display help for command

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 700 -h 180 -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!

1.9.0

7 days ago

1.9.2

7 days ago

1.8.0

2 years ago

1.7.3

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.5.3

2 years ago

1.3.5

2 years ago

1.7.0

2 years ago

1.3.4

2 years ago

1.6.0

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.2.5

4 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago