X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=perl%2Fschedproc;h=9107e8353f548a3eb975c8c6e59ed49c0fb6c74b;hp=fbb2737b2c278c9bc459d49243545e91b3d7e411;hb=681facea5ca194fcd334d0f1e4fc7c1959223ba1;hpb=f385d2be3b94ba34334e077ff2ec0d5a35cb5b21
diff --git a/perl/schedproc b/perl/schedproc
index fbb2737..9107e83 100755
--- a/perl/schedproc
+++ b/perl/schedproc
@@ -3,8 +3,8 @@
# -*- perl -*- vim: ft=perl sw=4 sts=4
# Brief usage instructions:
-# Create a ~/.sct6rc that has SID=yourssn and PIN=yourpin
-# You'll need to change the url below if you go anywhere but TAMUK.
+# Create a ~/.schedprocrc that has schedule=/path/to/schedule.xml and
+# grades=/path/to/grades.xml. HTTP URLs are acceptable
use strict;
use Date::Calc::Object qw(Day_of_Week Decode_Day_of_Week Decode_Month Week_of_Year Monday_of_Week Day_of_Week_Abbreviation Delta_Days Add_Delta_Days Nth_Weekday_of_Month_Year Gmtime Mktime);
@@ -304,7 +304,9 @@ sub do_csv_schedule {
#print "# $id\n";
$current .= $row->{'id'} . ",";
$current .= $row->{'title'} . ",";
- $current .= '"' . $row->{'instructor'} . '",';
+ my $instructor = $row->{'instructor'};
+ $instructor =~ s/ [A-Z. ]* / /;
+ $current .= '"' . $instructor . '",';
$next =~ /^(\d\d\d\d)(\d\d)(\d\d)$/;
$current .= $1 . "-". $2 ."-" . $3 . "\n";
print $current;
@@ -382,7 +384,6 @@ sub do_html_schedule {
print "\n";
foreach my $row (@schedule) {
map { s/\n/
/g; $_} %$row;
- #$row->{'time'} =~ s/-/-
/g;
$row->{'duration'} =~ s/\d\d(\d\d)(\d\d)(\d\d)/$2-$3-$1/g;
print '