Knight is a command line utility for doing basic CodeChef operations like problem submission, history, etc directly from the terminal. Trust me it helps 😀
Parameters & Usage
usage: knight [-h] [-n] [-l] [--select-contest contest_code] [--reset-contest] [-s problem_code solution_location] [--history problem_code] [-u] [--config] [--logout]
-h or --help- Displays the standard help on usage and parameters-n or --nologin- Performs certain operations that don't require you to log in (currently only-l or --list-contests)--select-contest <contest_code>- Change the contest to the current ongoingcontest_code--reset-contest- Change the contest to PRACTISE mode-s <problem code> <solution file> or --submit <problem code> <solution file>- Submit your solution file to the specified problem code. Change the contest to submit to an ongoing contest.--history <problem code>- Display your submission history for that problem in a prettier tabular format. Change the contest to submit to an ongoing contest-u or --user- Display the currently configured user on Knight.--config- Set another username and password for logging into Codechef.--logout- Logs out the configured user on Codechef (if logged in)
Note: Knight uses sessions so your previous login session is saved for later use.
Installation
- Linux & Unix systems -
$ pip install knight --upgrade - Windows -
pip install knight --upgrade
For Windows users, you need to add installation directory to PATH. At the end of the installation, you'll be notified by a warning with a location/directory. Copy that location and add it to system's PATH variable.
Requirements
- Python 3.x
Issues
In case of some error or exceptions, please find the log files under HOME_DIR/.knight/logs/ and submit an issue on Github with the logs.
It will really be of great help improving the user experience.
How to Contribute
-
Fork the repo.
-
Clone the repo
https://github.com/<your username>/knight.gitto empty directory.mkdir knight cd knight git clone https://github.com/<your username>/knight.git -
Create a new branch for your changes.
git branch my_branch git checkout my_branch -
Commit your changes and Submit Pull Request to
masterbranch of parent project with description and comments
Testing
Run the knight.py file with requried parameters and arguments that work on your changes.
[Inside project root]
python3 knight/knight.py <appropriate args>
Metadata
Release files for knight 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| knight-1.1.2.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| knight-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / knight-1.1.2.tar.gz
| Download URL | knight-1.1.2.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
311c6c5616faa57e5d3eddbdc5e489bc3f22e21eb01b9c18046d0db6bacbee69
|
|
BLAKE2b-256 checksum How to use checksums |
eac4bf6561d90970ed9078fe8606d73a79d9301c3059ac253fc30e10980f70d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Release files / knight-1.1.2-py3-none-any.whl
| Download URL | knight-1.1.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60cae99668ffd692bf976a412ed19d6a9dd0d3023557584a4eb6798bf77663bc
|
|
BLAKE2b-256 checksum How to use checksums |
42d186575004654c917278b5134293105bf1bbfa9bd96df39e220e0bdcb92cb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|