Katac is a simple command-line application designed to streamline the process of practicing coding katas. It allows you to organize your katas by copying them into dedicated day folders and easily run them when you're done
Features
- Organized Practice: Create day folders to neatly store katas for each day of practice.
- Effortless Copying: Copy a kata into the designated day folder with a single command.
- Seamless Execution: Run katas effortlessly from within their respective day folders.
- Interactive Selection: Choose example katas with multi-select interface.
- Self-Update: Upgrade to the latest version with one command.
Install
Quick Install (Recommended)
|
Releases
Download pre-built binaries from the releases page for your platform (Linux, macOS, Windows - x86_64, ARM64, etc.)
Cargo
# From crates.io
# Or directly from GitHub
Dependencies
- make
Usage
create a kata
- create a folder named
katas - add the name for a kata you want to create
- add the skeleton, this is the entrypoint for each day
// hello.go
func helloWorld()
func main()
begin a new day
to begin a new day run the katac command with the kata or katas you want to do: (it can also be a path)
# katac <kata_name>...
this will create a days folder which will contain a day1 containing your kata
run your kata
you can run your kata if the kata has a Makefile (if you have make), or a run.sh (run.bat for windows)
# Makefile
:
after you are done writing the kata like in this example:
import "fmt"
func helloWorld()
func main()
you can run it by doing this:
# katac run [kata_name]...
change katas folder and days folder permanently
you can create a katac.toml file that looks like this:
[]
= "go-katas"
= "go-days"
run random katas
you can run random katas by using the random command and giving the number of random katas you want to do, like this
# this will copy 4 randomly selected katas from your katas directory to your days directory
randomly select a subset of katas
if you want to choose the katas the random command will work on, you can add this property to the katac.toml file
[]
= ["Map", "LRU", "Trie", "Stack"]
initialize from examples
interactively select and copy example katas:
upgrade
update to the latest version:
Contributing
If you have any ideas for improvements or find any issues, feel free to open an issue or submit a pull request.