aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2019-11-12 17:08:55 -0800
committerskullydazed <skullydazed@users.noreply.github.com>2019-11-12 20:37:28 -0800
commit00fb1bd1f0550645997b61870d7d092494265a60 (patch)
treebcedba92b50be959cb67c035e4280348ab6eb5ae /lib
parent79edb7c5942108774e667c172550a1519c5543ac (diff)
downloadfirmware-00fb1bd1f0550645997b61870d7d092494265a60.tar.gz
firmware-00fb1bd1f0550645997b61870d7d092494265a60.tar.bz2
firmware-00fb1bd1f0550645997b61870d7d092494265a60.zip
Make generating keymap.c from JSON more reliable
Diffstat (limited to 'lib')
-rwxr-xr-xlib/python/qmk/cli/json/keymap.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/json/keymap.py b/lib/python/qmk/cli/json/keymap.py
index 207ac278c..7b7553104 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('Creates 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)