screenshootr
Node tool for capturing screenshots of websites
Usage:
After you clone the repo run yarn install
and you are good to go.
$ ./screenshootr.js -u http://example.com [-w 1366] [-h 768] [-d 1000] [-f screenshots/cat.png] [-t 30000] [-v] [-p] [--args]
Options:
-u url
-w viewport width
-h viewport height
-d delay in millisecond
-f file name
-t timeout in millisecond
-v verbose
-p pipe output
--args flags for Chrome browser
You can produce two types of output files - .png
and .jpeg
. The output file format is determined by the provided file name. By default .png
will be used.
If you use -p
option to pipe the output, -v
verbose mode will be disabled in order not to disrupt the output. By default png
file will be piped when using -p
but it is possible to create jpg
file as well: ./screenshootr.js -u http://example.com -f image.jpeg -p > image.jpeg
You can pass additional flags to launch Google Chrome by using --args
. To pass more than one flag please use ,
and avoid using spaces between flags: ./screenshootr.js -u http://example.com --args no-sandbox,disable-setuid-sandbox
Dependencies