A tool to automatically export your Codewars kata solutions to a local repository.
- Python 3.x
- Git
- Google Chrome
- Clone the repository:
git clone https://github.com/benjGam/KtasExporter.git
cd KtasExporter
- Run the setup script:
- For Linux/MacOS:
./setup.sh
- For Windows:
setup.bat
- Configure your environment:
Create a
.env
file in the project root with the following variables:MAIL_ADDRESS=[email protected] PASSWORD=your-codewars-password LOCAL_REPO_PATH=/path/to/save/katas KATA_FILE_NAME=katas.md USERNAME=your-codewars-username PUSH_STEP=10 # Number of katas to export per run DIFFERENT_FILE_DEPENDING_ON_LANGUAGE=false # Set to true to separate katas by language
After installation, you can use the tool in two ways:
- Using the alias (requires terminal restart after installation):
ktasexport
- Using the run script directly:
./run.sh
After installation, you can use the tool in two ways:
- Using the command (requires terminal restart after installation):
ktasexport
- Using the run script directly:
run.bat
- Always keep your kata solutions repository private
- Do not share your solutions publicly
- Use this tool for personal reference only
- Connects to your Codewars account
- Retrieves your completed kata solutions
- Saves them to the specified local repository
- Automatically commits changes
- Automatic authentication
- Progressive kata extraction
- Automatic Git commits
- Duplicate prevention for already exported katas
- Cross-platform support (Linux/Windows/MacOS)
- Language-based file organization:
- Optional separation of katas by programming language
- Automatic file creation and management
- Maintains backward compatibility
- Automatic ChromeDriver management:
- Version compatibility check
- Automatic updates
- Multi-package manager support (npm/yarn/pnpm)
- Environment-based setup
If you encounter ChromeDriver compatibility issues:
- Check your Chrome version
- Download the matching ChromeDriver version
- Replace the driver in the
src/
directory
- The tool uses a virtual environment for dependency management
- All credentials are stored locally in your
.env
file - Git commits are automated for each kata export