Browse Source

Shim cli to new keyboard script (#12780)

* Shim cli to new keyboard script

* Shim cli to new keyboard script

* Add docs
pull/12031/head
Joel Challis 3 years ago
committed by GitHub
parent
commit
25c97e0019
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions
  1. +12
    -0
      docs/cli_commands.md
  2. +1
    -0
      lib/python/qmk/cli/new/__init__.py
  3. +11
    -0
      lib/python/qmk/cli/new/keyboard.py

+ 12
- 0
docs/cli_commands.md View File

@ -228,6 +228,18 @@ This command is directory aware. It will automatically fill in KEYBOARD if you a
qmk list-keymaps -kb planck/ez
```
## `qmk new-keyboard`
This command creates a new keyboard based on available templates.
This command will prompt for input to guide you though the generation process.
**Usage**:
```
qmk new-keyboard
```
## `qmk new-keymap`
This command creates a new keymap based on a keyboard's existing default keymap.


+ 1
- 0
lib/python/qmk/cli/new/__init__.py View File

@ -1 +1,2 @@
from . import keyboard
from . import keymap

+ 11
- 0
lib/python/qmk/cli/new/keyboard.py View File

@ -0,0 +1,11 @@
"""This script automates the creation of keyboards.
"""
from milc import cli
@cli.subcommand('Creates a new keyboard')
def new_keyboard(cli):
"""Creates a new keyboard
"""
# TODO: replace this bodge to the existing script
cli.run(['util/new_keyboard.sh'], capture_output=False)

Loading…
Cancel
Save