예제 #1
0
def workParser(parsers: ArgumentParser):
    helpText = 'Initiate a loop of running a subset of Kat commands interactively, on a list of problems retrieved from the Kattis instance. Options given to this command will be applied to the relevant commands called in the environment.'
    parser = parsers.add_parser('work', help=helpText, description=helpText)
    parser.add_argument(
        '-p',
        '--problem',
        help='Work on only 1 problem (this will ignore all list flags)',
        type=problem)
    getFlags(parser)
    submitFlags(parser)
    listFlags(parser)
예제 #2
0
def contestParser(parsers):
    helpText = 'Run commands specific to Kattis contests.'
    description = f"{helpText} Use `kattis contest set <contest-id> to "
    parser: ArgumentParser = parsers.add_parser('contest',
                                                description=description,
                                                help=helpText)
    parser.add_argument('-c',
                        '--contest',
                        help='Override the contest to operate on.',
                        type=definedContest)
    subs = parser.add_subparsers(dest='contest_command', metavar='command')

    getText = 'Get the problems associated with the contest.'
    get = subs.add_parser('get', description=getText, help=getText)
    getFlags(get)