STEP 0: Be in a terminal window on machine with curl installed. Be in the directory of the file you which to submit to the homework submit page. What we are going to do is access "the program that processes the form on the submit page" using a cool program called curl
STEP 1: put the following lines of code into the file curlsubmit.
#!/bin/sh name=$1 ass=$2 file=$3 # adjust the next line for class and semester curl -F student=$name -F assignment="CS445 S14 Assignment $ass" -F "submittedfile=@$file" "http://ec2-54-200-16-181.us-west-2.compute.amazonaws.com/cgi-bin/fileCapture.py"
Set permissions on the curlsubmit file to be executable. On a unix machine that would be:
chmod u+x curlsumit
Either leave the file in the same directory as the file you want to submit or put the file in your scripts or bin directory which is in your PATH.
Then, for example, if your name is napoleon, your working on assignment number 1, and the file you want to submit is in the file tree.tar then you type:
curlsumit napoleon 1 tree.tarIf . is not in your PATH then type this instead:
./curlsumit napoleon 1 tree.tar
curl -F student=napoleon -F assnum="CS445 F10 Assignment 1" -F "firstname.lastname@example.org" http://marvin.cs.uidaho.edu/~heckendo/cgi-bin/hwSubmit.cgiThe script seems to hide a lot of this mess but this way you don't have to maintain a script.
Note that the web interface will tell you what assignments are available for submission. The testing software is often installed later than the assignment is made. If you are doing a curl submit make sure the testing software is available before you submit.
|Robert Heckendorn||Up One Level||Last updated: