A lot of
requests for thumbnail generator on Linux. Posted some links to external resources
here.
After some research/analysis was able to generate website screenshots on my Windows machine using Firefox. Think that should also work on Linux.
You'll need
Firefox 2 browser installed on the server.
1. Download
Pearl Crescent Page Saver. It is a Firefox screen capture extension. Free version is ok.
2. Install the extension in Firefox.
firefox -install-global-extension "/path/to/the/extension-file.xpi"
3. By default saved images would be named after page title. In order to name images after domain name or URL follow this step.
Go to Firefox extensions folder, and change chrome/pagesaver.jar => content\
browserOverlay.jsReplace following code
var pageTitle = (aWindow && aWindow.document) ? aWindow.document.title : null;
with this code to name images after domain name
var pageTitle = (aWindow && aWindow.document) ? aWindow.document.domain.replace(/\./g,"_") : null;
OR with this code to name images after URL
var pageTitle = (aWindow && aWindow.document) ? aWindow.document.location.href.replace(/\./g,"_") : null;
4. Now you should be able to save website screenshot by executing Firefox from the command line, like:
firefox -savepng http://www.site-name-here.com/It will open Firefox window, open URL, save image as PNG, and close Firefox.
Images captured using the -savepng command line flag are saved to Firefox's Download Folder. You can set this location from the Downloads section of the Firefox Options window.
Would appreciate comments since I had no chance to try it on Linux.