#-*-Perl-*-

foreach ("ttdb","tkc","storymin","tmw") {
    $hof{$_} = 0;
}

sub solan {
    my ($today,$name,$prefix) = @_;
    my @ltime = localtime($today);
    my $rec = {
	'name' => strftime("$name-${date_fmt}.gif",@ltime),
	'base' => "http://www.salonmagazine.com/comics/$prefix/",
	'page' => strftime("%Y/%m/src/%d$prefix.gif",@ltime)
	};
    return $rec;
}

#Ruben Boll's
#Tom the Dancing Bug http://www.salonmagazine.com/comics/boll/
sub ttdb {
    my $today = shift;
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 
        localtime($today);
    if ($wday == 4) {
	return solan($today,"Tom_the_Dancing_Bug","boll");
    } else {
	return undef;
    }
}

#Keith Knight's
#The K Chronicals http://www.salonmagazine.com/comics/knig/
sub tkc {
    my $today = shift;
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 
        localtime($today);
    if ($wday == 3) {
	return solan($today,"The_K_Chronicles","knig");
    } else {
	return undef;
    }
}

#Carol Lay's
#Story Minute http://www.salonmagazine.com/comics/lay/
sub storymin {
    my $today = shift;
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 
        localtime($today);
    if ($wday == 2) {
	return solan($today,"Story_Minute","lay");
    } else {
	return undef;
    }
}

#Tom Tomorrow's
#This Modern World http://www.salonmagazine.com/comics/tomo/
sub tmw {
    my $today = shift;
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 
        localtime($today);
    if ($wday == 1) {
	return solan($today,"This_Modern_World","tomo");
    } else {
	return undef;
    }
}

1;
