Modified command line arguments
authorTim Pope <code@tpope.net>
Tue, 16 Aug 2005 07:27:26 +0000 (07:27 +0000)
committerTim Pope <code@tpope.net>
Tue, 16 Aug 2005 07:27:26 +0000 (07:27 +0000)
perl/sct6
perl/sctweb

index dc5aad2c2827c82465db6f47e2b3fd6025277c18..939dafbb4194e45932666e9eb85063785670cb37 100755 (executable)
--- a/perl/sct6
+++ b/perl/sct6
@@ -188,8 +188,7 @@ sub capitalize {
     s/\bUs\b/US/g;
     s/ (And|For|Of|Or|The|To|With) / \l$1 /g;
     s/\b(Mc)([a-z])/$1\u$2/g;
-    s/\bTba\b/TBA/g;
-    s/\b(Tcp\/Ip|Pc)\b/\U$&/g;
+    s/\b(Tcp\/Ip|Pc|Tba)\b/\U$&/g;
     s/\bThru\b/Through/g;
     s/\bAcct\b/Accounting/g;
     s/\bAmer\b/American/g;
@@ -204,6 +203,7 @@ sub capitalize {
     s/\bLit\b/Literature/g;
     s/\bPrin\b/Principles/g;
     s/\bBus\b/Business/g;
+    s/\bSyst\b/Sys/g;
     return $_;
 }
 
@@ -276,7 +276,7 @@ sub get_schedule {
            $row->[3] =~ s/\n/ /g;
            push @schedule, {
                id => $classid,
-               title => $title,
+               title => capitalize($title),
                instructor => $row->[6],
                days => $row->[2],
                #'time' => $row->[1],
@@ -600,7 +600,7 @@ sub do_transcripts {
     }
 }
 
-if ($arg eq "-s") {
+if ($arg eq "-s" || $arg eq "-h") {
     do_html_schedule(@ARGV);
 } elsif ($arg eq "-m") {
     do_mhc_schedule(@ARGV);
@@ -608,14 +608,14 @@ if ($arg eq "-s") {
     do_csv_schedule(@ARGV);
 } elsif ($arg eq "-v") {
     do_vcalendar_schedule(@ARGV);
-} elsif ($arg eq "-x") {
-    do_xml_schedule(@ARGV);
 } elsif ($arg eq "-g") {
     die "Grade support currently broken.\n";
     do_html_grades(@ARGV);
 } elsif ($arg eq "-t") {
     die "Transcript support currently broken.\n";
     do_transcripts;
+} elsif ($arg eq "-x" || 1) {
+    do_xml_schedule(@ARGV);
 }
 
 $ua->get("${url}twbkwbis.P_Logout"); # Logout
index 8f514bbd782ad9422a3b4b679bbecef760ca72fd..fc96328f3e79256617dbdbd1cb8e04a5e0e28675 100755 (executable)
@@ -668,7 +668,7 @@ sub do_transcripts {
     }
 }
 
-if ($arg eq "-s") {
+if ($arg eq "-s" || $arg eq "-h") {
     do_html_schedule(@ARGV);
 } elsif ($arg eq "-m") {
     do_mhc_schedule(@ARGV);
@@ -676,14 +676,14 @@ if ($arg eq "-s") {
     do_csv_schedule(@ARGV);
 } elsif ($arg eq "-v") {
     do_vcalendar_schedule(@ARGV);
-} elsif ($arg eq "-x") {
-    do_xml_schedule(@ARGV);
 } elsif ($arg eq "-g") {
     do_html_grades(@ARGV);
 } elsif ($arg eq "-t") {
     do_transcripts;
 } elsif ($arg eq "-f") {
     do_faculty;
+} elsif ($arg eq "-x" || 1) {
+    do_xml_schedule(@ARGV);
 }
 
 $ua->get("$url&tserve_trans_config=alogout.cfg"); # Logout