My favorite dilbert strips: 1990-05-21
1990-08-07
1990-09-03
1990-11-11
1990-11-29
1991-11-13
1991-12-06
1992-02-26
1992-07-25
1992-09-08
1993-03-08
1993-03-20
1994-02-19
1994-04-08
1997-03-24
1997-10-27
1997-11-03
1998-02-15
1998-03-29
1998-04-13
1998-04-14
1998-05-12
1998-09-12
1998-10-13
1998-11-22
1998-12-18
1999-01-17
1999-02-18
1999-02-21
1999-03-03
1999-03-25
1999-04-01
1999-05-03
1999-05-11
1999-05-17
1999-05-30
1999-06-07
1999-06-08
1999-06-10
1999-06-27
1999-08-29
1999-09-25
1999-10-19
1999-12-16
2000-03-08
2000-03-12
2000-04-23
2000-06-15
2000-07-07
2000-08-14
2000-09-18
2000-10-01
2001-01-19
2001-02-11
2001-02-12
2001-04-30
2001-05-01
2001-07-28
2001-08-02
2001-09-06
2001-10-08
2001-12-07
2002-01-27
2002-02-03
2002-03-10
2002-04-07
2002-04-26
2002-06-20
2002-06-23
2002-09-05
2002-09-30
2003-01-06
2003-02-26
2003-03-12
2003-03-21
2003-03-26
2003-03-29
2003-05-29
2003-05-30
2003-06-15
2003-06-20
2003-07-06
2003-07-10
2003-07-20
2003-08-10
2003-08-14
2003-08-23
2003-09-04
2003-09-07
2003-09-22
2003-09-27
2003-10-07
2003-10-12
2003-10-15
2003-10-26
2003-11-01
2003-11-02
2003-11-03
2003-11-08
2003-11-10
2003-11-16
2003-11-17
2003-11-27
2003-11-30
2003-12-02
2004-01-11
2004-01-18
2004-01-21
2004-02-01
2004-02-02
2004-02-29
2004-03-16
2004-04-28
2004-05-09
2004-05-29
2004-06-06
2004-06-22
2004-06-27
2004-07-15
2004-07-30
2004-08-13
2005-01-02
2005-01-05
2005-01-13
2005-01-23
2005-02-25
2005-02-26
2005-03-07
2005-03-08
2005-03-25
2005-03-26
2005-04-05
2005-04-24
2005-04-28
2005-05-02
2005-05-08
2005-05-20
2005-05-29
2005-06-10
2005-07-02
2005-07-03
2005-07-06
2005-07-10
2005-07-19
2005-07-26
2005-09-14
2005-09-18
2005-09-25
2005-10-06
2005-10-18
2005-10-29
2005-11-08
2005-11-14
2005-11-16
2005-11-27
2005-12-14
2005-12-30
2006-01-12
2006-01-17
2006-01-24
2006-01-29
2006-02-22
2006-04-08
2006-04-30
2006-06-18
2006-10-27
2006-11-11
2006-11-18
2006-12-17
2007-01-02
2007-01-07
2007-01-15
2007-02-02
2007-02-15
2007-02-25
2007-04-13
2007-11-10
2007-11-15
2007-12-02
2008-01-01

the brown-dragon blog

Downloading Dilbert

2009-09-10

Dilbert is a great comic strip. I have a bunch of Dilbert comics at home and recently I found that all the strips had been re-colored and were availble for free on the net.

The default look-and-feel of the site is a bit heavy for me so I was pretty happy when I found the lite hacker version also available on the site.

Unfortunately the fast version has two problems for me:

  1) It is not very keyboard friendly and
  2) The images are of lower quality than the main page versions!

So what I wanted was the fast version, but with images from the main page. The easiest way to do this was, I felt, to download the images and view them locally.

First, I tried using the excellent HTTrack Offline Browser but I couldn't figure out a good way to download only the images I wanted (without low content images, other images, swf, main pages, and sundry content) so I finally gave up on using a ready made tool and decided to write my own.

Since I'm using cygwin these days I decided to try using a bash script. What really shocked me was how easy this was to do! The following bash script:

    1) Checks every (fast) dilbert from it's inception in 1989 till date.
    2) Retrives the (dynamic) url of the images.
    3) Locates the full version of the fast version.
    4) Downloads it locally!

And all in about 8 lines of code which took just about 20 minutes to write and debug!

Check it out for yourself.

dilbert.sh

#!/usr/bin/bash
for RUNINGDATE in {1989..2009}-{01..12}-{01..31}
do
    RUNNINGDATE=`echo $RUNNINGDATE | sed 's/-\([0-9]-\)/-0\1/;s/-\([0-9]\)$/-0\1/'`
    DILBERTURL="http://dilbert.com/fast/$RUNNINGDATE/"
    DILBERTIMG="dilbert.$RUNNINGDATE.gif"
    $(curl -x192.168.1.10:8000 $DILBERTURL | grep /dyn/ | sed 's,.*src="\(.*\)".*,http://dilbert.com\1,;s/print.//;s/^/curl -x192.168.1.10:8000 /') > $DILBERTIMG
done

Other Posts

(ordered by Tags then Date)