Skip to main content

Codeforces CLI that makes writing contests more efficient.

Project description

Codeforces Toolbox

Status PyPI Version PyPI Last commit License PyPI

This tool is a CLI (Command Line Interface) that makes writing Codeforces contests more efficient.

Note: At the moment only C++ is supported.

Features

  • Create files based on the specified template. These files will be named appropriately for the contest, for example 1000A, 1000B1, 1000B2, 1000C.
  • Download sample test from Codeforces.
  • Compile solution and test it.
  • Submit solution and get the verdict.

Template, login, password, compilation command

cft config

Choose one of the following (type an integer):
  1. change the template file
  2. change username and password
  3. change password
  4. set compile command

then you can just type an integer (1-4) and change your template file, username, password or compile command.

Creating structure for a contest

cft race 1234 creates the following directory structure:

1234/
  1234A.cpp
  1234B.cpp
  1234C.cpp
  1234D.cpp
  1234E.cpp
  1234F.cpp
  1234G.cpp

files 1234X.cpp are created by copying the previously specified template file.

It is recommended that you then change the current working directory (cd 1234) to operate more smoothly later.

Testing solution

cft test 1234A compiles your solution, downloads (if not yet downloaded) example test and checks if it passes.

If your current working directory is some/path/1234 you can type just cft test A.

Test will be downloaded only if directories /in and /ans are empty or do not exist. You can force download test from Codeforces by using cft test A -d or cft test A --download.

Submitting solution

cft submit 1234A submits solution and returns judgement verdict.

If your current working directory is some/path/1234 you can type just cft submit A.

Installation

Please first install Python 3.7 or higher from python.org. During installation you should check the option 'Add Python to PATH'.

Then just copy and paste in your terminal

pip install codeforces-toolbox

Contribution & bugs

If you want to contribute to the project, fork this repository and open a new PR. If you have any questions or suggestions, email me (you can find my email address at my profile page) or create an issue.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codeforces-toolbox-1.1.0.tar.gz (8.4 kB view details)

Uploaded Source

File details

Details for the file codeforces-toolbox-1.1.0.tar.gz.

File metadata

  • Download URL: codeforces-toolbox-1.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for codeforces-toolbox-1.1.0.tar.gz
Algorithm Hash digest
SHA256 68829a9bbba25c23a8efe09cd829a622ee91a0d41d4d2a0ede117fda2c6d22be
MD5 bd806d8e3c3a6122251be15dac5d636d
BLAKE2b-256 a9bce22309508e6ec17b9ca6237c16a1ce840428fa0c006daec3668bbd299802

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page