Skip to content

Commit

Permalink
Bump version to 5.10.0 (#318)
Browse files Browse the repository at this point in the history
* Bump version to 5.10.0

* Formatting fixes.
  • Loading branch information
agrawal-d authored Feb 17, 2023
1 parent 857708b commit 9c26d94
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 111 deletions.
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ of popular platforms like Codeforces, Codechef, TopCoder etc.
in your browser.
1. Use Companion by pressing the green plus (+) circle from the browser toolbar
when visiting any problem page.
1. The file opens in VS Code with testcases preloaded. Press <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>B</kbd> to run
them.
1. The file opens in VS Code with testcases preloaded. Press
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>B</kbd> to run them.

- (Optional) Install the [cph-submit](https://github.com/agrawal-d/cph-submit)
browser extension to enable submitting directly on CodeForces.
- (Optional) Install submit client and config file from the
[Kattis help page](https://open.kattis.com/help/submit) after logging in.

You can also use this extension locally, just open any supported file and press
'Run Testcases' (or <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>B</kbd>) to manually enter testcases.
'Run Testcases' (or <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>B</kbd>) to manually
enter testcases.

[![See detailed user guide](https://img.shields.io/badge/-Read%20detailed%20usage%20guide-blue?style=for-the-badge)](docs/user-guide.md)

Expand All @@ -56,22 +57,30 @@ You can also use this extension locally, just open any supported file and press

## Contributing

**CPH is in a steady-state.** There are no new features planned for the extension. Only bug-fixes will be worked on.
**CPH is in a steady-state.** There are no new features planned for the
extension. Only bug-fixes will be worked on.

You can contribute to this extension in many ways:

- File bug reports by creating issues.
- Develop this extension further - see [developer guide](docs/dev-guide.md).
- Spreading the word about this extension.

**Before creating a Pull Request, please create an issue to discuss the approach. It makes reviewing and accepting the PR much easier.**
**Before creating a Pull Request, please create an issue to discuss the
approach. It makes reviewing and accepting the PR much easier.**

## License

Copyright (C) 2021 Divyanshu Agrawal

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
You should have received a copy of the GNU General Public License along with
this program. If not, see https://www.gnu.org/licenses/.
5 changes: 3 additions & 2 deletions docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ user-facingterms.
The extension runs in a Node.JS context with the
[VS Code API](https://code.visualstudio.com/api/references/vscode-api). The
extension shows the results in a web-view (code in `src/webview`). It
communicates to-and-from the extension by posting messages. See the [webview API](https://code.visualstudio.com/api/extension-guides/webview) for details.
The webview is currently a React App.
communicates to-and-from the extension by posting messages. See the
[webview API](https://code.visualstudio.com/api/extension-guides/webview) for
details. The webview is currently a React App.

It compiles and runs code by spawning binaries, and pipes input to STDIN and
compares each line of STDOUT with expected output to judge results.
Expand Down
206 changes: 120 additions & 86 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,99 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="icon.png" type="image/x-icon" />
<title>Competitive Programming Helper (CPH) - VS Code extension</title>
<meta
name="description"
content="Visual Sudio Code extension that extension allows you to quickly compile, run and judge competitive programming problems from within the IDE. You can automatically download testcases write & test your own problems. Once you are done, you can submit your solutions directly with the click of a button."
/>
<title>Document</title>
<style>
* {
box-sizing: border-box;
}

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="icon.png" type="image/x-icon">
<title>Competitive Programming Helper (CPH) - VS Code extension</title>
<meta name="description"
content="Visual Sudio Code extension that extension allows you to quickly compile, run and judge competitive programming problems from within the IDE. You can automatically download testcases write & test your own problems. Once you are done, you can submit your solutions directly with the click of a button.">
<title>Document</title>
<style>
* {
box-sizing: border-box;
}

body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: 8px;
background-color: rgb(252, 248, 238);
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol';
margin: 8px;
background-color: rgb(252, 248, 238);
}

.main {
width: 900px;
max-width: 100%;
margin: 0 auto;
margin-top: 100px;
box-sizing: border-box;
}
.main {
width: 900px;
max-width: 100%;
margin: 0 auto;
margin-top: 100px;
box-sizing: border-box;
}

.main-ss {
max-width: 90%;
display: block;
margin: 0 auto;
}
.main-ss {
max-width: 90%;
display: block;
margin: 0 auto;
}

hr {
border: 0px;
border-top: 1px solid rgb(190, 190, 190);
}
hr {
border: 0px;
border-top: 1px solid rgb(190, 190, 190);
}

button {
padding: 10px 30px;
}
button {
padding: 10px 30px;
}

.text-center {
text-align: center;
}
.text-center {
text-align: center;
}

@media (max-width:920px) {
.main {
margin-top: 0px;
@media (max-width: 920px) {
.main {
margin-top: 0px;
}
}
}
</style>
</head>
</style>
</head>

<body>
<div class="main">
<div class="text-center">
<h1>Competetive Programming Helper</h1>
<p>CPH is a <b>Visual Studio Code</b> extension that extension allows you to quickly compile, run and judge
competitive
programming problems from within the IDE. You can automatically download testcases write & test your own
problems. Once you are done, you can submit your solutions directly with the click of a button!</p>
<img src="screenshots/screenshot-main.png" alt="CPH Screenshot" class="main-ss">
<br />
<a
href="https://marketplace.visualstudio.com/items?itemName=DivyanshuAgrawal.competitive-programming-helper">
<button>Install Extension</button></a>
<a href="https://github.com/agrawal-d/cph"><button>Learn more</button></a>
<body>
<div class="main">
<div class="text-center">
<h1>Competetive Programming Helper</h1>
<p>
CPH is a <b>Visual Studio Code</b> extension that extension
allows you to quickly compile, run and judge competitive
programming problems from within the IDE. You can
automatically download testcases write & test your own
problems. Once you are done, you can submit your solutions
directly with the click of a button!
</p>
<img
src="screenshots/screenshot-main.png"
alt="CPH Screenshot"
class="main-ss"
/>
<br />
<a
href="https://marketplace.visualstudio.com/items?itemName=DivyanshuAgrawal.competitive-programming-helper"
>
<button>Install Extension</button></a
>
<a href="https://github.com/agrawal-d/cph"
><button>Learn more</button></a
>
</div>
<h2>Features</h2>
<ul>
<li>
Autmatic compilation with display for compilation errors.
</li>
<li>
Intelligent judge with support for signals, time outs and
run time errors.
</li>
<li>Works with Competitive Companion.</li>
<li>
<a href="https://github.com/agrawal-d/cph-submit"
>Codeforces auto-submit</a
>
integration.
</li>
<li>
<a
href="https://github.com/agrawal-d/cph/blob/main/docs/user-guide.md"
>Kattis auto-submit</a
>
integration.
</li>
<li>Works locally for your own problems.</li>
<li>Support for several languages.</li>
</ul>
<h2>Documentation</h2>
<p>
You can learn more about how you can use CPH
<a href="https://github.com/agrawal-d/cph#quick-start">here</a>.
</p>
<h2>License</h2>
<p>
CPH is free software. It software is licensed under GPL Version
3 or later ( at your choice ). You can access the source code
<a href="https://github.com/agrawal-d/cph">here</a>.
</p>
<hr />
<small
>Created by
<a href="https://github.com/agrawal-d">agrawal-d</a></small
>
</div>
<h2>Features</h2>
<ul>
<li>Autmatic compilation with display for compilation errors.</li>
<li>Intelligent judge with support for signals, time outs and run time errors.</li>
<li>Works with Competitive Companion.</li>
<li><a href="https://github.com/agrawal-d/cph-submit">Codeforces auto-submit</a>
integration.</li>
<li><a href="https://github.com/agrawal-d/cph/blob/main/docs/user-guide.md">Kattis auto-submit</a>
integration.</li>
<li>Works locally for your own problems.</li>
<li>Support for several languages.</li>
</ul>
<h2>Documentation</h2>
<p>You can learn more about how you can use CPH <a href="https://github.com/agrawal-d/cph#quick-start">here</a>.
</p>
<h2>License</h2>
<p>
CPH is free software. It software is licensed under GPL Version 3 or later ( at your choice ). You can
access the source code <a href="https://github.com/agrawal-d/cph">here</a>.
</p>
<hr>
<small>Created by <a href="https://github.com/agrawal-d">agrawal-d</a></small>
</div>
</body>

</body>
</html>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-3.0-or-later",
"icon": "icon.png",
"publisher": "DivyanshuAgrawal",
"version": "5.9.2",
"version": "5.10.0",
"engines": {
"vscode": "^1.52.0"
},
Expand Down Expand Up @@ -298,4 +298,4 @@
"type": "git",
"url": "https://github.com/agrawal-d/competitive-programming-helper/"
}
}
}
1 change: 0 additions & 1 deletion src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,3 @@ export const compileFile = async (srcPath: string): Promise<boolean> => {
});
return result;
};

1 change: 0 additions & 1 deletion src/executions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,3 @@ export const killRunning = () => {
console.log('Killling binaries');
runningBinaries.forEach((process) => process.kill());
};

20 changes: 9 additions & 11 deletions src/webview/frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<!DOCTYPE html lang="EN">
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="app.css" />
</head>

<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="app.css">
</head>

<body>
<div id="app"></div>
<script src="frontend.module.js"></script>
</body>

</html>
<body>
<div id="app"></div>
<script src="frontend.module.js"></script>
</body>
</html>

0 comments on commit 9c26d94

Please sign in to comment.