/CodewarsLogger

Automatically pull all your completed code-challenges from Codewars into a folder to keep track of your solutions in a logically-organised index.

Primary LanguageC#BSD 2-Clause "Simplified" LicenseBSD-2-Clause

CodewarsLogger

GitHub all releases Supported OS versions Architecture of 64 bits

Also check Codewars Activity Chart!

This program allows you to connect to Codewars by using your Codewars credentials and extract all the code of each programming language of every kata you have completed into a folder.

It's discouraged to put your Codewars solutions publicly available because, even though it depends on every person, this 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.

Screenshots

README file (index)
Folders of the katas
Inside a kata folder
Solution of a kata

Why?

A key skill every programmer should have is problem solving (algorithms, paradigms, data structures, etc.), and Codewars is a very good platform to practice this hability because of its structure: support of multiple programming languages, user rank system, easily (with moderation) code challenge creation system and social interaction between users (similar code-challenges, comments, votes, and more).

By having a folder that contains all the code challenges you have completed, you can keep a personal registry of all your katas in a more readable way. Moreover, you can send the folder to a recruiter so they can see what you've done, get to know your strenghts and weaknesses, and see what are the programming languages you use with ease. You could do all of this manually, but going through all the pages of solutions of all the katas you've completed (plus more than one programming language, depending on the case) would take you a lot of time, and you'd have to update it every time you complete a new kata.

This program allows you to automatically copy into a folder the code of the completed challanges you've done: you just have to run the program and let it do its job. Moreover, the files and directories are stored in such a way that it's easy to navigate through them.

Usage

Requirements

To use this program you need:

  • .NET runtime installed on your computer.
  • Firefox web browser installed on your computer.
  • Geckodriver file from Mozilla.

Important thing to note: If you registered into Codewars using the GitHub OAuth option, you must create a Codewars password. You can do this easily by clicking on the text "Forgot your password?" in the Codewars sign in page.

Execution

These are the steps that you must follow to run the program:

  1. Download the program folder depending on the OS you use (head to the "Releases" tab).
  2. Download the .NET runtime from the official Microsoft website (currently, the program is targeted to the version 8.0).
  3. Download the Mozilla geckodriver from the "Releases" tab in Mozilla's repository.
  4. Check the "firefox_directory.txt" file to see if the Firefox binary location is actually in that directory (change it if it's not the case).
  5. With the "geckodriver.exe" file in the program's directory, run the executable.
  6. Follow the instructions prompted.

You can also clone the repository to have the code in you local machine and run the program from there. This way it's faster for you to customise whatever you want. For this, use git clone https://github.com/JoseDeFreitas/CodewarsLogger.git. You need to have .NET and Firefox installed. If you do, go to the "CodewarsLogger" folder (where the "Program.cs" lies) and type dotnet run in the console.

After completion

And that's it! Keep in mind that it will take some minutes the first time you run it because the program must loop through all of the katas. You must run the program every time you want to update the katas. It takes into consideration repeated files and code refactors.

For some reason, the API endpoint of Codewars that lists the "completed" katas includes also katas that you have trained but that aren't literally "completed"; that is, katas that have some solution that didn't pass all the tests. You complete a kata when you click the blue button "Attempt" and then the green button "Submit". This may lead to some warnings on the console that say A web element was not found on the page (create code file step)., because Codewars shows a text saying "No solutions" instead of the list of solutions that the program looks for.

For a clearer view of how the program goes through all the katas, you can comment out the line 102 (options.AddArgument("--headless");) by adding // before it.

If you're facing a problem, go to the "Errors" page of the wiki and look if the error/warning you're getting appears in there. If it doesn't, please open an issue.

Disclaimer

This repository is under the BSD-2-Clause License to follow Codewars's Terms of Service (that were last updated on April, 2022).

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 it in this repository. Any changes you made are up to you, and I'm not responsible for them. Be careful on what you change. For more related information, please read the "Privacy" page of the wiki. I encourage you to read the whole wiki, too. Don't forget to read the rules from Codewars.