salil03's blog

By salil03, history, 5 weeks ago, In English,

GetCode

This is an ST3 plugin which:

  1. Take the URL of a problem such as https://www.codechef.com/problems/INVLIS.
  2. Parse the URL and get the problem code(In this case it is INVLIS).
  3. Create a new .cpp or .py file with a pre-determined template(cpp.snippets which is customized via settings).

Keyboard shortcuts

For all Operating Systems, ctrl+alt+x opens a new dialogue box which takes the problem url as user input

How to install

  1. Install Package Control from here
  2. In Sublime, Open Package Control

Open Package Control from the Preferences Menu

  1. Select Package Control: Install Packages

enter image description here

  1. Now you should be able to search for and install the GetCode Package.

How to use it

After installing, it is necessary to configure the settings(setting the default directory and snippets).

After configuring the settings, ctrl+alt+x opens a new dialogue box which takes the problem url as user input

Supported websites(for now)

  1. Codechef
  2. Codeforces
  3. SPOJ
  4. Virtual Judge
 
 
 
 
  • Vote: I like it  
  • +10
  • Vote: I do not like it  

»
5 weeks ago, # |
  Vote: I like it +11 Vote: I do not like it

Can you please elaborate on how it exactly works and what it does?

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    It takes the problem url and then creates a new cpp file in the specified directory with a template cpp.snippets file. Basically, it is a parser. It helps in quickly creating new files and naming them correctly. You can use ctrl+alt+x to open the url dialog. It can parse url from codechef, codeforces, spoj and virtual judge

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

Can it help in submission ,as in once code is complete ,I can submit directly

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No it can't. I have been trying to do that but couldn't find API to submit code

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

Maybe you could also add a test case parser? That would be very useful.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    That is in the pipeline. But I am busy right now so I could do it in a month or two

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Do you have any good API in mind for codeforces or codechef or should I just use beautifulsoup for parsing