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

feature: select submit language by name #172

Merged
merged 1 commit into from
Jul 29, 2018

Conversation

fukatani
Copy link
Contributor

@fukatani fukatani commented Jul 28, 2018

概要

submit時、IDの代わりに文字列で入力したいです(毎回テーブル調べるのが面倒なため)

入力例

正常時

oj s -l rust ...
[*] choosed language: ['Rust (1.15.1)']

Rust (1.15.1)を選択したものとして、処理を続行します。

異常時1

oj s -l python ...
[ERROR] Matched languages were not narrowed down to one.
[*] You have to choose:
Python2 (2.7.6)
Python3 (3.4.3)

Python2 (2.7.6)かPython3 (3.4.3)か絞れないので、どっちか選んでねとメッセージ出して処理をストップします。

異常時2

-l aaaa
[ERROR] language is unknown
[*] supported languages are:
3001 (Bash (GNU bash v4.3.11))
3002 (C (GCC 5.4.1))
...

そんなものはないぞ、ということで従来通りのエラーメッセージを出します。

どうでしょうか?

@fukatani
Copy link
Contributor Author

あまり関係ありませんが、自作の開発環境と連携させていただいております。便利に使わせてもらってます。
https://github.com/fukatani/rust-gui-debugger

@kmyk
Copy link
Member

kmyk commented Jul 29, 2018

ありがとうございます。あった方がよいと気付いてはいたがずっと放置されてた機能なのですごく助かります。

@kmyk kmyk merged commit 55b63ef into online-judge-tools:master Jul 29, 2018
@kmyk
Copy link
Member

kmyk commented Jul 29, 2018

PyPIの方に反映させておきました。 pip3 install -U online-judge-tools すれば更新されます。

@fukatani
Copy link
Contributor Author

素早い対応ありがとうございます!

@kmyk
Copy link
Member

kmyk commented Jul 30, 2018

修正のために足したつもりのcommitが反映されてなかったのと、その修正自体にも不備がありました。こんどこそちゃんと修正したので更新してください。
(主には内部の言語IDと言語名が別であることに起因するものでしたが、ドキュメント書いてなさすぎるのが悪いのでまったく私のミスです)

@fukatani
Copy link
Contributor Author

あーいえいえ、私のミスです。
(ドキュメントは私もほとんど書かない。。)

IDを返すつもりが、言語名を返してましたね。凡ミス。
テストしたはずなんですけど、、甘かったです。精進します。

早速の反映反映ありがとうございます。 😃

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

Successfully merging this pull request may close these issues.

2 participants