summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk')
-rwxr-xr-xlib/python/qmk/cli/generate/config_h.py2
-rwxr-xr-xlib/python/qmk/cli/generate/rules_mk.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py
index fa7c43788d..f64daba134 100755
--- a/lib/python/qmk/cli/generate/config_h.py
+++ b/lib/python/qmk/cli/generate/config_h.py
@@ -174,7 +174,7 @@ def generate_config_h(cli):
# Determine our keyboard/keymap
if cli.args.filename:
user_keymap = parse_configurator_json(cli.args.filename)
- kb_info_json = user_keymap.get('config', {})
+ kb_info_json = dotty(user_keymap.get('config', {}))
elif cli.args.keyboard:
kb_info_json = dotty(info_json(cli.args.keyboard))
else:
diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py
index 361d3c758a..1d708f371e 100755
--- a/lib/python/qmk/cli/generate/rules_mk.py
+++ b/lib/python/qmk/cli/generate/rules_mk.py
@@ -49,10 +49,12 @@ def process_mapping_rule(kb_info_json, rules_key, info_dict):
def generate_rules_mk(cli):
"""Generates a rules.mk file from info.json.
"""
+ converter = None
# Determine our keyboard/keymap
if cli.args.filename:
user_keymap = parse_configurator_json(cli.args.filename)
- kb_info_json = user_keymap.get('config', {})
+ kb_info_json = dotty(user_keymap.get('config', {}))
+ converter = user_keymap.get('converter', None)
elif cli.args.keyboard:
kb_info_json = dotty(info_json(cli.args.keyboard))
else:
@@ -88,6 +90,9 @@ def generate_rules_mk(cli):
else:
rules_mk_lines.append('CUSTOM_MATRIX ?= yes')
+ if converter:
+ rules_mk_lines.append(f'CONVERT_TO ?= {converter}')
+
# Show the results
dump_lines(cli.args.output, rules_mk_lines)