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 SioList() (err error)
- func SioOpen() (err error)
- func SioParse() (err error)
- func SioRace() (err error)
- func SioSid() (err error)
- func SioStand() (err error)
- func SioSubmit() (err error)
- func SioWatch() (err error)
- func StressTest() (err error)
- func SubPath(parent, sub string) bool
- func SzkopulList() (err error)
- func SzkopulOpen() (err error)
- func SzkopulParse() (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 ErrorMultipleProblemsFound = "more than one problem found matching criteria"
View Source
const ErrorNoProblemFound = "no problem found matching criteria"
View Source
const OIContestRegStr = `[MCLXVI]+`
View Source
const OIStageRegStr = `[1-3]`
View Source
const SioContestRegStr = `[\w-]+?`
View Source
const SioProblemIdRegStr = `\d+`
View Source
const SioProblemRegStr = `[a-z]+\d*`
View Source
const SioRoundRegStr = `\w+?`
View Source
const StrictSzkopulProblemRegStr = `[a-z]{3}\d*`
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 SioArgRegStr = [...]string{ fmt.Sprintf(`/c/(?P<contestID>%v)/(p/(?P<problemAlias>%v)?)?`, SioContestRegStr, SioProblemRegStr), fmt.Sprintf(`^(?P<problemID>%v)$`, SioProblemIdRegStr), fmt.Sprintf(`^(?P<problemAlias>%v)$`, SioProblemRegStr), fmt.Sprintf(`^(?P<contestID>%v)$`, SioContestRegStr), }
View Source
var SioPathRegStr = fmt.Sprintf("%v/((?P<contestID>%v)/((?P<round>%v)/((?P<problemAlias>%v)/)?)?)?", "%v", SioContestRegStr, SioRoundRegStr, SioProblemRegStr)
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<problemAlias>%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<problemAlias>%v)/)?)?)?", "%v", "%v", OIContestRegStr, OIStageRegStr, StrictSzkopulProblemRegStr), }
Functions ¶
func CodeforcesList ¶
func CodeforcesList() (err error)
func CodeforcesOpen ¶
func CodeforcesOpen() (err error)
func CodeforcesParse ¶
func CodeforcesParse() (err error)
func CodeforcesPull ¶
func CodeforcesPull() (err error)
func CodeforcesRace ¶
func CodeforcesRace() (err error)
func CodeforcesSid ¶
func CodeforcesSid() (err error)
func CodeforcesStand ¶
func CodeforcesStand() (err error)
func CodeforcesSubmit ¶
func CodeforcesSubmit() (err error)
func CodeforcesWatch ¶
func CodeforcesWatch() (err error)
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
func StressTest ¶
func StressTest() (err error)
func SzkopulList ¶ added in v0.4.1
func SzkopulList() (err error)
func SzkopulOpen ¶
func SzkopulOpen() (err error)
func SzkopulParse ¶ added in v0.4.0
func SzkopulParse() (err error)
func SzkopulSid ¶
func SzkopulSid() (err error)
func SzkopulSubmit ¶
func SzkopulSubmit() (err error)
func SzkopulWatch ¶
func SzkopulWatch() (err error)
Types ¶
type ParsedArgs ¶
type ParsedArgs struct { CodeforcesInfo codeforces_client.Info SzkopulInfo szkopul_client.Info SioInfo sio_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 SioStaszic bool SioMimuw bool }
var Args *ParsedArgs
type ProcessInfo ¶
type ProcessInfo struct {
// contains filtered or unexported fields
}
type WriteCounter ¶
type WriteCounter struct {
Count, Total uint
// contains filtered or unexported fields
}
func (*WriteCounter) Print ¶
func (w *WriteCounter) Print()
Source Files
¶
- args.go
- args_cf.go
- args_sio.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
- sio-browser.go
- sio-list.go
- sio-parse.go
- sio-race.go
- sio-submit.go
- sio-watch.go
- stressTest.go
- szkopul-browser.go
- szkopul-list.go
- szkopul-parse.go
- szkopul-submit.go
- szkopul-watch.go
- test.go
- upgrade.go
Click to show internal directories.
Click to hide internal directories.