summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/cli/json2c.py
Commit message (Collapse)AuthorAgeFilesLines
* CLI: Validate JSON keymap input (#16261)Erovia2022-02-281-10/+3
| | | | | | | | | | | | | | | | | | | | | * Fix schema validator It should use the passed schema. * Add required attributes to keymap schema * Rework subcommands to validate the JSON keymaps The 'compile', 'flash' and 'json2c' subcommands were reworked to add JSON keymap validation so error is reported for non-JSON and non-compliant-JSON inputs. * Fix required fields in keymap schema * Add tests * Fix compiling keymaps directly from keymap directory * Schema should not require version for now.
* Macros in JSON keymaps (#14374)Zach White2021-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * macros in json keymaps * add advanced macro support to json * add a note about escaping macro strings * add simple examples * format json * add support for language specific keymap extras * switch to dictionaries instead of inline text for macros * use SS_TAP on the innermost tap keycode * add the new macro format to the schema * document the macro limit * add the json keyword for syntax highlighting * fix format that vscode screwed up * Update feature_macros.md * add tests for macros * change ding to beep * add json support for SENDSTRING_BELL * update doc based on feedback from sigprof * document host_layout * remove unused var * improve carriage return handling * support tab characters as well * Update docs/feature_macros.md Co-authored-by: Nick Brassel <nick@tzarc.org> * escape backslash characters * format * flake8 * Update quantum/quantum_keycodes.h Co-authored-by: Nick Brassel <nick@tzarc.org>
* Add support for tab completion (#12411)Zach White2021-04-141-1/+2
| | | | | | | * Add support for tab completion * make flake8 happy * Add documentation
* Fix generated file output while target exists (#12062)Joel Challis2021-02-281-1/+1
|
* Allow flash/compile to accept relative json paths (#11767)Joel Challis2021-02-071-15/+3
| | | | | | | | | | | * Allow flash/compile to accept relative paths * Review suggestions * Review comments * Put back exists check otherwise stdin fails * fix lint
* [CLI] Add stdin support for json2c command (#11289)LongerHV2020-12-291-13/+19
| | | | | | | | | | | | | | | * Implement stdin for json2c command * Refactor * Handle json decode error * Add stdin support for c2json cli command * Refactor to prevent code duplication * Change exit(1) to return False in c2json command * Remove unused import
* Generate api data on each push (#10609)Zach White2020-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add new qmk generate-api command, to generate a complete set of API data. * Generate api data and push it to the keyboard repo * fix typo * Apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * fixup api workflow * remove file-changes-action * use a more mainstream github action * fix yaml error * Apply suggestions from code review Co-authored-by: Erovia <Erovia@users.noreply.github.com> * more uniform date handling * make flake8 happy * Update lib/python/qmk/decorators.py Co-authored-by: Erovia <Erovia@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Erovia <Erovia@users.noreply.github.com>
* CLI: update subcommands to use return instead of exit() (#10323)Ryan2020-10-061-2/+2
|
* CLI: fix `json2c` subcommand and add/fix tests (#9206)Erovia2020-05-261-6/+6
| | | Co-authored-by: Zach White <skullydazed@users.noreply.github.com>
* Move everything to Python 3.6 (#8835)skullydazed2020-04-181-5/+3
|
* use qmk.path.normpath to locate the output file.skullY2020-03-121-2/+1
|
* Rename qmk json-keymap to qmk json2c (#8372)skullydazed2020-03-101-0/+56