- My Daily Dose of Comics

Download this program

SYNOPSIS            # Normal case, sends Email -d 1       # Use this for debugging -d 2       # Debugging. Saves comic in *.page files -d 1 -grab # Debugging. Read comic from *.page files


Uss this program manually or in a cron job to figure out the URLs for your favorite comic and send you an Email. The program fetches the comic and tries to find the image of the comic so you don't need to look at all that extra advertising.

The program reads a configuration file which defines the users to receive the Email as well as the rules for finding the comics.

Output from the program is an Email sent to a list you designate. The body of the Email looks like this:

  Subject: From the Comic Archives

  Don't bother telling me if any of these URLs fail:

  Dilbert: (Unable to find comic in URL)

  Calvin and Hobbes:


  Garfield: (Unable to fetch initial page)

  Hagar the Horrible:

  User Friendly:



-cfgfile file
Specifies the path to the configuration file. The default is 'getcomics.txt' found in the same directory where this program is found.

-debug N
Enables debugging to show you what was found. If N is larger than 1, the comic page is saved in a file with an extension of '.page'.

-email address
Allows you to override the destination Email address found in the configuration file. This is useful when debugging.

Specifies the program should fetch the comic from a file with the extension of .page. See also -save This is useful when debugging.

Shows you this help file.

Specifies the program should save the comic as a file with the extension of .page. See also -grab. This is useful when debugging.


The program takes no parameters.


The configuration file consists of two sections. The first follows a comment line ``#User_Definitions'' and consists of a set of Email addresses to send the message to. All users get the same Email

The second section follows a comment line ``#Comic_Definitions'' and defines the comics to be fetched. Each line consists of four parts, each separated by the character '|'.

is the name of the comic (e.g. Dilbert)

is URL of the page to fetch. Be sure to specify '/' after the hostname.

is the string to find in page we fetched. This is Perl regular expression and may result in a full, partial or relative URL Note that this MUST contain up to three Perl grouping parenthesies.

Specifies a prefix for string match returned by imagemask This should contain %1%, %2% and %3% to substitute for matches in imagemask. Special support added for Javascript routines. Do these substitutions:
  • %YYYY% - year as four digits
  • %YY% - year as two digits
  • %MM% - month as two digits
  • %DD% - day as two digits

Here's a sample file. Notice the comic defintions are generally very long and have been broken after the '|' characters:

  #     Send Email to these addresses
  Dilbert            ||
  Calvin and Hobbes  ||
  Doonesbury         ||
  Garfield           ||
    var stripName\s*=\s*.(.+/\d\d\d\d)|
  Hagar the Horrible ||
  User Friendly      ||
  Non-Sequitur       ||\d{4}/nq\d{6}.gif)|


If no fatal errors are detected, the program exits with a return code of 0.


Written by Terry Gliedt <> in 1994-2005. This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; See