[Refactor] qmk find
(#21096)
This commit is contained in:
parent
e2dbe39b94
commit
6810aaf013
2 changed files with 89 additions and 24 deletions
|
@ -1,7 +1,7 @@
|
|||
"""Command to search through all keyboards and keymaps for a given search criteria.
|
||||
"""
|
||||
from milc import cli
|
||||
from qmk.search import search_keymap_targets
|
||||
from qmk.search import filter_help, search_keymap_targets
|
||||
|
||||
|
||||
@cli.argument(
|
||||
|
@ -11,7 +11,7 @@ from qmk.search import search_keymap_targets
|
|||
action='append',
|
||||
default=[],
|
||||
help= # noqa: `format-python` and `pytest` don't agree here.
|
||||
"Filter the list of keyboards based on their info.json data. Accepts the formats key=value, function(key), or function(key,value), eg. 'features.rgblight=true'. Valid functions are 'absent', 'contains', 'exists' and 'length'. May be passed multiple times; all filters need to match. Value may include wildcards such as '*' and '?'." # noqa: `format-python` and `pytest` don't agree here.
|
||||
f"Filter the list of keyboards based on their info.json data. Accepts the formats key=value, function(key), or function(key,value), eg. 'features.rgblight=true'. Valid functions are {filter_help()}. May be passed multiple times; all filters need to match. Value may include wildcards such as '*' and '?'." # noqa: `format-python` and `pytest` don't agree here.
|
||||
)
|
||||
@cli.argument('-p', '--print', arg_only=True, action='append', default=[], help="For each matched target, print the value of the supplied info.json key. May be passed multiple times.")
|
||||
@cli.argument('-km', '--keymap', type=str, default='default', help="The keymap name to build. Default is 'default'.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue