Screenshot Generator
Follow these steps to use the screenshot generator:
1. Get yourself a login on a linux machine (or possibly any other unix with the XWindows system, so that disqualifies macosx)
2. Download the file
screenshotGenerator.bz2
3. Unzip it in your home directory:
- Open a terminal/shell
[foo@bar foo]$ pwd # find out the current working directory
/home/foo
- Find the file ('find . -name screenshotGenerator.bz2' for example)
[foo@bar foo]$ find . -name screenshotGenerator.bz2
./Desktop/screenshotGenerator.bz2
- Extract the files with 'tar -jxvf screenshotGenerator'
[foo@bar foo]$ tar -jxvf ./Desktop/screenshotGenerator.bz2
screenshotGenerator/
screenshotGenerator/screen-nodb.py
screenshotGenerator/timeoutsocket.py
screenshotGenerator/domains.txt
screenshotGenerator/.screen-nodb.py.swp
screenshotGenerator/img/
screenshotGenerator/.notFound.txt.swp
[foo@bar foo]$
- Change into the screenshotGenerator directory
[foo@bar foo]$ cd screenshotGenerator
[foo@bar screenshotGenerator]
- Find out if the firefox binary is in your path with 'which firefox'
- If it is, you'll see something like:
[foo@bar screenshotGenerator]$ which firefox
/usr/local/bin/firefox
[foo@bar screenshotGenerator]$
- If it isn't you'll see something like:
[foo@bar screenshotGenerator]$ which firefox
which: no firefox in (/usr/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/local/j2sdk1.4.2_03:/usr/games:/home/gmc/bin)
- If it is not in your path, edit the file screen-nodb.py (use xedit, gedit or kedit, on of these must be available, eg. 'gedit screen-nodb.py'), find the following lines:
# You may need to adjust these
# firefox_cmd = "firefox-bin -remote openurl\('" + full_url + "'\)"
firefox_cmd = "firefox -remote openurl\('" + full_url + "'\)"
xwd_cmd = "xwd -frame -root -out screen.xwd"
jpg_cmd = "xwdtopnm < screen.xwd | ppmtojpeg > ./img/" + url + ".jpg"
- Replace the first occurence of firefox following the 'firefox_cmd' with the actual location of the firefox binary (you can find it with 'location firefox', on my system it is at /usr/local/firefox/firefox):
firefox_cmd = "/usr/local/firefox/firefox -remote openurl\('" + full_url + "'\)"
- Now you should edit 'domains.txt', and put the domains (without the http:// or any following paths) in there
- Now start the script with 'python screen-nodb.py' and wait for it to finish
[foo@bar screenshotGenerator]$ python screen-nodb.py
xwdtopnm: writing PPM file
xwdtopnm: writing PPM file
xwdtopnm: writing PPM file
--
KoenMartens - 03 Feb 2006