Package: coolkit
CoolKitCoolKitisCoding + ToolKit, A command-line tool used to automate your programming experience.InstallationInstall using pipUse pip to install, user--userflagsudo python3 -m pip install coolkitBuild from SourceClone the repository and checkout to stable commitgit clone https://github.com/srbcheema1/CoolKit
cd CoolKit
git checkout <latest_version say: v0.0.x>install requirementspython3 -m pip install --user -r requirements.txtInstall CoolKitpython3 setup.py install --userVerify installationcheck for workingcoolkit --helpif it displays help message you are ready to go.troubleshootingIn casecoolkit -his not working, ensure that binary path is in PATH.
Add lineexport PATH=$PATH:"~/.local/bin"in your~/.bashrcor~/.zshrc.bash users run these commandsecho export PATH="$PATH":"~/.local/bin" >> ~/.bashrc
source ~/.bashrczsh users run these commandsecho export PATH="$PATH":"~/.local/bin" >> ~/.zshrc
source ~/.zshrcMake it more smartHighly Recommended to use this feature to harness the full potential of coolkityou can make your coolkit to autodetect yourcontestandproblemfrom your nomenclature of files and directories.to do so you will need to redefineget_contest_nameandget_problem_namein~/.config/coolkit/global_config.py.you may define your own functions or use pre-build functions by uncommenting these lines:# return srb_contest_name(folder)
# return srb_problem_name(file_name)feel free to ping me onsrbcheema2@gmail.comto make aglobal_config.pyfile for you as per your nomenclature.Usagesrb@srb-pc:$ coolkit --help
usage: Coolkit [-h] [-v] {init,set,run,submit,fetch,config,view} ...

positional arguments:
  {init,set,run,submit,fetch,config,view}

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         display version numbersuboptions are:
    init        initilize a directory as coolkit directory
    set         set value of coolkit variables.
    config      set config values like username, password.
    fetch       fetch a contest to use it for offline testing.
    run         run a code file against provided testcases
    submit      submit a code to online judge. and output the verdict.
    view        view a user, contest, problem, friends-standings or upcoming contestFor more help regarding suboptions run:

coolkit init -h
coolkit set -h
coolkit config -h
coolkit fetch -h
coolkit run -h
coolkit submit -h
coolkit view -hSupported sitescodeforcesExamplesinitinit an empty repositorysrb@srb-pc:$ coolkit initsetset value of coolkit-variables for contest, prob, site, contest-typesrb@srb-pc:$ coolkit set -c 535
srb@srb-pc:$ coolkit set -p A
srb@srb-pc:$ coolkit set -t gymconfigset value of global configuration variables like username, passwordsrb@srb-pc:$ coolkit config --user srbcheema1
srb@srb-pc:$ coolkit config --pswd I_wont_write_it_here_xDfetchfetch a contest, if you are standing in a coolkit folder then by default it will fetch a contest configured in that folder unless you provide using-coption. outside a coolkit repo it is necessary to provide contest name using-csrb@srb-pc:$ coolkit fetch
srb@srb-pc:$ coolkit fetch -c 1025runrun a problem against sample test cases. you can provide problem name using-poption, if you dont provide a problem name it will try to automatically detect the problem name using rules specified in~/.config/coolkit/global_config.py.you can modify this file as you want.
if it is unable to detect file name then it will try to remember last problem you ran and run the test cases against it.srb@srb-pc:$ coolkit run one.cpp
Prob name not provided, trying to detect from filename
running one.cpp file for A prob on 837
srb@srb-pc:$ coolkit run soln.cpp
Prob name not provided, trying to detect from filename
Unable to detect prob name from file nameThere is a cool new feature: you may add your own custom input/outputs to test against binary during run command. just add these to files to your present working directoryInput.txtandOutput.txtcontaining input and output respectively.submitSubmit a file on online judge and show you report through desktop notification.it wont submit a file if it fails on local sample test cases. Still if you want to submit a file use-fflagsrb@srb-pc:$ coolkit submit one.cpp
srb@srb-pc:$ coolkit submit one.cpp -p A
srb@srb-pc:$ coolkit submit one.cpp -p A -fviewsrb@srb-pc:$ coolkit view user srbcheema1
srb@srb-pc:$ coolkit view prob A
srb@srb-pc:$ coolkit view contest 535
srb@srb-pc:$ coolkit view upcoming
srb@srb-pc:$ coolkit view friends
srb@srb-pc:$ coolkit view standingsDemo for a contestSimilar ToolsIt is worth it to mention few other tools that I was using from a year or so. I have really loved those tools and also used some of their modules/functions in this tool. Those tools areSpojPi,AceditandIdne.NoteCoolkit is smart enough to detect a directory is coolkit repo or not. it automatically initilizes a directory as a coolkit directory in case it is not. Still I have providedinitoption. Its main purpose is to initilize a coolkit directory inside another coolkit directory. by default it will copy parent configurations for once which you can change lateron.Coolkit is smart enough to detect your program name from your filename. Have a look atget_problem_nameinglobal_config.pyfile. you can suggest imporvements in that function.Coolkit is smart enough to detect your contest name from your directory name. Have a look atget_contest_nameinglobal_config.pyfile. you can suggest imporvements in that function.To suggest me improvements you can open an issue, make an PR, mail me or contact me on links provided below. I am working to provide a flexible way for users to modify their own way of detection.In case of any bug/issue, Please report this tosrbcheema2@gmail.com. Or, even better, submit a PR to fix it!Contact / Social MediaDeveloped byDeveloper / Author:Srb Cheema