Documentation ¶
Index ¶
- Constants
- Variables
- func CodeforcesList() (err error)
- func CodeforcesOpen() (err error)
- func CodeforcesParse() (err error)
- func CodeforcesPull() (err error)
- func CodeforcesRace() (err error)
- func CodeforcesSid() (err error)
- func CodeforcesStand() (err error)
- func CodeforcesSubmit() (err error)
- func CodeforcesWatch() (err error)
- func Config() (err error)
- func DatabaseAdd() (err error)
- func DatabaseFind() (err error)
- func DatabaseGoto() (err error)
- func Eval(opts docopt.Opts) error
- func ExtendTaskInfo(task database_client.Task, props valuesProperties) database_client.Task
- func ExtractTaskName(file string) (task string)
- func Gen() (err error)
- func GenFiles(source, currentPath, ext string) error
- func GetTaskFromArgs() database_client.Task
- func ReadTask(task database_client.Task) database_client.Task
- func StressTest() (err error)
- func SubPath(parent, sub string) bool
- func SzkopulOpen() (err error)
- func SzkopulSid() (err error)
- func SzkopulSubmit() (err error)
- func SzkopulWatch() (err error)
- func Test() (err error)
- func Upgrade() (err error)
- type CodeList
- type ParsedArgs
- type ProcessInfo
- type Verdict
- type WriteCounter
Constants ¶
View Source
const CodeforcesContestRegStr = `\d+`
View Source
const CodeforcesGroupRegStr = `\w{10}`
View Source
const CodeforcesProblemRegStr = `\w+`
View Source
const CodeforcesStrictProblemRegStr = `[a-zA-Z]+\d*`
View Source
const CodeforcesSubmissionRegStr = `\d+`
View Source
const OIContestRegStr = `[MCLXVI]+`
View Source
const OIStageRegStr = `[1-3]`
View Source
const StrictSzkopulProblemRegStr = `[a-z]{3}\d*`
View Source
const SzkopulProblemRegStr = `\w+`
View Source
const SzkopulProblemSecretKeyRegStr = `[A-Za-z0-9]{24}`
Variables ¶
View Source
var CodeforcesArgRegStr = [...]string{ `^[cC][oO][nN][tT][eE][sS][tT][sS]?$`, `^[gG][yY][mM][sS]?$`, `^[gG][rR][oO][uU][pP][sS]?$`, `^[aA][cC][mM][sS][gG][uU][rR][uU]$`, fmt.Sprintf(`/contest/(?P<contestID>%v)(/problem/(?P<problemID>%v))?`, CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf(`/gym/(?P<contestID>%v)(/problem/(?P<problemID>%v))?`, CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf(`/problemset/problem/(?P<contestID>%v)/(?P<problemID>%v)`, CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf(`/group/(?P<groupID>%v)(/contest/(?P<contestID>%v)(/problem/(?P<problemID>%v))?)?`, CodeforcesGroupRegStr, CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf(`/problemsets/acmsguru/problem/(?P<contestID>%v)/(?P<problemID>%v)`, CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf(`/problemsets/acmsguru/submission/(?P<contestID>%v)/(?P<submissionID>%v)`, CodeforcesContestRegStr, CodeforcesSubmissionRegStr), fmt.Sprintf(`/submission/(?P<submissionID>%v)`, CodeforcesSubmissionRegStr), fmt.Sprintf(`^(?P<contestID>%v)(?P<problemID>%v)$`, CodeforcesContestRegStr, CodeforcesStrictProblemRegStr), fmt.Sprintf(`^(?P<contestID>%v)$`, CodeforcesContestRegStr), fmt.Sprintf(`^(?P<problemID>%v)$`, CodeforcesStrictProblemRegStr), fmt.Sprintf(`^(?P<groupID>%v)$`, CodeforcesGroupRegStr), }
View Source
var CodeforcesArgType = [...]string{
"contest",
"gym",
"group",
"acmsguru",
"contest",
"gym",
"contest",
"group",
"acmsguru",
"acmsguru",
"",
"",
"",
"",
"",
}
View Source
var CodeforcesArgTypePathRegStr = [...]string{ fmt.Sprintf("%v/%v/((?P<contestID>%v)/((?P<problemID>%v)/)?)?", "%v", "%v", CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf("%v/%v/((?P<contestID>%v)/((?P<problemID>%v)/)?)?", "%v", "%v", CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf("%v/%v/((?P<groupID>%v)/((?P<contestID>%v)/((?P<problemID>%v)/)?)?)?", "%v", "%v", CodeforcesGroupRegStr, CodeforcesContestRegStr, CodeforcesProblemRegStr), fmt.Sprintf("%v/%v/((?P<problemID>%v)/)?", "%v", "%v", CodeforcesProblemRegStr), }
View Source
var SzkopulArgRegStr = [...]string{ `^[oO][iI]?$`, fmt.Sprintf(`/problemset/problem/(?P<problemSecretKey>%v)(/site(/\?key=\w+)?)?`, SzkopulProblemSecretKeyRegStr), fmt.Sprintf(`^(?P<problemSecretKey>%v)$`, SzkopulProblemSecretKeyRegStr), fmt.Sprintf(`^(?P<problemID>%v)$`, StrictSzkopulProblemRegStr), fmt.Sprintf(`^(?P<contestID>%v)$`, OIContestRegStr), fmt.Sprintf(`^(?P<stageID>%v)$`, OIStageRegStr), }
View Source
var SzkopulArgType = [...]string{
"OI",
"OI",
"OI",
"OI",
"OI",
"OI",
}
View Source
var SzkopulPathRegStr = [...]string{ fmt.Sprintf("%v/%v/((?P<contestID>%v)/((?P<stageID>%v)/((?P<problemID>%v)/)?)?)?", "%v", "%v", OIContestRegStr, OIStageRegStr, StrictSzkopulProblemRegStr), }
Functions ¶
func DatabaseAdd ¶
func DatabaseAdd() (err error)
func DatabaseFind ¶
func DatabaseFind() (err error)
func DatabaseGoto ¶
func DatabaseGoto() (err error)
func ExtendTaskInfo ¶
func ExtendTaskInfo(task database_client.Task, props valuesProperties) database_client.Task
func ExtractTaskName ¶
func GetTaskFromArgs ¶
func GetTaskFromArgs() database_client.Task
func ReadTask ¶
func ReadTask(task database_client.Task) database_client.Task
Types ¶
type ParsedArgs ¶
type ParsedArgs struct { CodeforcesInfo codeforces_client.Info SzkopulInfo szkopul_client.Info File string Generator string Solve string Brute string Source string Name string Path string Link string Shortname string Contest string Stage string Specifier []string `docopt:"<specifier>"` Alias string `docopt:"<alias>"` Accepted bool `docopt:"ac"` All bool `docopt:"all"` Handle string `docopt:"<handle>"` Version string `docopt:"{version}"` Config bool `docopt:"config"` Submit bool `docopt:"submit"` List bool `docopt:"list"` Parse bool `docopt:"parse"` Gen bool `docopt:"gen"` Test bool `docopt:"test"` Watch bool `docopt:"watch"` Open bool `docopt:"open"` Stand bool `docopt:"stand"` Sid bool `docopt:"sid"` Race bool `docopt:"race"` Pull bool `docopt:"pull"` Clone bool `docopt:"clone"` Upgrade bool `docopt:"upgrade"` StressTest bool `docopt:"stress-test"` Database bool `docopt:"db"` Add bool `docopt:"add"` Find bool `docopt:"find"` Goto bool `docopt:"goto"` Codeforces bool Szkopul bool }
ParsedArgs parsed arguments
var Args *ParsedArgs
Args global variable
type ProcessInfo ¶
type ProcessInfo struct {
// contains filtered or unexported fields
}
type WriteCounter ¶
type WriteCounter struct {
Count, Total uint
// contains filtered or unexported fields
}
WriteCounter progress counter
Source Files ¶
- args.go
- args_cf.go
- args_szkopul.go
- cmd.go
- codeforces-browser.go
- codeforces-list.go
- codeforces-parse.go
- codeforces-pull.go
- codeforces-race.go
- codeforces-submit.go
- codeforces-watch.go
- config.go
- database-add.go
- database-find.go
- database-goto.go
- gen.go
- stressTest.go
- szkopul-browser.go
- szkopul-submit.go
- szkopul-watch.go
- test.go
- upgrade.go
Click to show internal directories.
Click to hide internal directories.