I have been looking around for Linux solution to create web page thumbnails. And, I found nice weblog entry which gave me push in right direction. However, I wasn't quite happy about hard coded values (sleep especially), so I started re-writing it.
Result is webthumb, a simple shell script with small number of prerequisites:
- vncserver
- mozilla-firefox
- HEAD (part or LWP perl library, it can be commented out)
- nc (netcat, to simulate web server)
- xwininfo (standard part of X-clients)
- xwit (not so standard command, but very useful)
- import (part of ImageMagick package)
Improvements include signal handling (so you can press CTRL+C to abort), support for dynamic display from vncserver (which enables more than one webthumb to work at the same time), fixed Window ID parsing (and more portable, I hope, please report problems), and special JavaScript+frame set+http server in shell hack to enable wait for page to load.
Aside from that, I must warn you that it won't work well with pages which have meta refresh or 304 redirect as first thing they do. Just point webthumb to redirected page and everything will be well. Here are also some examples: cnn.com, www.ffzg.hr, www.foi.hr, www.rot13.org/~dpavlin, www.linux.com, www.linux.hr, www.monitor.hr, www.pliva.hr, www.perlmonks.org, www.plivamed.net, www.plivazdravlje.hr, www.postgresql.org, prognoza.hr, www.rot13.org.
Possible usage include creating of animation from sites that change often, showing web page in different resolutions easily, or showing pop-up thumbnail image of site before user click on external link (I plan to do this with my home page).
Update: change link to subversion version (always latest one)