searleser97's blog

By searleser97, 23 months ago, In English

cpbooster

Hey Codeforces,

I wanted to share with you my latest project: cpbooster which stands for "Competitive Programming Booster". It is a cross-platform CLI tool designed to boost competitive programmer's speed during contests by automating various routine tasks like testing, debugging, cloning test cases, etc. The console command suits any coding environment (i.e. VSCode, Jetbrains IDEs, Vim, NeoVim, Emacs, Geany, Sublime Text, ...) and it’s very easy to use. Vim users can install cpbooster.vim plugin to boost their speed even more. I hope you like it!!.

Visit the official website for installation and setup instructions.

https://searleser97.github.io/cpbooster/

Don't forget to give it a star in github if you like it :D https://github.com/searleser97/cpbooster

Using NeoVim:

Features

  1. cpbooster comes with a short alias command called cpb to avoid writing the long command each time
  2. Automatically clone sample test cases files with corresponding source code files with template loaded into the desired directory
  3. Test your code against sample test cases quickly. Supported Results:
    • AC (Accepted)
    • WA (Wrong Answer) Shows differences between accepted output and your output beautifully
    • TLE (Time Limit Exceeded)
    • RTE (Runtime Error)
    • CE (Compilation Error)
  4. Run code with your own debugging flags easily

  5. Submit your code from the terminal really quickly. (Several Online Judges can be supported)
  6. open your preferred editor in the contest directory immediately after cloning it. See Editors
  7. Create one or multiple source files with the corresponding template loaded

  8. Vim plugin cpbooster.vim boosts your speed even more

  9. Flat File Structure. See Why Flat File Structure

Please submit bugs right in the github site for cpbooster: https://github.com/searleser97/cpbooster/issues

 
 
 
 
  • Vote: I like it
  • +60
  • Vote: I do not like it

»
23 months ago, # |
  Vote: I like it 0 Vote: I do not like it

+1000 :v

»
23 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It now supports python

»
23 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Perfect stuff!...

»
23 months ago, # |
  Vote: I like it 0 Vote: I do not like it

:Create Command added

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

:Rtest & :Rdebug vim commands added.

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

TLE veredict added + total score summary + bug fixes

»
18 months ago, # |
Rev. 7   Vote: I like it 0 Vote: I do not like it

Mac terminal is now fully supported. Run npm i -g cpbooster to update

»
16 months ago, # |
  Vote: I like it 0 Vote: I do not like it

VIM plugin now adds a new window to visualize the output. In this way we can see both the output and the code at the same time.

»
16 months ago, # |
  Vote: I like it 0 Vote: I do not like it

You can now create multiple files with create command if a sequence is given as file name.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Supported terminals can close the current terminal, leaving just one terminal open instead of two after cloning a contest

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Amazing Work, Buddy! Just Curious, Which OS you are using (in Tutorial GIF)

»
14 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Checkout the new website and give it a star in github if you like it :D https://searleser97.github.io/cpbooster/

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

cpbooster can now use your default browser to open the status page after submitting a problem

take a look at the new option here: https://searleser97.github.io/cpbooster/docs/configuration#useuserdefaultbrowser-boolean

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

adding test cases from vim plugin is easier now since we can use buffers to edit .in and .ans files instead of terminal stdin

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to use it inside or with VSCode ? Can you guide me in an elaborative way? through node.js command prompt it is working fine but inside VS code no!

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks for such a helpful blog!

»
9 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Support for a great variety of compiled and interpreted languages has been added :D like: go, rust, javascript, ruby, ...

»
9 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Right now when I try to do "cpb clone", A_Name.cpp file gets created instead of A.Name.cpp. How can I change this? Also, How can I change the language for submission? I want to change it from C++17 to C++17(64).

»
8 months ago, # |
  Vote: I like it +3 Vote: I do not like it

You can now see the test case input while testing and clone test cases into you current directory instead of the "contests directory", both are opt-in features in v2.6.0

»
8 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

Actually, it is an excellent program!! And it could be used for many other interesting things (like a Local Judge or an automatic unit tester for software development). However, nothing is perfect, and I have some suggestion to make the tool better:

-Create a configuration assistant (no GUI needed, a CLI one is enough)

-Clarify better how to create the config file in the documentation, specifically stating that the user must create the folder and where to do it.

-Shorten problem names in the source files for improving speed in live contests. For example, instead of "AWatermelon.cpp" it'd be much better to have "A.cpp" as the name.

-Make other optimizations to make it better for live contests.

Hope it helps, and a big psychological hug from Chile :-)

  • »
    »
    8 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    thanks for your comment :), I'll appreciate it if you submit a "feature request" on cpbooster's github (one for each of your requests). This will help me not to forget about them. Codeforces does not notify me about new comments or messages so I'll prefer it in github, thanks.

    on the other hand, I think I will add the feature to shorten the name of the source files as an opt-in feature (i.e. it will be an option in the configuration file). It will use the first letter from the name of the problem returned by "competitive companion plugin". (note that is not guaranteed that all the judges or problems will have the format: Asomething, Bsomething, Csomething, etc. (i.e. the first problem of a contest might not start with A or the second one might not start with B. If such thing happens then the complete names will be used)

    About what you said about "...the user must create the folder..." could you elaborate? the user does not have to create any folder for the "cpbooster-config.json" file, it gets automatically created in your $HOME directory (unix: "/home/username/", windows: "C://Users/username/"), I guess probably you meant the "contests directory" which has to be created by the user, otherwise, it won't work, and I am actually not sure, what error it throws I think I am not handling such error at the moment XD

    Finally, I invite you to contribute to cpbooster by submitting all the Pull Requests you wish.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey.

Thanks for great tool. For some reason specifying url after filePath does not work for me

$ cpb s main/src/main.rs "https://codeforces.com/contest/1616/problem/H"

Submit a source code file as a solution to a problem in an Online Judge     
(i.e. Codeforces, AtCoder, ...).

Usage: index.js submit <filePath> [url]

Options:
  --version, -v  Show version number                               [boolean]
  --help, -h     Show help                                         [boolean]
  --configPath   Path to JSON configuration file
                 [default: "C:\Users\egor\cpbooster-config.json"]   [string]

Unknown argument: https://codeforces.com/contest/1616/problem/H

At the same time comment in code does work

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Interesting, does this error is still happening? Could you submit an issue in Github please?