The Codeforces Tool (cftool) is a command-line utility designed to streamline various interactions with the Codeforces platform. Whether you want to submit code, check your recent submission status, view upcoming contests, or manage credentials, cftool provides a simple and efficient way to navigate Codeforces functionalities. Please make sure to read the Getting Started section below.
- Installation
- Usage
- Options
- File Structure
- Getting Started
- Future Targets
- Technologies Used
- Acknowledgements
- License
-
Download the Project: Clone the repository to your local machine using the following command:
git clone https://github.com/regular-life/Codeforces-CLI-Tool
OR Download the .zip file from cftool GitHub Repository.
-
Navigate to Project Directory: Open a terminal and navigate to
Codeforces-CLI-Tool
directory. -
Run Installation Script: Run the installation script to do the initial setup and installtion of dependencies:
make install-venv-setup # if you wish to use virtualenv (will be named .env) setup make install # if you do not wish to use virtualenv
-
Open another terminal and start working :)
You can run cftool with various options to perform specific tasks:
cftool [--'option']
- --submit: Run cftool for submitting your code.
- --status: Display the most recent submission status and details.
- --contests: Display upcoming contests on CodeForces along with the countdown.
- --my-stats: Display statistics such as your rating, the number of problems you've solved, and a comparison of problems solved versus rating for your ID.
- --my-contests: View information related to the five most recent contests and your performance in these contests.
- --credentials: Manage cftool credentials.
- --config: View and make changes to the configuration settings for cftool.
- --blogs: View the most recent blogs from Codeforces.
- --help: Display this help message.
project-root/
|-- .env # Virtual environment files (if you opt to use virtualenv)
|-- classes/ # Directory containing classes
| |-- CF_Submit.py
|-- config/ # Configuration files
| |-- config_interpreter.py
| |-- config.yml
|-- options/ # Directory containing scripts for different options
| |-- getBlogs.py
| |-- getContests.py
| |-- getMyContests.py
| |-- getMyStats.py
| |-- getSubmissionStatusDetails.py
| |-- Submit.py
| |-- help.txt # Usage instructions
|-- scripts/ # Directory containing .sh scripts related to the project
| |-- install.sh
| |-- install-venv-setup.sh
|-- secrets/ # Directory for storing sensitive information
| |-- credentials.json
|-- utils/ # Directory containing utility scripts
| |-- compilerToCode.py
| |-- credentials.py
| |-- encrypt.py
| |-- getCompiler.py
| |-- getQuestionID.py
|-- cftool # Main script (shell script)
|-- LICENSE # GNU GPL License
|-- Makefile # Makefile for installation
|-- README.md # Readme of the project
|-- requirements.txt # File containing the names and versions of all the packages involved. (TIP: you can just do "pip install requirements.txt"
-
Ensure that you have the required packages installed and add the project directory to your
PATH
using the provided installation script. -
Please read and make necessary changes in
config/config.yml
. Additionally, check and defineYOUR_TERMINAL_RC_FILE
inscripts/install.sh
andscripts/install-venv-setup.sh
. -
Although
encrypt.py
is currently unused, it will be implemented soon. Or maybe some other encryption format (I need to search for something like this). -
This project has been developed and tested on Arch Linux. While efforts have been made to ensure compatibility with different operating systems, flawless performance on all platforms is not guaranteed.
-
Run
cftool
with the desired options to interact with Codeforces effortlessly.
We are actively working on improving cftool. Future features may include:
- Problem recommender system.
- Support for additional online judges.
- Option for password reset.
- Encryption-Decryption of username and password.
- Password reset option.
- Python
- Bash
- Selenium for Web Scraping
- HTTPS Requests to CodeForces API
- YAML for config
I would like to thank the Codeforces platform and the developer community.
Feel free to contribute, report issues, or suggest new features. Happy coding!
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
When distributing this software, you must provide the source code and comply with the terms of the GPL license. If you make modifications to the code, document those changes.
For more details, please refer to the full text of the GPL license.