Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cli command to import keyboard|keymap|kbfirmware #16668

Merged
merged 5 commits into from
Jul 2, 2022

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Mar 16, 2022

Description

Mostly as im too lazy to copy stuff into the tree manually.

Extended the import commands to also provide a CLI equivalent of https://noroadsleft.github.io/kbf_qmk_converter/.
Basic support right now, on which can be iterated in future develop cycles. I also have an in progress replacement for kbfirmware, which will rely on the import command rather than provide hosted compilation.

Examples

qmk import-keymap ~/Downloads/asdf2.json 
Ψ Importing asdf2.json.

Ψ Imported a new keymap named asdf2.
Ψ To start working on things, `cd` into keyboards/takashicompany/dogtag/keymaps/asdf2,
Ψ or open the directory in your preferred text editor.
Ψ And build with qmk compile -kb takashicompany/dogtag -km asdf2.
qmk import-kbfirmware ~/Downloads/gh60.json
Ψ Importing gh60.json.

⚠ Support here is basic - Consider using 'qmk new-keyboard' instead
Ψ Imported a new keyboard named gh62.
Ψ To start working on things, `cd` into keyboards/gh62,
Ψ or open the directory in your preferred text editor.
Ψ And build with qmk compile -kb gh62 -km default.

qmk info -l -kb gh62
Keyboard Name: gh62
Manufacturer: TODO
Maintainer: TODO
Keyboard Folder: gh62
Layouts: LAYOUT
Processor: atmega32u4
Bootloader: atmel-dfu
Layout Layout:
┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐
│  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  │
└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘
┌────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌────┐
│    ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││    │
└────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└────┘
┌─────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌───────┐
│     ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││       │
└─────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└───────┘
┌───────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌─────┐┌──┐
│       ││  ││  ││  ││  ││  ││  ││  ││  ││  ││  ││     ││  │
└───────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└─────┘└──┘
┌───┐┌───┐┌───┐┌───────────────────────┐┌───┐┌───┐┌───┐┌───┐
│   ││   ││   ││                       ││   ││   ││   ││   │
└───┘└───┘└───┘└───────────────────────┘└───┘└───┘└───┘└───┘

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added cli qmk cli command python labels Mar 16, 2022
@zvecr zvecr requested a review from a team March 16, 2022 08:50
@zvecr zvecr force-pushed the feature/cli_import branch from cb0517f to a4c39f9 Compare May 14, 2022 23:30
@zvecr zvecr marked this pull request as ready for review May 14, 2022 23:38
Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually, looks sound, and it looks like the python doesn't break anything.

@drashna drashna requested review from a team May 20, 2022 04:36
@tzarc tzarc merged commit 59e28b8 into qmk:develop Jul 2, 2022
nolanseaton pushed a commit to nolanseaton/qmk_firmware that referenced this pull request Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants