X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=perl%2Fsctweb;h=7c6f23ea7280b08f616feed7c024eb97cb103072;hp=878bcd7aed7c433f0576b8f69cda9dec431991ea;hb=bc83d0e12d5f3a428a34c90b6acbbd072c7606c5;hpb=02cd3de48c08ae6f5d49caf24c1da5a2cd219d9a diff --git a/perl/sctweb b/perl/sctweb index 878bcd7..7c6f23e 100755 --- a/perl/sctweb +++ b/perl/sctweb @@ -75,7 +75,7 @@ sub get_schedule_terms { } sub do_mhc_schedule { - my @readheaders = ("Section ID/Title", "Days", "Time", "Start/EndDates"); + my @readheaders = ("Section ID/Title", "Days", "Time", "Start/EndDates", "Site/Building/Room"); my %days = (M => "Mon", T => "Tue", W => "Wed", R => "Thu", F => "Fri", S => "Sat"); my $te = new HTML::TableExtract( headers => [ @readheaders ] ); my (@terms, $row); @@ -101,12 +101,15 @@ sub do_mhc_schedule { $row->[2] =~ s/PM$//; } else { $row->[2] =~ s/AM$//; } $row->[3] =~ s/(\d\d)-(\d\d)-(\d\d)/20$3$1$2/g; + $row->[4] =~ s/ON CAMPUS-//g; + $row->[4] =~ s/-/ /g; print "\n"; print "X-SC-Subject: ", $row->[0], "\n"; print "X-SC-Category: School\n"; print "X-SC-Cond:", $row->[1], "\n"; # Space after colon not needed print "X-SC-Time: ", $row->[2], "\n"; print "X-SC-Duration: ", $row->[3], "\n"; + print "X-SC-Location: ", $row->[4], "\n"; } } }