« What a nice evening | Main | Back from vacation »

webthumb - create thumbnail of web page

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)

TrackBack

TrackBack URL for this entry:
http://blog.rot13.org/mt/mt-tb.cgi/490

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on July 26, 2004 5:13 PM.

The previous post in this blog was What a nice evening.

The next post in this blog is Back from vacation.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 4.1