Add support for qmk_configurator style aliases (#11954)
* Add support for qmk_configurator style aliases * add the keyboard aliases to the api data * add support for a keyboard metadata file * make flake8 happy
This commit is contained in:
parent
723d9af04d
commit
299008be36
18 changed files with 614 additions and 106 deletions
|
@ -4,18 +4,14 @@ from milc import cli
|
|||
|
||||
import qmk.keymap
|
||||
from qmk.decorators import automagic_keyboard
|
||||
from qmk.path import is_keyboard
|
||||
from qmk.keyboard import keyboard_folder
|
||||
|
||||
|
||||
@cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
|
||||
@cli.argument("-kb", "--keyboard", type=keyboard_folder, help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
|
||||
@cli.subcommand("List the keymaps for a specific keyboard")
|
||||
@automagic_keyboard
|
||||
def list_keymaps(cli):
|
||||
"""List the keymaps for a specific keyboard
|
||||
"""
|
||||
if not is_keyboard(cli.config.list_keymaps.keyboard):
|
||||
cli.log.error('Keyboard %s does not exist!', cli.config.list_keymaps.keyboard)
|
||||
return False
|
||||
|
||||
for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
|
||||
print(name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue