Modified command line arguments
[tpope-extra.git] / perl / sct6
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