chore(qmkasciigen): cleanup
parent
2fe80391ee
commit
f1496fb983
12
README.md
12
README.md
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -54,9 +54,6 @@ func main() {
|
|||
result := Draw(
|
||||
qmkInfo.Layouts,
|
||||
qmkKeymap,
|
||||
DrawConfig{
|
||||
Debug: debug,
|
||||
},
|
||||
)
|
||||
if debug {
|
||||
log.Printf("Result:\n%s\n", result)
|
||||
|
|
Loading…
Reference in New Issue