mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-07-13 12:29:37 -04:00
Merge remote-tracking branch 'upstream/develop' into xap
This commit is contained in:
@@ -12,6 +12,7 @@ from qmk.info import info_json
|
||||
from qmk.json_encoders import InfoJSONEncoder
|
||||
from qmk.json_schema import json_load
|
||||
from qmk.keyboard import find_readme, list_keyboards
|
||||
from qmk.keycodes import load_spec, list_versions
|
||||
from qmk.xap.common import get_xap_definition_files, update_xap_definitions
|
||||
|
||||
DATA_PATH = Path('data')
|
||||
@@ -19,6 +20,16 @@ TEMPLATE_PATH = DATA_PATH / 'templates/api/'
|
||||
BUILD_API_PATH = Path('.build/api_data/')
|
||||
|
||||
|
||||
def _resolve_keycode_specs(output_folder):
|
||||
"""To make it easier for consumers, publish pre-merged spec files
|
||||
"""
|
||||
for version in list_versions():
|
||||
overall = load_spec(version)
|
||||
|
||||
output_file = output_folder / f'constants/keycodes_{version}.json'
|
||||
output_file.write_text(json.dumps(overall, indent=4), encoding='utf-8')
|
||||
|
||||
|
||||
def _filtered_keyboard_list():
|
||||
"""Perform basic filtering of list_keyboards
|
||||
"""
|
||||
@@ -113,6 +124,9 @@ def generate_api(cli):
|
||||
'usb': usb_list,
|
||||
}
|
||||
|
||||
# Feature specific handling
|
||||
_resolve_keycode_specs(v1_dir)
|
||||
|
||||
# Feature specific handling
|
||||
_resolve_xap_specs(v1_dir / 'xap')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user