Skip to content

コマンドの移行 & login, logoutの実装 #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Next Next commit
引数をcontest_idのみ受け付けるように修正
  • Loading branch information
matsui committed May 24, 2020
commit 2bfd90d3de76b2848b4bb1e156f2ddce2571cb31
16 changes: 10 additions & 6 deletions judge.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ def main():
""".format(__file__)

argparser = ArgumentParser(usage=example)
argparser.add_argument('contest_type',
type=str,
help='コンテストの種類')
argparser.add_argument('contest_id',
type=str,
help='コンテスト番号')
help='コンテストID')
argparser.add_argument('problem_type',
type=str,
help='テスト対象の問題指定(a ~ f)')
Expand All @@ -47,8 +44,15 @@ def main():

args = argparser.parse_args()

judge = Judge(args.contest_type,
args.contest_id,
if args.contest_id[:3] == 'abc' or 'arc' or 'agc':
contest_type = args.contest_id[:3]
contest_id = args.contest_id[3:]
else:
contest_type = 'others'
contest_id = args.contest_id

judge = Judge(contest_type,
contest_id,
args.problem_type)

if not args.debug:
Expand Down
19 changes: 14 additions & 5 deletions pycode.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,28 @@ def main():
""".format(__file__)

argparser = ArgumentParser(usage=example)
argparser.add_argument('contest_type',
type=str,
help='コンテストの種類')
# argparser.add_argument('contest_type',
# type=str,
# help='コンテストの種類')
argparser.add_argument('contest_id',
type=str,
help='コンテスト番号')
help='コンテストID')
argparser.add_argument('-a', '--add',
type=str,
help='テストケースの追加')

args = argparser.parse_args()

tm = TestMaker(args.contest_type, args.contest_id)
contest = args.contest_id[:3]
if contest == 'abc' or contest == 'arc' or contest == 'agc':
print('hoge')
contest_type = args.contest_id[:3]
contest_id = args.contest_id[3:]
else:
contest_type = 'others'
contest_id = args.contest_id

tm = TestMaker(contest_type, contest_id)
if not args.add:
tm.fetch_sample_cases()
else:
Expand Down