CodeSync is a simple and fast Chrome extension that automatically syncs your CodeChef solution to Github upon a successful submission. It captures the problem details, your submitted code, and performance metrics, then uploads them to GitHub.
- Automatically detects when you submit a solution on CodeChef
- Extracts problem statement, difficulty, and your solution details
- Creates a README.md file for each problem with problem details
- Uploads your solution code to a specified GitHub repository
- Provides status updates within the CodeChef interface
The extension consists of two main files:
manifest.json
: The extension's configuration filecontent.js
: The main script that runs on CodeChef pages
- Clone this repository or download the files.
- Open Chrome and go to
chrome://extensions/
. - Enable "Developer mode" in the top right corner.
- Click "Load unpacked" and select the directory containing these files.
- The extension should now be active in your Chrome browser.
Before using the extension, you need to set up a few things:
- Create a GitHub personal access token with repo scope.
- In the
content.js
file, replace the placeholder values for:GITHUB_API_TOKEN
GITHUB_REPO_OWNER
GITHUB_REPO_NAME
- Check if the CodeSync Active message is displayed beside the submit button, if not refresh the page/extension.
- Solve a problem on CodeChef.
- Submit your solution.
- The extension will automatically detect your submission and start the sync process.
- You'll see status updates on the CodeChef page indicating the progress.
- Check your GitHub repository to see the uploaded solution and README.
- The extension is only active when the CodeSync Active message is displayed.
- The extension currently works for CodeChef problems only.
- Ensure you have the necessary permissions to push to the specified GitHub repository.
- The extension uses the GitHub API, so be mindful of rate limits.
- For any errors, check out the console.