Aug
21

Screenshot server

By rzelazko  //  Firefox, Linux, Windows  //  2 Comments

GrabThemAll Server
Creating screenshot server is very simple with modified version of GrabThemAllGrabThemAll Server.

Features
GrabThemAll Server is powerfull screenshot server that allows users to:

  • Create screenshot on server machine
  • Supports Windows and Linux platforms
  • Has Open Source licence
  • Can take screenshot from URL list file and screenshot of single page
  • Is fully customizable
  • And much more…

Download
GrabThemAll and GrabThemAll Server are open source software. Source code is available on GrabThemAll Google code.

Download archive Download current version of GrabThemAll Server 1.0.0.0

Download PDF file GrabThemAll Server Manual – PDF file

Application requirements:

  • xulrunner version 1.9
  • MS Windows or XServer (ex. Xorg or Xvfb) on linux based systems
  • [optional] Flash plugin to handle flash sites

Basic usage

Download GrabThemAll Server, extract it and run with xulrunner:

/path/to/xulrunner /path/to/grabthemall-server/application.ini \
  -url-list /separated/with/new-line/url-list.txt \
  -save-to-dir /store/screens/here

OR

/path/to/xulrunner /path/to/grabthemall-server/application.ini \
  -one-url "http://www.onet.pl/" \
  -save-to-dir /store/screens/here

Where:

  • /path/to/xulrunner – place where is executable xulrunner
  • /path/to/grabthemall-server – path to decompressed version of GrabThemAll Server
  • -url-list – path to file with URLs to take screenshot. Example URL list file:
    http://www.interia.pl/
    http://www.onet.pl/
    http://www.amazon.com/
    http://www.google.pl/
    http://mapy.google.pl/
  • -one-url – single url to capture
  • -save-to-dir – place where store screenshot and report file

Debian based screenshot server with virtual (fake) xserver
To create own screenshot server based on Debian Sid follow described below steps.

Install Xvfb

sudo aptitude install xulrunner-1.9 xvfb xauth xfonts-base xpdf

Test xvfb. To test xvfb run command:

xvfb-run -s "-screen 0, 640x480x24" \
  -e /tmp/xvfb.log xpdf

Then wait 5 seconds, if there are no error messages
press ctrl+c and go to “Runing the stuff”.
If there are any errors – find out what happens (to google it):

tail /tmp/xvfb.log

Runing the stuff

  • Create directory to store screenshots:
    mkdir -p /tmp/screens_20090820_144128
  • Prepare file with url list:
    echo "http://www.interia.pl/
    http://www.netmama.pl/
    http://www.gazeta.pl/
    http://picasaweb.google.com/"
    > /tmp/url_list.txt
  • Run xulrunner
    To run screenshot server goto application directory and run xulrunner:

    cd ~/grabthemall-server
    xvfb-run -s "-screen 0, 1280x1024x24" \
      xulrunner-1.9 application.ini \
      -url-list /tmp/url_list.txt \
      -save-to-dir /tmp/screens_20090820_144128

    Information about saved screenshots are available in report file (of course if it wasn’t turn off in preferences file, see section “Customization”):

    cat /tmp/tlist/*.csv | grep '"ok"' | cut -d ';' -f 1,3

Customization
Grab Them All Server is fully customizable. To change behaviour of GTAS edit preferences file. Preferences file is located at:
grabthemall-server/default/preferences/grabthemall.js.
Values whitch can be changed:

  • Screenshot file type:
    pref("extensions.grabthemall.filetype", 1);
    // 1 = png, 0 = jpg
  • Capture complete page:
    pref("extensions.grabthemall.completepage", 1);      
    // 1 = save complete page
    // 0 = save excert with size capture.width'x'capture.height'
  • Max page loading time:
    pref("extensions.grabthemall.timeout", 5);            
    // page loading timeout [sec]
  • Max JS loading time:
    pref("extensions.grabthemall.timeToWait", 3);        
    // javascript loading timeout [sec]
  • Capturing window size:
    pref("extensions.grabthemall.capture.width", 1024);  
    // captrue window with
    pref("extensions.grabthemall.capture.height", 768);  
    // capture window height

    Notice: xvfb screen size should be larger than capture.width and capture.height

  • File names encoding:
    pref("extensions.grabthemall.capture.fileName", 1);  
    // 1 = base64(url)
    // 0 = replace_unsafe_chars(url)
  • Save report file:
    pref("extensions.grabthemall.reportfile.save", true);
    // true = save csv report
    // false = dont create report file

Other kind of ScreenShot server software described Belaton.

2 Comments to “Screenshot server”

  • Elo Ziom:)

    Wonderful job man. Polish Great stuff.

    That was looking for.

  • Wonderful job man. Polish Great stuff.
    +1

Leave a comment