This program allows you to connect to Codewars by using your credentials (through the GitHub OAuth sign in option) and extract all the code of each programming language of every kata you have completed.
It's discouraged to put your Codewars solutions publicly available because, even though it depends on every person and it's a responsibility of one self, having your solutions publicly available may increase the number of dishonest users that copy and paste the solutions to their own advantage. An user can get sanctioned if the Codewars' staff notice an unusual behaviour. Read the Codewars Code of Conduct for more information (especially the last rule).
Although it's not prohibited, please: don't put your Codewars solutions publicly available on GitHub. Keep your repository private.
To use this program you need:
- Python3.7+
- A Codewars account.
- A GitHub account.
- Google Chrome 102.0.5005.115+(or any version compatible with chromedriver 102.0.5005.61)
To use this program you just need an initial configuration. After that, you just have to sit down and watch everything being pulled automatically. Below is the ordered list of steps you must follow to get all working:
- Click on the green button "Use this template".
- Choose a name for your repository, mark the "Private" option and click on "Create repository from template".
- Clone or add remotely to pull the new repository locally in your machine.
- Move to the
Codewars-Solutions-Scraper
folder. - Run the program by writing
python3 main.py YOUR_CODEWARS_USERNAME YOUR_GITHUB_USERNAME YOUR_GITHUB_PASSWORD
in your command line. - Wait for the program to complete (you'll see a message that indicates the completion status).
- Add all the files to the stage, commit them and push them to your private repository.
The Docker implementation is still a work in progress.
-
To build:
docker build --no-cache -t Codewars-Solutions-Scraper .
-
To run:
docker run -it Codewars-Solutions-Scraper YOUR_CODEWARS_USERNAME YOUR_GITHUB_USERNAME YOUR_GITHUB_PASSWORD
-
To debug:
docker run -it --entrypoint sh Codewars-Solutions-Scraper
This repository is under the BSD-2-Clause License to follow Codewars's Terms of Service (that were last updated on October, 2018).
If you've read above sections, you know you can customise the program to make it work as you want. Keep in mind that I offer the program as you see in this repository. Any changes you made in your private repository are up to you, and I'm not responsible for them. Be careful on what you change.