This commit is contained in:
zvecr
2022-09-26 18:09:36 +01:00
parent 76a45a4e24
commit 1dbb4c0f96
12 changed files with 359 additions and 8 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ from pathlib import Path
from typing import OrderedDict
from jinja2 import Environment, FileSystemLoader, select_autoescape
from qmk.casing import to_snake
from qmk.constants import QMK_FIRMWARE
from qmk.json_schema import json_load, validate
from qmk.decorators import lru_cache
@@ -24,7 +25,7 @@ def _get_jinja2_env(data_templates_xap_subdir: str):
def render_xap_output(data_templates_xap_subdir, file_to_render, defs):
j2 = _get_jinja2_env(data_templates_xap_subdir)
return j2.get_template(file_to_render).render(xap=defs, xap_str=hjson.dumps(defs))
return j2.get_template(file_to_render).render(xap=defs, xap_str=hjson.dumps(defs), to_snake=to_snake)
def _find_kb_spec(kb):