~ruther/qmk_firmware

0ec438289d8d0103a5fd1a6698c95716466ed9d3 — QMK Bot 4 years ago 79e86ad + 25c97e0
Merge remote-tracking branch 'origin/master' into develop
3 files changed, 24 insertions(+), 0 deletions(-)

M docs/cli_commands.md
M lib/python/qmk/cli/new/__init__.py
A lib/python/qmk/cli/new/keyboard.py
M docs/cli_commands.md => docs/cli_commands.md +12 -0
@@ 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.

M lib/python/qmk/cli/new/__init__.py => lib/python/qmk/cli/new/__init__.py +1 -0
@@ 1,1 1,2 @@
from . import keyboard
from . import keymap

A lib/python/qmk/cli/new/keyboard.py => lib/python/qmk/cli/new/keyboard.py +11 -0
@@ 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)