X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=perl%2Fsct6;h=cb3fe0b19bc274d7e64b34176b4fb65020494570;hp=fde8f7f75d5604370c5dfb199f692ef845b48b7f;hb=8c167e189c9d136496622da617ce1c42d3580a50;hpb=b570275c6c6b6da76ec6ba268a0c432262794cd9 diff --git a/perl/sct6 b/perl/sct6 index fde8f7f..cb3fe0b 100755 --- a/perl/sct6 +++ b/perl/sct6 @@ -6,13 +6,16 @@ # Create a ~/.sct6rc that has SID=yourssn and PIN=yourpin # You'll need to change the url below if you go anywhere but TAMUK. +# Update: This tool now only outputs in XML. For other formats, convert +# with schedproc + use strict; -use LWP::UserAgent; -use HTML::TableExtract; -#use Time::Local; 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); use Date::Calendar::Profiles qw($Profiles); use Date::Calendar::Year; +use HTML::TableExtract; +use LWP::UserAgent; +use XML::Simple; use vars qw($ua %opts %faculty); my ($response); @@ -91,17 +94,9 @@ $response = $ua->post("${url}twbkwbis.P_ValLogin", { sid => $opts{SID}, PIN => $ $response = $ua->get("${url}bwskflib.P_SelDefTerm"); # Valid terms die $response->status_line unless $response->is_success; -my @terms = grep {s/^