[Keyboard] Move Keebio boards to own folder (#5109)
* Move boards into keebio folder * Rename keymap * Update BDN9 files * Update BFO-9000 files * Update Chocopad files * Update Dilly files * Update Fourier files, collapse rev1 into main * Update Iris files * Update Laplace files * Update Levinson files, fix buswerks keymap * Update Nyquist files * Fix keymap issues * Update Quefrency files * Update Rorschach files * Update TF68 files * Update Viterbi files * Update Viterbi files * Update Wavelet files * Reformat default layout * Fix up default folder for Iris * Remove already defined aliases
This commit is contained in:
parent
994852712d
commit
b2ee290c9f
442 changed files with 543 additions and 483 deletions
39
keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py
Executable file
39
keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import re
|
||||
|
||||
class KeymapConverter:
|
||||
|
||||
def __init__(self, filename):
|
||||
self.filename = filename
|
||||
|
||||
def read_keymaps(self):
|
||||
with open(self.filename) as f:
|
||||
lines = f.readlines()
|
||||
|
||||
mode = 0
|
||||
for line in lines:
|
||||
line = line[:-1]
|
||||
if mode == 0:
|
||||
if "KC_KEYMAP" in line:
|
||||
matches = re.match(r'.*\[(.*)\] = .*', line)
|
||||
if matches:
|
||||
layer_name = matches.group(1)
|
||||
layer_name = layer_name[1:].capitalize()
|
||||
print '###', layer_name
|
||||
print '```'
|
||||
mode = 1
|
||||
elif mode == 1:
|
||||
if "//" in line:
|
||||
print line[4:]
|
||||
elif ")" in line:
|
||||
mode = 0
|
||||
print '```'
|
||||
print
|
||||
elif line[-1] == ',':
|
||||
print "|" + line[5:-1] + "|"
|
||||
else:
|
||||
print "|" + line[5:] + "|"
|
||||
|
||||
converter = KeymapConverter('keymap.c')
|
||||
converter.read_keymaps()
|
Loading…
Add table
Add a link
Reference in a new issue