Commit Graph

60 Commits

Author SHA1 Message Date
Nick Brassel
7d8f193988
Allow codegen of keymap.json => keymap.c without requiring layers/layout etc. (#23451) 2024-11-24 20:32:30 +11:00
QMK Bot
2c6409fdd8 Merge remote-tracking branch 'origin/master' into develop 2024-08-12 12:34:54 +00:00
Nick Brassel
380e0c9cad
Userspace: add support for adding environment variables during build (#22887) 2024-08-12 22:34:22 +10:00
QMK Bot
c25b3bbe90 Merge remote-tracking branch 'origin/master' into develop 2024-07-24 05:17:22 +00:00
Nick Brassel
8c35011d0a
[CLI] Only generate files if contents change. (#24038)
Don't overwrite if the content doesn't change.
2024-07-24 06:16:51 +01:00
Ryan
0a5b892820
[CLI] Force dump_lines() to always use Unix line endings (#23954) 2024-06-19 19:43:23 +01:00
Nick Brassel
0262161914
[CLI] Don't exit() when certain exceptions occur. (#23442) 2024-06-15 10:37:47 +01:00
Nick Brassel
5501e804ff
QMK Userspace (#22222)
Co-authored-by: Duncan Sutherland <dunk2k_2000@hotmail.com>
2023-11-28 07:53:43 +11:00
Nick Brassel
46b996a55e
CLI parallel search updates (#22525) 2023-11-22 11:14:34 +11:00
Nick Brassel
4938210711
CLI refactoring for common build target APIs (#22221) 2023-11-15 16:24:54 +11:00
Nick Brassel
127560ae22
Add qmk ci-validate-aliases (#22205) 2023-10-06 10:34:23 +11:00
Joel Challis
27ff1d4153
Remove layout aliases from keyboard_aliases.hjson (#21658) 2023-08-01 01:54:28 +01:00
Nick Brassel
ffdc70bf0a
Consolidate KEYBOARD_OUTPUT+KEYMAP_OUTPUT=>INTERMEDIATE_OUTPUT (#21272) 2023-06-21 08:41:49 +10:00
Albert Y
47a51fda5d
Append user variables to the end of make command (#20177) 2023-04-03 15:20:39 +10:00
Albert Y
0e1e543836
Increase verbosity of make command (#20172) 2023-03-21 01:25:08 -07:00
Ryan
479d8de622
Format DD mappings and schemas (#18924) 2022-11-08 01:05:08 +00:00
Joel Challis
0b41c13509
[CLI] Ensure consistent clean behaviour (#18781) 2022-10-20 14:35:27 +01:00
Joel Challis
fc0330a54a
Correctly build keymap.json containing additional config (#18766) 2022-10-19 11:29:44 +01:00
QMK Bot
3a08deb7fe Merge remote-tracking branch 'origin/master' into develop 2022-03-18 16:02:57 +00:00
Joel Challis
ed773ab73c
Relocate CLI git interactions (#16682) 2022-03-18 16:02:24 +00:00
zvecr
bffb209eee Merge remote-tracking branch 'origin/master' into develop 2022-03-18 01:15:23 +00:00
Joel Challis
e5823b5650
[CLI] Add common util for dumping generated content (#16674) 2022-03-18 01:09:29 +00:00
Erovia
fbfd5312b9
CLI: Validate JSON keymap input (#16261)
* 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.
2022-02-28 20:02:39 +00:00
Joel Challis
f7e7671f69
Migrate more makefile utilities to builddefs sub-directory (#16002) 2022-02-10 09:45:51 -08:00
Ryan
c9f88d7c67
qmk doctor: display qmk_firmware version tag (#16155) 2022-02-01 20:31:42 -08:00
Zach White
08ce0142ba
Macros in JSON keymaps (#14374)
* 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>
2021-11-22 11:11:35 -08:00
Bao
590b405468
New CLI subcommand to create clang-compatible compilation database (compile_commands.json) (#14370)
* pulled source from dev branch

* missed a file from origin

* formatting

* revised argument names. relaxed matching rules to work for avr too

* add docstrings

* added docs. tightened up regex

* remove unused imports

* cleaning up command file. use existing qmk dir constant

* rename parser library file

* move lib functions into command file. there are only 2 and they aren't large

* currently debugging...

* more robustly find config

* updated docs

* remove unused imports

* reuse make executable from the main make command

* pulled source from dev branch

* missed a file from origin

* formatting

* revised argument names. relaxed matching rules to work for avr too

* add docstrings

* added docs. tightened up regex

* remove unused imports

* cleaning up command file. use existing qmk dir constant

* rename parser library file

* move lib functions into command file. there are only 2 and they aren't large

* currently debugging...

* more robustly find config

* updated docs

* remove unused imports

* reuse make executable from the main make command

* remove MAKEFLAGS from environment for better control over process management

* Update .gitignore

Co-authored-by: Michael Forster <forster@google.com>

* add a usage line to docs

* doc change as suggested

Co-authored-by: Nick Brassel <nick@tzarc.org>

* rename command

* remove debug print statements

* generate-compilation-database: fix arg handling

* generate-comilation-db: improve error handling

* use cli.run() instead of Popen()

Co-authored-by: Xton <cdewan@apple.com>
Co-authored-by: Christon DeWan <cmdpix@mac.com>
Co-authored-by: Michael Forster <forster@google.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-09-16 14:59:57 +10:00
Zach White
596c4a1f87
Remove bin/qmk (#14231)
* Remove the bin/qmk script

* remove bin/qmk from workflows
2021-08-29 16:50:22 -07:00
ruro
3b28178deb
--parallel improvements (#13800)
* improve make parallel jobs support

* document the --parallel option

* disable the output-sync for interactive targets
2021-08-18 08:46:59 +10:00
Ryan
b021c2f2c5
Port new_keyboard.sh to CLI (#13706)
Co-authored-by: Erovia <Erovia@users.noreply.github.com>
2021-07-30 21:57:40 +01:00
Erovia
e05f9c4a08
CLI: Add git and venv info to doctor's output (#13405)
Most of the checks are saved from zvecr's retired 'up/status'
subcommand PR.
2021-07-10 16:04:50 +01:00
Ryan
bbe43a91eb
CLI: Add subcommand to generate version.h (#13151) 2021-06-27 02:29:02 +10:00
Zach White
6955c5a002 Merge remote-tracking branch 'origin/master' into develop
Resolved Conflicts:
	lib/python/qmk/tests/test_cli_commands.py
	util/install/fedora.sh
2021-05-19 15:49:11 -07:00
Zach White
db1eacdaac
Align our subprocess usage with current best practices. (#12940)
* Align our subprocess usage with current best practices.

* remove unused import

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

* fix the cpp invocation for older python

* allow for unprompted installation

* make sure qmk new-keyboard works on windows

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-05-19 15:24:46 -07:00
QMK Bot
2f367bab98 Merge remote-tracking branch 'origin/master' into develop 2021-05-09 17:20:16 +00:00
Erovia
30aae6298b
CLI: Use BASH if SHELL variable is not set (Windows) (#12847) 2021-05-09 19:19:42 +02:00
QMK Bot
a0c95cb07e Merge remote-tracking branch 'origin/master' into develop 2021-05-09 10:58:43 +00:00
Joel Challis
7725d813c9
Allow MAKE environment override for 'qmk clean' (#12473) 2021-05-09 12:57:49 +02:00
QMK Bot
0dc0516f0c Merge remote-tracking branch 'origin/master' into develop 2021-03-24 16:27:28 +00:00
Zach White
299008be36
Add support for qmk_configurator style aliases (#11954)
* Add support for qmk_configurator style aliases

* add the keyboard aliases to the api data

* add support for a keyboard metadata file

* make flake8 happy
2021-03-24 09:26:38 -07:00
Zach White
f2715a0593
Consistently use bin/qmk when that script is called (#12286)
* Pass QMK_BIN down to build_keyboard.mk

* choose the correct qmk script
2021-03-18 16:10:40 -07:00
QMK Bot
25ec655162 Merge remote-tracking branch 'origin/master' into develop 2021-03-09 21:37:12 +00:00
Ryan
aed8bace97
Fix typo in get_git_version() (#12182) 2021-03-10 08:36:39 +11:00
Zach White
b0069c5c05
Begin the process of deprecating bin/qmk in favor of the global cli (#12109)
* Begin the process of deprecating bin/qmk in favor of the global cli

* Correctly set the qmk bin
2021-03-07 19:10:03 -08:00
Erovia
7db826dce8
CLI: Fix json flashing (#11765) 2021-02-01 20:55:35 +01:00
Zach White
111eb8990d
Fix QMK_BUILDDATE (#11641) 2021-01-20 20:38:18 +00:00
Zach White
da40242dbc
Generate version.h when compiling json files (#11581)
* generate version.h when compiling json files

* make flake8 happy

* fix formatting and verbose

* quiet up the compile output
2021-01-17 17:33:29 +00:00
Zach White
d9785ec313
Improve the compile and flash subcommands (#11334)
* add support for --clean to compile and flash

* compile standalone JSON keymaps without polluting the tree

* Add support for passing environment vars to make

* make flake8 happy

* document changes to qmk compile and flash

* add -e support to json export compiling

* Fix python 3.6

* honor $MAKE

* add support for parallel builds
2021-01-16 15:13:04 -08:00
Ryan
f9bd9d3b26
c2json: Fix TypeError on MSYS2 (#10709) 2020-10-23 12:21:32 +11:00
Erovia
058737f116
[CLI] Add c2json (#8817)
* Basic keymap parsing finally works

* Add 'keymap.json' creation to the qmk.keymap module

* Add tests and fix formatting

* Fix/exclude flake8 errors

* Convert keymap.c to valid keymap.json

* Fix some errors

* Add tests

* Finalize keymap.json creation, add json template

* Add docs

* Move pygments to the standard requirements

* Add support for nameless layers, fix tests

* Fix things after rebase

* Add missing 'keymap' value.

* Fix missing layer numbers from advanced keycodes

Buckwich noticed that if the advanced keycode / layer toggling key
contains a number, it goes missing.
Now we properly handle them.
Thx for noticing!

* Apply suggestions from code review

* fixup tests

Co-authored-by: Zach White <skullydazed@drpepper.org>
Co-authored-by: skullY <skullydazed@gmail.com>
2020-10-06 17:10:19 -07:00