----------------------------------- webshots.sh -- readme ----------------------------------- Webshots is a simple bourne/bash shell script that goes through a list of links (or a webpage containing links) and uses mozilla, scrot and imagemagick to make a screenshot of each page, as it is displayed in the browser. Nifty features: - the link list can be a bookmarks file (in netscape format), a page with google search results, or a list created by you in HTML format - filenames for the screenshots are generated from the link text (ie, the string between the <a> and the </a> tags) - you can use it to document changes of a website or a list of pages: use the same link list for each run, but change the targetdir argument, for example, to `date +%Y%m%d` Usage: webshots.sh [-p prefix] [-d targetdir] controlfile.htm Will call a mozilla browser at /usr/bin/mozilla in full screen mode for each HTML link found in the control file and make a screen shot using scrot at /usr/bin/scrot. The -c option calls mogrify at /usr/bin/mogrify to crop the screenshot to 1269x884+3+120, to e.g. remove window widgets or browser GUI elements. (Binary paths, crop geometry can be edited at the start of the script). The screen shots are renamed using prefix (if given) and the link text from the control file, then moved to targetdir (if given). targetdir must end in / (example: /foo/bar/) A note on browsers: This works best with mozilla (not firefox). Open one and zoom it manually to the desired window size, before starting this script. (The arguments -width and -height don't work with the current generation of mozilla browsers, therefore, you have to resize the browser manually.) The script will use the existing window for all screenshots--- unlike firefox, that will open a new tab each time (which might get you out of memory soon). Make sure the browser window is on top after starting the script (you have 10 seconds do make it so). scrot makes a screenshot of the whole screen, including other windows. ----------------------------------- Page: PHP/webshots.readme.htm mtime: Wed Oct 17 20:06:31 CEST 2007