Crates.io | webscreenshot |
lib.rs | webscreenshot |
version | 0.2.2 |
source | src |
created_at | 2020-06-18 22:04:38.154694 |
updated_at | 2020-06-19 04:00:14.771207 |
description | A simple CLI tool to take screenshots of rendered webpages, given a URL or local file path. |
homepage | https://github.com/catleeball/WebScreenShot |
repository | https://github.com/catleeball/WebScreenShot |
max_upload_size | |
id | 255517 |
size | 47,872 |
Screenshot a webpage rendered in headless Chrome.
A simple CLI tool to take screenshots of rendered webpages, given a URL or local file path prepended by file:///
.
USAGE:
wss [FLAGS] [OPTIONS] <url> <output-path>
FLAGS:
--help Prints help information
-q, --quiet Display no messages to stdout.
-V, --version Prints version information
-z, --visible-only Screenshot only what is visible from the dimensions of the browser window, rather then the
entire surface of the page.
OPTIONS:
-h, --height <browser-height> Height of the browser to render the webpage in. [default: 800]
-w, --width <browser-width> Width of the browser to render the webpage in. [default: 1024]
-e, --element <element> CSS selector of element to screenshot.
-f, --format <format> Format to save screenshot as. Must be one of png, jpg, or pdf. [default: png]
[possible values: png, jpg, pdf]
-j, --jpg-quality <jpg-quality> Quality of jpg screenshot to output, 0-100. Will be ignored if --image-format is
not set to jpg. [default: 80]
ARGS:
<url> URL or file to take a screencap of. i.e. https://example.com or file:///path/to/file.html
[default: https://wikipedia.org]
<output-path> Local file path to save screenshot image to. [default: /tmp/screenshot.png]
WebScreenShot (wss
) can be installed via crates.io:
cargo install webscreenshot
This package can be built by running:
cargo build --release --features="cli-binary"
WebScreenShot mainly uses the screenshot functionality provided by the headless_chrome library. It isn't affiliated with the team who makes headless_chrome, but intends to be a convinent way to screenshot webpages from the command line.