Commit Graph

12 Commits

Author SHA1 Message Date
Zach White
751316c344
[CLI] Add a subcommand for getting information about a keyboard (#8666)
You can now use `qmk info` to get information about keyboards and keymaps.

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
2020-05-26 13:05:41 -07:00
skullydazed
f81b0e35a6
Add decorators for determining keyboard and keymap based on current directory (#8191)
* Use pathlib everywhere we can

* Improvements based on @erovia's feedback

* rework qmk compile and qmk flash to use pathlib

* style

* Remove the subcommand_name argument from find_keyboard_keymap()

* add experimental decorators

* Create decorators for finding keyboard and keymap based on current directory.

Decorators were inspired by @Erovia's brilliant work on the proof of concept.
2020-03-13 15:47:04 -07:00
Erovia
3db41817e0 Code cleanup, use pathlib, use pytest keyboard
Clean up checks and logics that are unnecessary due to MILC updates.
Use pathlib instead of os.path for readability.
Use the 'pytest' keyboard for the tests.
Add community layout for 'handwired/onekey/pytest' so we can test
community layouts.
2020-02-15 15:19:03 -08:00
Erovia
8eeab1112a Fix commandline parsing and flake8 findings, rebase
Fixed commandline and config parsing. Thx @xplusplus.
Rebased on master and fixed merge conflicts.
2020-02-15 15:19:03 -08:00
Erovia
3ed1223678 Drop bs4 dependency, update docs, minor improvements 2020-02-15 15:19:03 -08:00
Erovia
26f53d38d9 Another major refactoring, add documentation
Move all useful functions to the qmk module and use the cli subcommand
as a wrapper around it.
Add both inline comments and documentation.
2020-02-15 15:19:03 -08:00
Erovia
f96085af38 Fix output format 2020-02-15 15:19:03 -08:00
Erovia
e46cc2db8c Try to figure out revision, drop -rv/--revision argument 2020-02-15 15:19:03 -08:00
Erovia
c3b168e6fd Fix help message. 2020-02-15 15:19:03 -08:00
Erovia
62c1bcba71 Get all buildable keymaps for each revision
The command now return all keymaps that's buildable for a
keyboard/revision. If the base directory of a keyboard does not contain
a 'rules.mk' file, nothing is returned. If the base directory contains a
'keymaps' directory, those keycaps will be returned for every revision.
2020-02-15 15:19:03 -08:00
Erovia
057c7d0ffe Major update to work better with revisions
Find the community keymaps supported by each revision.
2020-02-15 15:19:03 -08:00
Erovia
409c610543 CLI: add support for list_keymaps
List all the available keymaps for a given keyboard
2020-02-15 15:19:03 -08:00