iotempower icon indicating copy to clipboard operation
iotempower copied to clipboard

New iot menu or even default shell as user menu evtl. in python

Open ulno opened this issue 2 years ago • 3 comments

The iot menu is quite popular, so we should think if we could do everything command line based with it (maybe offer simple shell escape right on front page). I also don't like that it is written in java script. There exists a prototype in python using prompt_toolkit in bin - after adding prompt_toolkit with pip install prompt_toolkit (inside of the it environment), you can test it with:

cd "$HOME/iot/bin"
python user_menu-python.py

However it was once very slow on the pi, should be tested on pi and pi zero.

Maybe also consider switch to textual (https://github.com/Textualize/textual) or something golang (https://github.com/rivo/tview) based?

This should probably lead to a new general TUI (text UI) affecting all commands.

ulno avatar Apr 21 '24 08:04 ulno

estimate [ulno]: 160h

ulno avatar Apr 21 '24 13:04 ulno

https://github.com/Textualize/textual looks promising! image Feels almost like a full docs page running in the CLI - in fact Textual references Frogmouth for visualising markdown from terminal in addition with directly mentioning SBC friendliness. So, it might replace/mirror web_starter? Two things to ensure are in sync + man pages using the same .rst docs. Guess it might be something like: punch in iot then this textual/frogmouth page pops up in terminal, simultaneously starting mqtt & web_starter, but also showing both indicated started (like a dashboard)?

mbz4 avatar Apr 22 '24 11:04 mbz4

There are also some options in Go available like tview or something like BubbleTea. Go can be an asset if there is need for fast and lean executables, it can crosscompile for numerous platforms including Pi's and Pi zeros etc. and no need for python libs install.

stenoe avatar Apr 22 '24 14:04 stenoe