| 1 | #!/usr/bin/perl | ||||||||||
| 2 | # cal2html - generate HTML from a calendar schedule | ||||||||||
| 3 | # Part of the Calendar::Schedule module package | ||||||||||
| 4 | 1 | ▶ | use Calendar::Schedule qw/:all/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | my $TTable = Calendar::Schedule->new(); | |||||||||
| 6 | |||||||||||
| 7 | # Check for command-line options | ||||||||||
| 8 | 1 | my @tmp; for $a (@ARGV) { | |||||||||
| 9 | 2 | ▶ | if ($a =~ /^--ColLabel=/) { $TTable->{ColLabel} = $'; } | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | 1 | else { push @tmp, $a; } } | |||||||||
| 11 | 1 | @ARGV = @tmp; | |||||||||
| 12 | |||||||||||
| 13 | 1 | ▶ | while (<>) { $TTable->add_entries($_); } | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 1 | $TTable->set_first_week('now'); | |||||||||
| 15 | 1 | print "<html><body>\n<p>\n" . $TTable->generate_table(); | |||||||||
| 16 | |||||||||||
| 17 | 1 | exit 0; | |||||||||
| 18 | __END__ # Documentation | ||||||||||