For each matched target, print the value of the supplied info.json key. May be passed multiple times.
-f FILTER, --filter FILTER
-f FILTER, --filter FILTER
Filter the list of keyboards based on the supplied value in rules.mk. Matches info.json structure, and accepts the formats 'features.rgblight=true' or 'exists(matrix_pins.direct)'. May be passed multiple times, all filters need to match. Value may include wildcards such as '*' and '?'.
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 '?'.
@ -11,13 +11,17 @@ from qmk.search import search_keymap_targets
action='append',
action='append',
default=[],
default=[],
help=# noqa: `format-python` and `pytest` don't agree here.
help=# noqa: `format-python` and `pytest` don't agree here.
"Filter the list of keyboards based on the supplied value in rules.mk. Matches info.json structure, and accepts the formats'features.rgblight=true' or 'exists(matrix_pins.direct)'. 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.
"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.
)
)
@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'.")
@cli.argument('-km','--keymap',type=str,default='default',help="The keymap name to build. Default is 'default'.")
@cli.subcommand('Find builds which match supplied search criteria.')
@cli.subcommand('Find builds which match supplied search criteria.')
deffind(cli):
deffind(cli):
"""Search through all keyboards and keymaps for a given search criteria.
"""Search through all keyboards and keymaps for a given search criteria.