|
|
@ -10,6 +10,7 @@ import qmk.keymap |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cli.argument('-o', '--output', arg_only=True, help='File to write to') |
|
|
|
@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.argument('filename', arg_only=True, help='Configurator JSON file') |
|
|
|
@cli.subcommand('Creates a keymap.c from a QMK Configurator export.') |
|
|
|
@cli.subcommand('Creates a keymap.c from a QMK Configurator export.') |
|
|
|
def json_keymap(cli): |
|
|
|
def json_keymap(cli): |
|
|
@ -48,6 +49,7 @@ def json_keymap(cli): |
|
|
|
with open(output_file, 'w') as keymap_fd: |
|
|
|
with open(output_file, 'w') as keymap_fd: |
|
|
|
keymap_fd.write(keymap_c) |
|
|
|
keymap_fd.write(keymap_c) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not cli.args.quiet: |
|
|
|
cli.log.info('Wrote keymap to %s.', cli.args.output) |
|
|
|
cli.log.info('Wrote keymap to %s.', cli.args.output) |
|
|
|
|
|
|
|
|
|
|
|
else: |
|
|
|
else: |
|
|
|