Very minimal documentation
authorTim Pope <code@tpope.net>
Tue, 10 Aug 2004 18:03:50 +0000 (18:03 +0000)
committerTim Pope <code@tpope.net>
Tue, 10 Aug 2004 18:03:50 +0000 (18:03 +0000)
perl/sctweb

index af6bdc68bedd206585efce73f0896c1e5ed222fa..7fe412b1a138a3f9bccf0baf24160f4661504192 100755 (executable)
@@ -2,6 +2,10 @@
 # $Id$
 # -*- perl -*- vim: ft=perl sw=4 sts=4
 
+# Brief usage instructions:
+# Create a ~/.sctwebrc that has SID=yourssn and PIN=yourpin
+# You'll need to change the url below if you go anywhere but Northwest Vista.
+
 use strict;
 use LWP::UserAgent;
 use HTML::TableExtract;
@@ -33,7 +37,7 @@ die $response->status_line unless $response->is_success;
 my @terms = grep {s/^<option value="([^"]*)">.*/$1/} (split( /\r\n/, $response->content));
 die "Site down. Try again later.\n" unless (@terms);
 
-sub do_schedule {
+sub do_html_schedule {
     my @readheaders = ("Section ID/Title", "Instructor", "Days", "Time", "Start/EndDates", "Site/Building/Room");
     my @showheaders = ("Section ID/Title", "Instructor", "Days", "Time", "Start/End\nDates", "Location");
     my $te = new HTML::TableExtract( headers => [ @readheaders ] );
@@ -75,7 +79,7 @@ sub do_schedule {
     print "</table>\n";
 }
 
-sub do_grades {
+sub do_html_grades {
     my @readheaders = ("Section ID", "Course Title", "Grade", "Attempted  Hours", "Earned  Hours", "Quality  Hours", "Quality  Points", "GPA");
     my @showheaders = ("Section ID", "Course Title", "Grade", "Attempted<br>Hours", "Earned<br>Hours", "Quality<br>Hours", "Quality<br>Points", "GPA");
     my ($row, $lastrow);
@@ -112,9 +116,9 @@ sub do_grades {
 
 if(defined($ARGV[0]) && $ARGV[0] eq "-g") {
     shift;
-    do_grades;
+    do_html_grades;
 } else {
-    do_schedule;
+    do_html_schedule;
 }
 
 $ua->get("$url&tserve_trans_config=alogout.cfg"); # Logout