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

Text UI (CLI) support in Designer #514

Open
vzahradnik opened this issue Sep 8, 2024 · 1 comment
Open

Text UI (CLI) support in Designer #514

vzahradnik opened this issue Sep 8, 2024 · 1 comment

Comments

@vzahradnik
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Sometimes I need to connect into my TcMenu powered device remotely. While embedControl works, I believe the solution could be easily extended to generate text UI interface besides the regular TcMenu UI. Perhaps this could be done using a new plugin?

Describe the solution you'd like
I'd like to reuse what each project already has, a menu tree structure. From there we can generate a CLI hierarchy.

CLI> // root menu, regular access
CLI# // root menu, privileged access, e.g. through entering a password

Let's say we have a submenu called Settings, user can get there from the root:
CLI> Settings
CLI Settings>

In nested submenus we could use pipes:
CLI Settings | Display> ...

Tab completion would be also great!

I believe from the menu tree we already have enough information to generate menu like this. However, we should allow user for extending this menu using custom code so they can add custom callbacks or methods not needed in regular TcMenu. Also, they should be able to implement the body of such functions. For example:

CLI Settings | Display> show info
(Prints display settings, a custom method implemented by a user)

Each submenu should have an implicit help method which lists all available commands in the subtree.

Additional context
I already have a PoC with some 3rd party library and I can provide the sample project. The difference is that I had to recreate the whole menu from scratch instead of using generated TcMenu code. The CLI works via serial/tty and allows me to control my device from all around the world. Since a terminal app is widely available, it works even on places where embedControl cannot be installed (e.g. no graphical terminal).

@vzahradnik
Copy link
Collaborator Author

I can also imagine using this in cases where the device has no display but it could still use TcMenu, the same way as many network devices like routers operate.

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

No branches or pull requests

1 participant