Difference between revisions of "Pc2submit"

From PC2wiki
Jump to: navigation, search
m (Usage 2 - CCS: modified text)
m (add submit clarification content)
Line 1: Line 1:
pc2submit and pc2submit shows contest information and allow a user to submit a [[Run]].
+
pc2submit and pc2submit shows contest information and allow a user to submit a [[Run]] of [[Clarification]].
  
 
==Usage 1 - PC²==
 
==Usage 1 - PC²==
Line 6: Line 6:
  
 
  pc2submit --help
 
  pc2submit --help
 
  
 
The pc2submit like all other pc2 scripts, supports the -F option to specify
 
The pc2submit like all other pc2 scripts, supports the -F option to specify
Line 20: Line 19:
 
# allow the user to specify less information and the submit script will infer the rest  
 
# allow the user to specify less information and the submit script will infer the rest  
  
===Examples===
+
===Submit Run Examples===
  
 
To submit a run the user needs to specify their login, password, problem, language and filename(s).
 
To submit a run the user needs to specify their login, password, problem, language and filename(s).
  
A full command for a submission could be
+
A full command for a run submission could be
  
 
  pc2submit --login team5 --password 5pass42x A.java "All the king's men" Java
 
  pc2submit --login team5 --password 5pass42x A.java "All the king's men" Java
  
Or the user can use the command
+
Or the user can use the command to submit a run
  
 
  pc2submit --login team5 --password 5pass42x A.java
 
  pc2submit --login team5 --password 5pass42x A.java
Line 47: Line 46:
 
Also in this example it shows how to specify multiple files on the command line.
 
Also in this example it shows how to specify multiple files on the command line.
 
[[TODO]] (Does the -F also handle filenames, and if so, how?)
 
[[TODO]] (Does the -F also handle filenames, and if so, how?)
 +
 +
===Submit Clarification Examples===
 +
 +
Staring with [[Version 9.3]] Build 2591 a clarification can be submitted.
 +
 +
Usage
 +
pc2submit [-F propfile] --clar problem question
 +
pc2submit [-F propfile] --clar problem @filename
 +
 +
where filename is the name of a file that contains a clarification question.
 +
 +
Submit clar examples
 +
 +
pc2submit --login team5 --password 5pass42x Squares "How many squares are there?"
 +
 +
pc2submit --login team5 --password 5pass42x C "How many squares are there?"
 +
 +
pc2submit --login team5 --password 5pass42x C @clar1.txt
 +
  
 
===Usage Example===
 
===Usage Example===

Revision as of 23:37, 16 January 2013

pc2submit and pc2submit shows contest information and allow a user to submit a Run of Clarification.

Usage 1 - PC²

To produce usage use the command

pc2submit --help

The pc2submit like all other pc2 scripts, supports the -F option to specify some or all command line options in a file.

Features

The submit script does more than just submit runs, it can also:

  1. list information about the contest useful in submitting the run (--list option)
  2. list run information for previous runs (--listruns)
  3. check the syntax and content of a submission without sending the run to the server (--check)
  4. allow the user to specify less information and the submit script will infer the rest

Submit Run Examples

To submit a run the user needs to specify their login, password, problem, language and filename(s).

A full command for a run submission could be

pc2submit --login team5 --password 5pass42x A.java "All the king's men" Java

Or the user can use the command to submit a run

pc2submit --login team5 --password 5pass42x A.java

The filename is used to determine which language and problem. In this case the first problem for the contest is named "All the kings's men"

pc2submit -F authinfo C.c inc2.h

where authinfo contains

--login team5
--password 5pass42x

would be the same as this command (if problem C title is "Clear day fever")

 pc2submit --login team5 --password 5pass42x C.c,inc2.h "Clear day fever" C

Also in this example it shows how to specify multiple files on the command line. TODO (Does the -F also handle filenames, and if so, how?)

Submit Clarification Examples

Staring with Version 9.3 Build 2591 a clarification can be submitted.

Usage

pc2submit [-F propfile] --clar problem question
pc2submit [-F propfile] --clar problem @filename

where filename is the name of a file that contains a clarification question.

Submit clar examples

pc2submit --login team5 --password 5pass42x Squares "How many squares are there?"
pc2submit --login team5 --password 5pass42x C "How many squares are there?"
pc2submit --login team5 --password 5pass42x C @clar1.txt


Usage Example

Usage Submitter [--help|--list|--listruns|--check] --login loginname [--password password] filename [problem [language]]
Usage Submitter [-F propfile] [--help|--list|--listruns|--check] filename [problem [language]]
Usage Submitter [options] filename1[,filename2[,filename3[,...]]] [problem [language]]

Submit filename for problem and language.  If problem or language
not specified the program will guess which problem and language
based on the file name.

--help   this listing

--helpCCS  CCS testing usage info

--check  login and check parameters: list problem, language and files that would be submitted.

--list   list problem and languages

--listruns list run info for the user

On success exit code will be 0
On failure exit code will be non-zero

$Id: Submitter.java 2463 2012-02-18 05:49:43Z laned $

Usage 2 - CCS

The standard command line for CCS is

Submitter [-t timestamp] [-i runid] -u loginname -w password -p problem -l language -m mainfile filelist

The system supports both that command line and other command line options.

Usage

Usage Submitter [--help|--list|--listruns|--check] options
Usage Submitter [-t timestamp] [-i runid] -u loginname -w password -p problem -l language -m mainfile filelist
Usage Submitter [-F propfile] [--help|--list|--listruns|--check] 

Submit filename for problem and language.  

--helpCCS      - this listing

-p problem     - contest problem letter or name

-l language    - contest language

-u loginname   - user login 

-w password    - user password

-m filename    - main source file name in directory specified by -d option

-i runid       - (optional) run id for submission  

-t timestamp   - (optional)  contest time for submission  

--list         - list problem and languages

--listruns     - list run info for the user

filelist       - list of files including main file

On success exit code will be 0
On failure exit code will be non-zero

$Id: Submitter.java 2463 2012-02-18 05:49:43Z laned $

See Also