pageshot

Take screenshots triggered by browser-side JavaScript.

Usage no npm install needed!

<script type="module">
  import pageshot from 'https://cdn.skypack.dev/pageshot';
</script>

README

Pageshot Build Status

Take screenshots triggered by browser-side JavaScript.

Getting Started

Install the module with: npm install -g pageshot

Documentation

CLI

npm install -g pageshot
 pageshot --help

  Usage: pageshot --url <url> --conf <path> --output <dir>

  Options:

    -h, --help         output usage information
    -V, --version      output the version number
    --url <url>        open URL
    --conf <path>      inject configuration script.
    --output <dir>     output directory
    --width <pixels>   viewportSize width in pixels.
    --height <pixels>  viewportSize height in pixels.

Developer API

npm install --save-dev pageshot

Examples

See test/ directory

Contributing

Clone and run the following demo:

Start Simply HTTP Server

cd temp/
python -m SimpleHTTPServer

Try out the CLI for yourself

./cli.js --url http://localhost:8000/index.html --conf test/index.js --output temp/

Now look in your temp/ directory and see all of the generated screenshots.

Release History

  • 0.1.0 - First working version for CLI and developer API with complete Unit Tests.

License

Copyright (c) 2014 Glavin Wiechert.
Licensed under the MIT license.