b0VIM 4.5d6Ereganreganh.regan.org~regan/public_html/web.calendar/web.calendar23210#"! UtpJad 1om8hQ* S  M 9 Q 6 z Z X  } | D    rZD6yut21XxpOFE/q^;.le3?810 } } print "
$cal
"; $lastmon = $mon; # Put out a new table for the month $cal = `cal $mon $year`; { if ($mon != $lastmon) $Activities{$year, $mon, $day}\n"; print "$MonTabShort[$mon] $disp } $thismon = 0; print "
\n"; } print "

\n"; { while ($thismon++ < 5) { if ($mon != $lastmon && $lastmon != 0) $thismon++; $disp = "TBA" if ($day == 0); $disp = $day; ($year, $mon, $day) = split(/$;/, $key); { for $key (sort(keys %Activities)) $thismon = 0; $lastmon = 0; EOF

$Params{'banner'}

$Params{'title'} print << " EOF"; $Params{'bg'} = qq|bgcolor="$Params{'bg'}"| if ($Params{'bg'} ne ""); ReadCalendar($Params{'data'});# chdir($ENV{'HOME'}); ($EndYear, $EndMonth) = split(/[\D]/, $Params{'end'}); ($StartYear, $StartMonth) = split(/[\D]/, $Params{'start'}); # Split the years and month "data=s", "start=s", "end=s", "bg=s", "title=s", "banner=s"); GetOptions(\%Params, # Crack the parameters my($cal, $day, $disp, $key, $lastmon, $mon, $thismon, $year);###### Main program### "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");@MonTabShort = ( "", "Jan", "Feb", "Mar", "Apr", "May", "Jun", ); "banner" => "Calendar", "title" => "Calendar", "bg" => "", "end" => "9999/12", "start" => "0000/01", "data" => "calendar.data", (%Params =$Version = 'web.calendar2 v0.10 regan@ao.com';$EndMonth = 12;$EndYear = 9999;$StartMonth = 1;$StartYear = 1000; %Params $StartMonth $StartYear $Version);use vars qw(%Activities $EndMonth $EndYear @MonTabShortuse Getopt::Long;use strict;## 7 Feb 1999# regan@ao.com# Dave Regan## http://cornvalley.peak.org/web.calendar/# should be up to date is at:# The official source is in on my home computer. A copy which## Don't ask too many questions.# This program is in the public domain. Do what you want with it.## This is the header text of the calendar.# --banner "some message"# This specifies the title of the calendar.# --title "some title"# that HTML allows. This defaults to no specific color.# This specifies the background color. This can be anything# --bg color# goes as long as possible.# This specifies the ending month. If unspecified, the calendar# --end 1999/05# format shown. If unspecified, it starts as early as possible.# This specifies the starting month. This must be in the# --start 1998/10# The events may contain HTML, but keep it simple.# event calendar's filename is assumed to be "calendar.data".# The event calendar must be in order. If not specified, the# TBA=event Some event at an unknown date within the month.# 1=event Some event on the specified day.# Month=10 Introduces a new month# Year=1999 Introduces a new year# # Comment line# which are of the form:# This is the name of the calendar data file. It contains# --data datafile# Flags:# web.calendar2 [flags] >calendar.html# Usage:## between the given dates specified.# This generates a single web page with the calendar## from a calendar file.# Generate a simple calendar. Get the information## Generate a calendar.## web.calendar2##!/usr/local/bin/perl -wad JlN60/.*~[NGF4-! t Z N 0 (  l O   L G < 3 } close CAL; } } } } } $Activities{$year, $month, $name} .= "/ $value\n"; { else } $Activities{$year, $month, $name} = "$value\n"; { if (!defined($Activities{$year, $month, $name})) { ($year == $EndYear && $month <= $EndMonth))) ($year < $EndYear || ($year == $StartYear && $month >= $StartMonth)) && if (($year > $StartYear || $name = " 0" if ($name eq "TBA"); $name = sprintf("%2d", $name) if ($name ne "TBA"); { elsif ($name =~ /^(\d+|TBA)$/) } $month = sprintf("%2d", $value); { elsif ($name eq "Month") } $year = $value; { if ($name eq "Year") ($name = $1) =~ s/\s*//; $value = $2; { if (/^([^=]*)=\s*(.*)/) next if (/^\s*#/ || /^\s*$/); chomp; { while () } exit 1; print "Cannot open $fname\n"; { if (!open(CAL, "<$fname")) my($month, $name, $value, $year); my($fname) = @_; {sub ReadCalendar###### Read a calendar file.###### ReadCalendar### } return $ax <=> $bx; ($bx = $b) =~ s/TBA/00/g; ($ax = $a) =~ s/TBA/00/g; my($ax, $bx); {sub myway###### A sorting routine.###### myway### exit 0; print "

\n";