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

[Feature Request] Command to edit info.json files #12446

Open
2 tasks done
skullydazed opened this issue Mar 31, 2021 · 7 comments
Open
2 tasks done

[Feature Request] Command to edit info.json files #12446

skullydazed opened this issue Mar 31, 2021 · 7 comments

Comments

@skullydazed
Copy link
Member

Feature Request Type

  • Core functionality
  • New behavior

Description

We now have the pieces in place to build a TUI for editing a keyboard. The info.json can be used to describe all the basic attributes of a keyboard and we have a jsonschema for that file in data/schemas/keyboard.jsonschema.

We should have a qmk edit -kb <keyboard> command that gives a friendly interface for editing. It should use the schema file to know what a valid info.json looks like, and when new items are added to the schema it should not be necessary to change qmk edit. The interface should be similar to other configuration TUI's, such as raspberry pi's raspi-config or make menuconfig used by linux, busybox, and other projects.

When it comes to choosing a TUI library for this long term maintainability is the most important factor. It would be nice if we could use the curses library and not have to include more dependencies, but that library is pretty low level and doesn't work on windows. I'll leave the selection up to whoever is going to implement this, but if you want to use something niche please talk to us before getting started. Some interesting possibilities to consider:

@stale
Copy link

stale bot commented Jun 30, 2021

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.
For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

@stale stale bot added the stale Issues or pull requests that have become inactive without resolution. label Jun 30, 2021
@stale stale bot removed the stale Issues or pull requests that have become inactive without resolution. label Jun 30, 2021
@TweetyDaBird
Copy link
Contributor

If this is still desirable, after banging my head at doing .json files for a few days, I think I'd be motivated to tackle this.

I sincerely doubt it will be completely possible to not need to edit what I come up with for new options, but to some extent it should work reading from the json schema.

@Anika-Roy
Copy link

Hi! Im participating in Hacktoberfest and I'd like to know if this issue is counted in Hacktoberfest and if I can work on it?

@2ynn
Copy link

2ynn commented Nov 9, 2022

Hi @skullydazed,

I've started experimenting with urwid (more specifically TreeWalker and TreeListBox classes) and I would be interested in tackling this issue.

I see one blocker though: as soon as I call urwid from within your cli environment (i.e. $ qmk --color edit-info-json -kb <keyboard> ) I loose all of urwid's palette functionalities (colors, standout, underline). For instance you can try and run the palette example from within a milc subcommand and it should render as Monochrome (tested on urxvt and xterm).

It looks like milc renders ANSI colors in its own way and I doubt using another tui library would help. I though about starting a subprocess in another terminal but I believe I would still need to know which terminal the user is using and it kind of defeats the purpose of using milc (especially in regards to compatibility with windows). Any thoughts?

Thanks!

@stuartsoft
Copy link

@2ynn did you make progress on this?

@2ynn
Copy link

2ynn commented Feb 22, 2023

@2ynn did you make progress on this?

no haven't progressed on that. Have you reproduced the issue i'm talking about?

@Mohabz-911
Copy link

Hello @2ynn , I would like to work on this feature. I don't understand the problem you are facing. Can you provide me with more details?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants