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)
- [Toward a more useful keyboard](https://github.com/jasonrudolph/keyboard)
## qmkasciigen
Install:
```sh
go install github.com/haunt98/qmk_keymaps/cmd/qmkasciigen@latest
```
## TODO
- [x] How to flash
- [x] Add stock firmware/docs
- [x] Add qmk lint
- [x] Visualize
- [ ] qmkasciigen
- [ ] Use flag
- [ ] Add docs
- [ ] Get data directly from qmk

View File

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

View File

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