chore(qmkasciigen): cleanup

main
sudo pacman -Syu 2023-07-25 17:19:26 +07:00
parent 2fe80391ee
commit f1496fb983
3 changed files with 12 additions and 20 deletions

View File

@ -102,9 +102,21 @@ Interesting
- [Miryoku](https://github.com/manna-harbour/miryoku) - [Miryoku](https://github.com/manna-harbour/miryoku)
- [Toward a more useful keyboard](https://github.com/jasonrudolph/keyboard) - [Toward a more useful keyboard](https://github.com/jasonrudolph/keyboard)
## qmkasciigen
Install:
```sh
go install github.com/haunt98/qmk_keymaps/cmd/qmkasciigen@latest
```
## TODO ## TODO
- [x] How to flash - [x] How to flash
- [x] Add stock firmware/docs - [x] Add stock firmware/docs
- [x] Add qmk lint - [x] Add qmk lint
- [x] Visualize - [x] Visualize
- [ ] qmkasciigen
- [ ] Use flag
- [ ] Add docs
- [ ] Get data directly from qmk

View File

@ -2,7 +2,6 @@ package main
import ( import (
"fmt" "fmt"
"log"
"strings" "strings"
) )
@ -46,14 +45,9 @@ var mapSpecialKey = map[string]string{
"RSFT_T(KC_ENT)": "SHIFT ENTER", "RSFT_T(KC_ENT)": "SHIFT ENTER",
} }
type DrawConfig struct {
Debug bool
}
func Draw( func Draw(
layouts map[string]map[string][]QMKKeyDictionary, layouts map[string]map[string][]QMKKeyDictionary,
keymap QMKKeymap, keymap QMKKeymap,
cfg DrawConfig,
) string { ) string {
layoutsStr := make([]string, 0, len(layouts)) layoutsStr := make([]string, 0, len(layouts))
@ -165,17 +159,6 @@ func Draw(
count++ count++
} }
if cfg.Debug {
s := ""
for i := range table {
for j := range table[i] {
s += table[i][j]
}
s += "\n"
}
log.Printf("Table:\n%s\n", s)
}
// Print // Print
layerStr := fmt.Sprintf("Layer %d\n", iLayer) layerStr := fmt.Sprintf("Layer %d\n", iLayer)
for i := range table { for i := range table {

View File

@ -54,9 +54,6 @@ func main() {
result := Draw( result := Draw(
qmkInfo.Layouts, qmkInfo.Layouts,
qmkKeymap, qmkKeymap,
DrawConfig{
Debug: debug,
},
) )
if debug { if debug {
log.Printf("Result:\n%s\n", result) log.Printf("Result:\n%s\n", result)