Code To Win - Concentrate on the problem, let the extension do the rest
Features
Parses Test Cases from Coding websites (codechef and codeforces, as of now, more coming soon).
Compile-Run against parsed test cases.
Auto verdict results upon running against parsed test cases such, as AC,WA,TLE,CPE,RTE,ILE.
If program output doesn't match with expected output, lines where the two outputs differ are shown in the result.
Add new test cases easily.
Provides interactive Compile-Run support.
Supports C/C++,JAVA and Python (for now, more coming soon).
Browser Independent. Does not depend on any browser extension, so you can use the browser of your choice.
Light weight.
Requirements
GNU Compiler for C/C++. (Support for other C/C++ compilers coming soon)
Any JAVA compiler of your desire.
Any version of python you desire.
Proper Enviorment Variable declaration for the above compilers.
You are free to use any browser of your choice, but for parsing purposes Chrome/Chromium must be installed (Firefox-Nightly also works but it bugs out sometimes, hence not recommended).
Extension Settings
This extension contributes the following settings:
Cpp Version: sets the chosen -std= flag while compiling .cpp files.
C Version : sets the chosen -std= flag while compiling .c
files.
Flags: For setting appropriate flags as you desire when you compile your file.
Path to Snippets Folder: A valid path to the directory containing your template files.
Broswer Path: A path to the location of your Chrome/Chromium/Firefox-Nightly executable/binary.
For Parsing Test Cases from contest website you need to have a working directory/workspace. You also need to provide path to your Chrome/Chromium/Firefox-Nightly executable/binary in extension settings :
Next, you have to select the command Code To Win:New Contest from Command Palette or by using keyboard shortcut (Default : Ctrl+N).
After entering the valid URL a dropdown appears from which you can select the langauge in which you want to write your code for the contest. If you dont see the language of your desire in the dropdown or want to do a mix of languages, select the Custom option.
Wait for a few seconds for the problems to get parsed. Once done, a prompt should appear indicating the process of parsing is complete.
To Compile & Run against parsed testcases, select the command Code To Win:Compile And Run Against Parsed Test Cases from Command Palette or by using keybord shortcut (Default : F5).
For Interactive Compile & Run, select the command Code To Win:Compile And Run (Interactive Input) from Command Palette or by using keybord shortcut (Default : F6).
To add a Custom New Test Case to a problem, select the command Code To Win: Add New Test Case from Command Palette or by using keybord shortcut (Default : Crtl+T).
To add custom template:
You need to create .txt files with names as languageID. For example for C++ template you need a define cpp.txt which contains your desired template.
Next, paste the path to the folder containing your templates
in Path to Snippets Folder setting in extension settings.
Now to Update/Add Template select the command Code To Win:Add New Test Case from Command Palette . Note: You need to select the command only once every time you add a new template or update an existing one.
Press !cp in a source file to paste the template matching that source file language ID.
Bug Reports
You can report bugs by creating issues.
Release Notes
1.0.0
Initial release of Code To Win Extension.
1.0.1
Fixed CodeChef Parser.
1.0.2
Fixed namespace problems.
Enjoy!Please share the extension to your friends !