Reminder: in case of any technical issues, you can use the lightweight website m1.codeforces.com, m2.codeforces.com, m3.codeforces.com. ×

salil03's blog

By salil03, history, 9 months ago, In English,

GetCode

This is an Sublime Text 3 plugin which:

  1. Takes the URL of a problem such as https://www.codechef.com/problems/INVLIS.
  2. Parses the URL and get the problem code(In this case it is INVLIS).
  3. Creates 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

»
9 months 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?

  • »
    »
    9 months 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

»
9 months 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

  • »
    »
    9 months 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

»
9 months 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.

  • »
    »
    9 months 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

  • »
    »
    9 months 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

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

Auto comment: topic has been updated by salil03 (previous revision, new revision, compare).

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

So, it basically helps to rename and store the codes?

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

    It helps to create new files quickly which is important in a contest. The new file also has correct name(problem id) and a pre-defined code template

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

      thanks, that completely explains the matter.