git-contest is the Git Extension for online judges (Codeforces, etc...)
Currently support the following online judges:
- Codeforces
- Aizu Online Judge
- UVa Online Judge
- Kattis
In this command, a commit having a judge status will be automatically created after submitting a solution to a online judge:
Cxdeforces 999A: Accepted
Cxdeforces 999B: Wrong Answer
- Also you can customize commit message
Installation process takes a step, type a following command:
$ gem install git-contest
Need to install:
There are 4 basic sub-commands:
Initialize a git repository.
$ git contest init
Start a contest branch.
$ git contest start <contest-branch> [based-branch]
After this command, <contest-branch>
is created based on <based-branch>
.
Example:
$ git contest start cxdeforces_round_123
-> the branch `cxdeforces_round_123` is created
Finish a contest branch.
$ git contest finish <contest-branch>
After this command, <contest-branch>
is merged into <based-branch>
, and then removed.
Example:
$ git contest finish cxdeforces_round_123
-> the branch `cxdeforces_round_123` is merged and closed
Submit a solution to the online judge.
$ git contest submit <site>
Example:
$ git contest submit cxdeforces -c 123 -p A
-> submit a solution to cxdeforces 123A
Type: String
Set problem-id, this option is used almost all sites.
$ git contest submit site -p 10000
Type: String
Set contest-id, this option is used codeforces.
$ git contest submit site -c 123
Type: String
, Default: main.*
Set submitting code's filename.
$ git contest submit site -s source.cpp
Type: String
Set submitting code's programming language.
$ git contest submit site -s source.cxx -l C++
When do not set this option, git-contest will resolve language from source filename. (aaa.cpp
-> C++
)
Use --help option as belows:
Example 1:
$ git contest --help
Example 2:
$ git contest <sub-command> ... --help
Type: String
, Default: ~/.git-contest
Set a path of git-contest home directory having a config file and plugins.
Type: String
, Default: ${GIT_CONTEST_HOME}/config.yml
Set a path of git-contest config file.
Write the information of online judges and git-contest settings to this file.
The site name can be set as you want.
sites:
codeforces:
driver: codeforces
user: your_codeforces_id
password: your_codeforces_password
multi_account_aoj_1:
driver: aizu_online_judge
user: your_aoj_id_1
password: your_aoj_password_1
multi_account_aoj_2:
driver: aizu_online_judge
user: your_aoj_id_2
password: your_aoj_password_2
uva:
driver: uva_online_judge
user: your_uva_id
password: your_uva_password
kattis:
driver: kattis
user: your_kattis_id
password: your_kattis_password
Available drivers:
- codeforces
- aizu_online_judge
- uva_online_judge
- kattis
You can write driver plugin on ${GIT_CONTEST_HOME}/plugins/driver_***.rb
to be written here.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Hiroyuki Sano
- Created git-contest
- Oskar Sundström
- Added Kattis Driver
- Wei Jianwen
- Fixed gem dependency
- takuti
- Fixed for python support in AOJ Driver
git-contest is licensed under the MIT-License, see details followings:
The MIT License (MIT)
Copyright (c) 2013-2014 Hiroyuki Sano <sh19910711 at gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
git-contest
is inspired by nvie/gitflow.
- A successful Git branching model
- nvie/gitflow
- ruby
- git