Skip to content
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

watch 指令增加查看某一道题的提交记录的功能 #27

Closed
cometeme opened this issue Aug 6, 2019 · 6 comments
Closed

watch 指令增加查看某一道题的提交记录的功能 #27

cometeme opened this issue Aug 6, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@cometeme
Copy link

cometeme commented Aug 6, 2019

目前使用 watch 指令可以查看某一场比赛的提交记录,已经非常实用了。不过在某些情况下我希望只查看某一题的历史记录,希望能够增加一下这个功能。

It's very useful to use watch to search my previous submissions in a single contest, but sometimes I want to check my submissions on a single problem, hope you can add this feature.

@xalanq
Copy link
Owner

xalanq commented Aug 6, 2019

OK, I'll try to fix the format cf watch [all] [<contest-id>] to cf watch [all] [<contest-id>] [<problem-id>] (Maybe it's a illegal format of docopt, but I'll try)

@xalanq xalanq added the enhancement New feature or request label Aug 6, 2019
@xalanq
Copy link
Owner

xalanq commented Aug 6, 2019

I'm confused. If I use cf watch [all] [<contest-id>] [<problem-id>], that means I must type <contest-id> before the <problem-id> although I'm inside the directory of the <contest-id>.

Is there any good idea?

@cometeme
Copy link
Author

cometeme commented Aug 6, 2019

I'm confused. If I use cf watch [all] [<contest-id>] [<problem-id>], that means I must type <contest-id> before the <problem-id> although I'm inside the directory of the <contest-id>.

Is there any good idea?

I think we can read multiple inputs, and check them by following conditions:

  • if we get two inputs, it must be <contest-id> and <problem-id>, like 1000 A.
  • if we get one inputs, there can be three situations:
    • the inputs looks like 1000, it's all numbers, then it must be <contest-id>
    • the inputs looks like 1000A or 1010D1, composed of digits and letters, then you can split it into <contest-id> and <problem-id> like 1000 A or 1010 D1
    • the inputs is start with a letter, like A or D1, then it means a <problem-id>, so you can use the directory as <contest-id>

@xalanq
Copy link
Owner

xalanq commented Aug 6, 2019

Yeah. I agree with you. That's what I want to do. But it's unfriendly to the docopt usage document, and I need to write more explanations in README. Thoughts?

@cometeme
Copy link
Author

cometeme commented Aug 6, 2019

Let's ignore the case2-2 write before, since it's hard to explain in docs:

the inputs looks like 1000A or 1010D1, composed of digits and letters, then you can split it into and like 1000 A or 1010 D1

I think the doc can be write like this:

Usage:
cf watch [all] [<contest-id>] [<problem-id>]

Examples:
cf watch [all] 100: Watch the (first 10 / all) submissions of contest 100. If you are in the directory of current contest, the <contest-id> an be omitted.

cf watch [all] 100 a: Watch the (first 10 / all) submissions of problem 100A. If you are in the directory of current contest, the <contest-id> an be omitted.

@xalanq
Copy link
Owner

xalanq commented Aug 14, 2019

I'll use this one cf watch [all] [<contest-id>] [<problem-id>] in the next minor version. Because I need to fix all other issues quickly :)

In the next big update, I'll add more features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants