#!/usr/local/bin/perl5 -w
##
## generate HTML file from bwillmot_trade list
##
while(<>) {
chop;
if ($_ =~ m/^#/) {
## comment or instruction
if ($_ =~ m/href /) {
print "";
} elsif ($_ =~ m/endref/) {
print "";
} elsif($_ =~ m/htmlcode /) {
print "$'";
} elsif($_ =~ m/timestamp/) {
@monthName = ('', 'January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December');
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
printf("%s %d, %d %d:%02d:%02d", $monthName[$mon+1], $mday, $year + 1900, $hour, $min, $sec);
}
} else {
print "$_\n";
}
}