From 853394f8e1c900fc0af8a20fcf59ec0c29f4c6c7 Mon Sep 17 00:00:00 2001 From: skullY Date: Tue, 12 Nov 2019 17:08:55 -0800 Subject: Make generating keymap.c from JSON more reliable --- lib/python/qmk/cli/json/keymap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/python/qmk') diff --git a/lib/python/qmk/cli/json/keymap.py b/lib/python/qmk/cli/json/keymap.py index a65acd6197..88ea357f1f 100755 --- a/lib/python/qmk/cli/json/keymap.py +++ b/lib/python/qmk/cli/json/keymap.py @@ -10,6 +10,7 @@ import qmk.keymap @cli.argument('-o', '--output', arg_only=True, help='File to write to') +@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") @cli.argument('filename', arg_only=True, help='Configurator JSON file') @cli.subcommand('Create a keymap.c from a QMK Configurator export.') def json_keymap(cli): @@ -48,7 +49,8 @@ def json_keymap(cli): with open(output_file, 'w') as keymap_fd: keymap_fd.write(keymap_c) - cli.log.info('Wrote keymap to %s.', cli.args.output) + if not cli.args.quiet: + cli.log.info('Wrote keymap to %s.', cli.args.output) else: print(keymap_c) -- cgit v1.2.3