Hi,
How one is supposed to do screenshots of a website with CentOS 6?
The usual and normal ways I know doing it is: http://www.coderholic.com/pywebshot-generate-website-thumbnails-using-python... https://github.com/AdamN/python-webkit2png/
But then from some reason RedHat doesn't support them:
gnome-python2-extras: * Thu Jul 15 2010 Christopher Aillon caillon@redhat.com - 2.25.3-20 - Drop the -gtkmozembed subpackage
PyQt4: * Tue Jun 01 2010 Than Ngo than@redhat.com - 4.6.2-8 - Resolves: bz#597271, drop WebKit support in Qt
Why-o-why? Any good ideas of going it differently?
Noticed that one can take gnome-python2-extras source and add following lines based on el5 package .spec:
%package -n gnome-python2-gtkmozembed Summary: Python bindings for interacting with gtkmozembed Group: Development/Languages Requires: gecko-libs >= %{gecko_version}
%description -n gnome-python2-gtkmozembed This module contains a wrapper that allows the use of gtkmozembed via Python.
%files -n gnome-python2-gtkmozembed %defattr(-,root,root,-) %{python_sitearch}/gtk-2.0/gtkmozembed.so %{_datadir}/gtk-doc/html/pygtkmozembed
And get a package which seems to work, but still makes me wonder why have they removed the support work both of those techniques and which would be the way to archive that without need of compile own packages.
On 01/04/2012 10:46 AM, Jani Ollikainen wrote:
Hi,
How one is supposed to do screenshots of a website with CentOS 6?
pres PrtScr key, save, open and crop image with gThumb (Image->Crop), then upload it.
From: Ljubomir Ljubojevic office@plnet.rs
On 01/04/2012 10:46 AM, Jani Ollikainen wrote:
How one is supposed to do screenshots of a website with CentOS 6?
pres PrtScr key, save, open and crop image with gThumb (Image->Crop), then upload it.
I think maybe he wants command line tools... But if that is not the case, there is the Screengrab! Firefox addon that can screenshot a complete page, only the visible part, or just a selection...
JD
On Wed, 4 Jan 2012, John Doe wrote:
From: Ljubomir Ljubojevic office@plnet.rs
On 01/04/2012 10:46 AM, Jani Ollikainen wrote:
How one is supposed to do screenshots of a website with CentOS 6?
pres PrtScr key, save, open and crop image with gThumb (Image->Crop), then upload it.
I think maybe he wants command line tools... But if that is not the case, there is the Screengrab! Firefox addon that can screenshot a complete page, only the visible part, or just a selection...
For a command line tool, how about 'import' from imagemagick.
jh
On 4.1.2012 18:54, John Hodrien wrote:
I think maybe he wants command line tools... But if that is not the case, there is the Screengrab! Firefox addon that can screenshot a complete page, only the visible part, or just a selection...
For a command line tool, how about 'import' from imagemagick.
Yes, the need was for automated command line tool which I can use without requiring any user interaction.
I don't see how import would do as one would need to have something open up browser to some page and how could import know when the page is opened and rendered etc.
The solution I'm looking is like the mentioned python scripts, it hasn't have to be in python. But as long as it is able to do it without user interaction.
gnome-python2-gtkhtml2 might be able to do it, as it has /usr/share/doc/gnome-python2-gtkhtml2-2.25.3/simple-browser.py with it.
But I'm not familiar with that so for me it's more easier just to bite and compile mozembed and continue using the system I have.
I'm just wondering what has been RedHat's idea of not supporting python with mozembed nor webkit and is there alternative that I don't know about. But based on first answers, maybe not.
On Thu, Jan 5, 2012 at 12:19 AM, Jani Ollikainen jani.ollikainen@mmd.net wrote:
I'm just wondering what has been RedHat's idea of not supporting python with mozembed nor webkit and is there alternative that I don't know about. But based on first answers, maybe not.
This is very likely why RedHat dropped mozembed:
http://www.h-online.com/open/news/item/Mozilla-kills-embedding-support-for-G...
Am 05.01.2012 09:19, schrieb Jani Ollikainen:
Yes, the need was for automated command line tool which I can use without requiring any user interaction.
Use option -id or -name of xwd(1) to specify the window, e.g: xwd -id 0xc000c5 | xwdtopnm | pnmtojpeg > win.jpg
To find the id or name, parse the output of: xwininfo -root -children
Walter
On Thu, 5 Jan 2012, Walter Haidinger wrote:
Am 05.01.2012 09:19, schrieb Jani Ollikainen:
Yes, the need was for automated command line tool which I can use without requiring any user interaction.
Use option -id or -name of xwd(1) to specify the window, e.g: xwd -id 0xc000c5 | xwdtopnm | pnmtojpeg > win.jpg
To find the id or name, parse the output of: xwininfo -root -children
But I think the bit that we both missed with his requirements is that he ultimately wants to be able to do:
capture-website http://www.bbc.co.uk
and end up with a png of the website.
So he wants to be able to capture an image of what a website looks like from the command line, and not really take a screenshot at all.
I think that's a fair summary anyway...
jh
On 5.1.2012 13:52, John Hodrien wrote:
So he wants to be able to capture an image of what a website looks like from the command line, and not really take a screenshot at all. I think that's a fair summary anyway...
Yes, well, not native english speaker so I would call those screenshots of the website, or maybe screen capture would be better but it's still almost the same :) If I would say picture of a website, it to me would sound something less describing than screenshot.
I thought linking up two example programs doing it would describe it. But it seems people didn't open/read the URLs. As the one was: http://www.coderholic.com/pywebshot-generate-website-thumbnails-using-python...
"Here’s an example of running PyWebShot with 3 URLs, and the resulting images:
$ ./pywebshot.py -t 500x250 http://www.coderholic.com http://geomium.com/update/598/ http://jobs.plasis.co.uk Loading http://www.coderholic.com... saved as www.coderholic.com.png Loading http://geomium.com/update/598/... saved as geomium.com.update.598..png Loading http://jobs.plasis.co.uk... saved as jobs.plasis.co.uk.png"
But your capture-website example is good description what I'm looking for that would work on the components available in CentOS 6 (or some well known 3rd party repository, not replacing too much of the normal system).
Now my solution was to compile gnome-python2-extras with changes to .spec and as some one commented Mozilla has dropped support for gtkmozembed so that solution doesn't seem to be long lived and some other option would be nice.
On 01/05/2012 01:53 PM, Jani Ollikainen wrote:
On 5.1.2012 13:52, John Hodrien wrote:
So he wants to be able to capture an image of what a website looks like from the command line, and not really take a screenshot at all. I think that's a fair summary anyway...
Yes, well, not native english speaker so I would call those screenshots of the website, or maybe screen capture would be better but it's still almost the same :) If I would say picture of a website, it to me would sound something less describing than screenshot.
I thought linking up two example programs doing it would describe it. But it seems people didn't open/read the URLs. As the one was: http://www.coderholic.com/pywebshot-generate-website-thumbnails-using-python...
"Here’s an example of running PyWebShot with 3 URLs, and the resulting images:
$ ./pywebshot.py -t 500x250 http://www.coderholic.com http://geomium.com/update/598/ http://jobs.plasis.co.uk Loading http://www.coderholic.com... saved as www.coderholic.com.png Loading http://geomium.com/update/598/... saved as geomium.com.update.598..png Loading http://jobs.plasis.co.uk... saved as jobs.plasis.co.uk.png"
But your capture-website example is good description what I'm looking for that would work on the components available in CentOS 6 (or some well known 3rd party repository, not replacing too much of the normal system).
Now my solution was to compile gnome-python2-extras with changes to .spec and as some one commented Mozilla has dropped support for gtkmozembed so that solution doesn't seem to be long lived and some other option would be nice.
Maybe recompile Fedoras 'gnome-web-photo" package? http://vertito.blogspot.com/2008/02/howto-thumbnail-website-from-linux.html
From: Ljubomir Ljubojevic office@plnet.rs
Maybe recompile Fedoras 'gnome-web-photo" package? http://vertito.blogspot.com/2008/02/howto-thumbnail-website-from-linux.html
Or maybe try: http://khtml2png.sourceforge.net/
JD
Am 05.01.2012 12:52, schrieb John Hodrien:
So he wants to be able to capture an image of what a website looks like from the command line, and not really take a screenshot at all.
Indeed, as there is no screen...
This is diffcult, as websites need to be rendered and one just has to google for ACID-3 to see that this not that straightforward.
I think that's a fair summary anyway...
Yes, thanks for the clarification!
As a workaround, I'd use a "virtual" screen, i.e. automate the tasks that would have to be done for a "real" screenshot. This can be scripted without any user interaction:
* Run Xvnc in the desired resolution/depth Sort of a headless X11, debug by connecting via VNC * setup authentication using xauth (or even xhost if desperate) * export $DISPLAY to access it * open the URL to "screenshot" in firefox/chrome/opera, e.g. firefox -height x -width y "$url" (the -height and -width options still work, right?) * run xwininfo and grep for the name of the browser window to get the windows id * Screenshot it: xwd -id $browserid | xwdtopnm | pnmtojpeg > website.jpg * kill firefox process * kill Xvnc if no more screenshots are needed
All steps can also be done manually, therefore debugging should be easily step by step.
Walter
On Wed, 04 Jan 2012 17:23:09 +0100 Ljubomir Ljubojevic wrote:
How one is supposed to do screenshots of a website with CentOS 6?
pres PrtScr key, save, open and crop image with gThumb (Image->Crop), then upload it.
PrtScr key alone screenshots the whole desktop.
Alt-PrtScr screenshots the active window only.
Am 04.01.2012 10:46, schrieb Jani Ollikainen:
How one is supposed to do screenshots of a website with CentOS 6?
For X11, there is xwd(1): X window dump. Prompts you to click on a window and dumps its contents.
To "screenshot" a single window and save it as a jpeg, e.g.:
xwd | xwdtopnm | pnmtojpeg > window.jpg
Under CentOS 6, xwd is part of the xorg-x11-apps package, xwdtopnm and pnmtojpeg come with netpbm-progs.
Hope that helps.
Walter