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 curl -F student=$name -F assignment="CS445 F20 Assignment $ass" -F "submittedfile=@$file" "https://engr-sonic-01.engr.uidaho.edu/cgi-bin/fileCapture.py" --user $name
STEP 2:
Set permissions on the curlsubmit file to be executable. On a unix machine that would be:
chmod u+x curlsumit
STEP 3:
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.
STEP 4:
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 assignment="CS445 F20 Assignment 1" -F "submittedfile=@tree.tar" "https://engr-sonic-01.engr.uidaho.edu/cgi-bin/fileCapture.py" --user napoleonThe 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: |