#775859 RFP: pageres -- Capture screenshots of websites in various resolutions on the command-line

#775859#5
Date:
2015-01-20 19:25:47 UTC
From:
To:
* Package name    : pageres
  Version         : 1.1.0
  Upstream Author : Sindre Sorhus <sindresorhus@gmail.com>
* URL or Web page : https://github.com/sindresorhus/pageres
* License         : MIT
  Programming Lang: JavaScript (PhantomJS)
  Description     : Capture screenshots of websites in various resolutions on the command-line

Capture screenshots of websites in various resolutions. A good way to
make sure your websites are responsive.

It's speedy and generates 100 screenshots from 10 different websites in
just over a minute.
----------------------------------------------------------------------

There are already three tools capable of web page screenshoting in
Debian (gnome-web-photo/shutter, webkit-image-*), but all choose the
resolution on their own. And none of them does it well[1]: Neither
1024x8 nor 195x11649 nor 1x8 are sane resolutions for a web page
screenshot...

  [1] https://softwarerecs.stackexchange.com/questions/16422/no-gui-tool-to-take-screenshots-of-websites/16448#16448

pageres seems to fill in that gap quite well.

#775859#10
Date:
2015-01-20 19:57:03 UTC
From:
To:
Le mardi 20 janvier 2015 à 20:25 +0100, Axel Beckert a écrit :


Hello !
just to say to node-webkitgtk [0] can take screenshots using system
libwebkit2gtk4 - way nicer than using phantomjs, packaging-wise.

It's as simple as

#!/usr/bin/nodejs

require('webkitgtk')()
 .load('http://www.debian.org', {width: 2000, height:1000})
 .wait('idle')
 .png('debianorg2000x1000.png');

bundling a simple script taking similar arguments would be a piece of
cake - with the added bonus to be able to output pdf as well.

Cheers,
Jérémy

[0]
https://bugs.debian.org/760687

#775859#15
Date:
2015-01-20 21:38:25 UTC
From:
To:
Hi Jérémy,

Jérémy Lal wrote:

I have no idea of what is considered nice or not so nice in node.js
packaging. :-)

That sounds indeed simple.

Yeah, usable examples (as in /usr/bin/$example and not
/usr/share/doc/$pkg/examples/$example.gz) with such features would be
neat! Please also mention them in the long package description if
they're included in the main package.

		Regards, Axel

#775859#20
Date:
2015-01-20 23:29:41 UTC
From:
To:
Le mardi 20 janvier 2015 à 22:38 +0100, Axel Beckert a écrit :

https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=phantomjs

and it's not easy to fix.

i'll do that.

Jérémy.

#775859#25
Date:
2015-01-21 13:42:54 UTC
From:
To:
Tryint to package anything related to PhantomJS is both courageous
and honourable! And probably futile. If you don't fear the Python,
try python{,3}-ghost:

If you prefer searchable PDF output and the shell, try wkhtmltopdf:

$ wkhtmltopdf --page-width 200mm http://www.debian.org debian.pdf

wkhtmltopdf is in squeeze, wheezy, jessie, and sid.
python{,3}-ghost is only available in sid.

AFAIK, neither tool does cropping, but you can do this with
"convert -trim" for PNGs or "pdfcrop" for PDFs.