add support for in-tree keymap.json (wip)

This commit is contained in:
Zach White 2021-09-15 19:15:02 -07:00
parent 3f9e745b71
commit 0d9d1d0414
9 changed files with 35 additions and 24 deletions

View file

@ -157,11 +157,12 @@ def generate_split_config(kb_info_json, config_h_lines):
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate config.h for.')
@cli.argument('-km', '--keymap', arg_only=True, help='Keymap to get overrides from.')
@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True)
def generate_config_h(cli):
"""Generates the info_config.h file.
"""
kb_info_json = dotty(info_json(cli.args.keyboard, overrides=get_keyboard_overrides(cli.args.keyboard)))
kb_info_json = dotty(info_json(cli.args.keyboard, overrides=get_keyboard_overrides(cli.args.keyboard, cli.args.keymap)))
# Build the info_config.h file.
config_h_lines = ['/* This file was generated by `qmk generate-config-h`. Do not edit or copy.' ' */', '', '#pragma once']