2019-10-08 19:50:21 +00:00
|
|
|
"""List the keymaps for a specific keyboard
|
|
|
|
"""
|
|
|
|
from milc import cli
|
2020-03-13 22:47:04 +00:00
|
|
|
|
2019-10-13 17:07:22 +00:00
|
|
|
import qmk.keymap
|
2020-03-13 22:47:04 +00:00
|
|
|
from qmk.decorators import automagic_keyboard
|
2021-04-15 02:00:22 +00:00
|
|
|
from qmk.keyboard import keyboard_completer, keyboard_folder
|
2019-10-09 08:14:53 +00:00
|
|
|
|
2020-01-07 20:54:21 +00:00
|
|
|
|
2021-04-15 02:00:22 +00:00
|
|
|
@cli.argument("-kb", "--keyboard", type=keyboard_folder, completer=keyboard_completer, help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
|
2019-10-08 19:50:21 +00:00
|
|
|
@cli.subcommand("List the keymaps for a specific keyboard")
|
2020-03-13 22:47:04 +00:00
|
|
|
@automagic_keyboard
|
2019-10-08 19:50:21 +00:00
|
|
|
def list_keymaps(cli):
|
|
|
|
"""List the keymaps for a specific keyboard
|
|
|
|
"""
|
2021-11-18 17:55:07 +00:00
|
|
|
if not cli.config.list_keymaps.keyboard:
|
|
|
|
cli.log.error('Missing required arguments: --keyboard')
|
|
|
|
cli.subcommands['list-keymaps'].print_help()
|
|
|
|
return False
|
|
|
|
|
2020-05-26 20:05:41 +00:00
|
|
|
for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
|
|
|
|
print(name)
|