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
- 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.
you can download the release for your specific OS and put it in your PATH
cargo install katac
- make
- create a folder named
katas
- add the name for a kata you want to create
mkdir -p katas/hello_world
- add the skeleton, this is the entrypoint for each day
// hello.go
func helloWorld() {
}
func main() {
helloWorld()
}
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>...
katac hello_world
this will create a days
folder which will contain a day1
containing 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
run:
go run hello.go
after you are done writing the kata like in this example:
import "fmt"
func helloWorld() {
fmt.Println("hello world")
}
func main() {
helloWorld()
}
you can run it by doing this:
# katac run [kata_name]...
katac run
you can create a katac.toml file that looks like this:
[katas]
katas_dir = "go-katas"
days_dir = "go-days"
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
katac random 4
if you want to choose the katas the random command will work on, you can add this property to the katac.toml file
[katas]
random = ["Map", "LRU", "Trie", "Stack"]
If you have any ideas for improvements or find any issues, feel free to open an issue or submit a pull request.