From f65ee818b0b3dd72de609ab923173349a981776f Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 16 Aug 2005 07:27:26 +0000 Subject: [PATCH] Modified command line arguments --- perl/sct6 | 12 ++++++------ perl/sctweb | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/perl/sct6 b/perl/sct6 index dc5aad2..939dafb 100755 --- 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 diff --git a/perl/sctweb b/perl/sctweb index 8f514bb..fc96328 100755 --- a/perl/sctweb +++ b/perl/sctweb @@ -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 -- 2.30.2