コマンドラインでスクリーンショットをを取得する「pageres」

sindresorhus/pageres

簡単にスクリーンショットが撮れる

インストール

npm install --save pageres

使い方


解像度を指定できる

$ pageres
Specify at least one url

Get screenshots of websites in different resolutions.

Specify urls and screen resolutions as arguments. Order doesn't matter.

Usage
  pageres <url> <resolution> [<resolution> <url> ...]
  pageres [<url> <resolution> ...] < <file>
  cat <file> | pageres [<url> <resolution> ...]

Example
  pageres todomvc.com yeoman.io 1366x768 1600x900
  pageres 1366x768 < urls.txt
  cat screen-resolutions.txt | pageres todomvc.com yeoman.io

You can also pipe in a newline separated list of urls and screen resolutions which will get merged with the arguments.If no screen resolutions are specified it will fall back to the ten most popular ones according to w3counter.

まとめて取得

resolutions.txt

1920x1080
1366x768
1440x900
1280x1024
1280x800
1680x1050
1920x1200
2560x1440
1600x900
320x568
$ pageres d.hatena.ne.jp/yuheiomori0718 < resolutions.txt
&#10003; Successfully generated 10 screenshots from 1 url and 10 resolutions