Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

### epsilon_573's blog

By epsilon_573, history, 10 months ago,

I made a Test Case Parser and it can parse test cases for your problem in just one keystroke.

Update : Contest Parser was also added

### How to Setup :

Video Walkthrough just explains parsing test cases for a single problem. Contest Parser was added later.

• Install all the required dependencies.
• Clone the github repo
• Place the build file in Packages->User
• Place automate.py and contest.py in the same folder as your main cpp solution file
• In the latest version you don't need to rename anything, it will generate test cases with the same name as your working file

#### Parsing single problem :

• Open your cpp solution file ( must be in the same directory as automate and contest.py )
• Open the problem page on Chrome ( only works on chrome )
• Open sublime text and build using automate build system ( Ctrl + Shift + B)
• This plugin will create a test file with the same name as your solution file
• Now just run your solution using FastOlympicCoding

#### Parsing a complete contest :

• Create a template.cpp file ( must be in the same directory as automate and contest.py ) .
• This file will be copied to all solution files when parsing the contest
• Open any cpp file in the same directory ( preferably template.cpp )
• Open the contest page on Chrome ( only works on chrome )
• Open sublime text and build using automate-contest build system ( Ctrl + Shift + B)
• This plugin will create a directory with the contest ID and it will contain cpp files for all problems with template copied into them and corresponding test files will be parsed with them.
• Just open them and start solving.
• Now just run your solution using FastOlympicCoding

### Dependencies :

• Install Python3.
• pip install bs4
• pip install pywinauto

You can support me on my Youtube Channel here : GGxEpsilon

Support for more platforms like CodeChef and Atcoder will be added soon.

Thanks for reading and feedback will be appreciated.

• +32

 » 10 months ago, # |   0 Awesome!!
 » 10 months ago, # |   0 That looks great. Also check out this one too, I used to use this when I was still using Sublime Text.
 » 10 months ago, # |   +1 This is really awesome !!Feature Request: Can you make such an automation where 5 or 6 cpp files are automatically generated with same name/code as the problem itself and test cases associated with each problem are linked to thpse particular cpp files. I know about such an extension but it's for VS Code. I was wondering if it would be possible for sublime text as well.
•  » » 10 months ago, # ^ |   +2 Nice suggestion. Will implement it in a few days.
 » 10 months ago, # | ← Rev. 2 →   0 Contest Parser was Added epsilon_573 (previous revision, new revision, compare).
 » 10 months ago, # |   0 This seems a good add on .. One little doubt here .. Does it only support codeforces or all of the other platforms too ?
•  » » 10 months ago, # ^ |   0 Only CodeForces for know, I just made it in two days. I will soon optimize this a little and add support for other platforms if this gets a good response.
•  » » » 10 months ago, # ^ |   0 Sure bud .. I would be definately looking for this feature to be added in near future .. Also I think adding such features would also attract more public towards this plugin.
 » 9 months ago, # |   0 Thanks for the extension man. Waiting for multiplatform support.
 » 9 months ago, # |   0 It would be great if the contest parser was also available for Firefox.
 » 9 months ago, # |   0 Can we merge ctrl+b and ctrl+alt+b step i mean just run using fastOlympicCoding and it parse testcase or firstly building is necessary?
•  » » 8 months ago, # ^ |   0 I don't recommend doing that because then it will parse test cases every time you build and this would make the process slow. So just parse test cases once when you start reading the problem.
 » 2 months ago, # |   0 I can't get this extension to run on Linux(Manjaro) and I assume that is because it is using pywinauto. epsilon_573 Can you please guide me how to modify it to work for linux as well.
•  » » 2 months ago, # ^ |   0 You will have to use python-ldtp or some other plugin that helps you fetch chrome URL. Unfortunately I don't primarily work on Linux, so you will have to figure it out on your own. Add me on discord (Epsilon#0765) though, and I will try to aid you. Many people have been requesting me to make this for Linux.
•  » » » 2 months ago, # ^ |   0 For now I have figured out a weak work around only for test automator and not for contest automator. I used pyautogui and am literally switching windows and fetching the url using keyboard commands. It is working while sublime and browser are top two priority windows (and works with all browsers). I will paste in the code for reference import pyperclip import pyautogui pyautogui.hotkey('alt', 'tab') pyautogui.press('f6') pyautogui.hotkey('ctrl', 'c') url = pyperclip.paste() pyautogui.hotkey('alt', 'tab') I removed your url computing part and used this instead. Rest all is same.
 » 2 months ago, # |   0 that's one great thing! one more reason to keep using it