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
Convert new_keyboard.sh to a python command #6872
Comments
Is the intention that this be, essentially, a drop-in replacement for the current .sh version with the addition of CLI flags that supersede the interactive prompts? |
As a start, yes. I think there will be room to iterate and improve on it once that is done, and I'd welcome most of those improvements as part of the initial PR. For example, support for arm keyboards. |
|
@HBBisenieks sorry! |
Hey no worries! Your implementation looks way better than mine was looking in the planning stages. |
Hi @skullydazed, what is the advantage of replacing .sh with a python command? Better debugging? |
@ThiagoWhispher I'm going to go for maintainability, consistency in output/behaviour, reliability, and moving all the shell stuff to the qmk utility. |
I like the idea of centralizing all these commands into a single CLI. Combine that with the Docker container and you have a single command with no dependencies (besides Docker) for all operations. |
@lf- now I understand how advantageous this is. |
Are these docker images hosted on Docker Hub too? Just wanted to start my journey in containers as it would be my first experience with dockers contribution. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Per request in qmk#6872, this adds a new CLI command `qmk new_keyboard` that mirrors the existing functionality in `util/new_keyboard.sh`. - Accepts keyboard, type, and username from arg or input - Validates type against `avr` and `ps2avrgb` - Copies base and $type into new directory - Replaces %YEAR%, %KEYBOARD%, and %YOUR_NAME% across specific files Note, had to use `distutils.dir_util.copy_tree` instead of `shutil.copytree` as the `shutil` version does not support copying into an existing folder.
This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. |
Feature Request Type
Description
Similar to #6066, we should convert new_keyboard.sh to a qmk command.
Some thoughts on implementation:
.format()
string formatting.arg_only=True
.The text was updated successfully, but these errors were encountered: