iotempire / iotempower

IoTempower is a framework and environment for making the Internet of Things (IoT) accessible for everyone
MIT License
24 stars 21 forks source link

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

Open ulno opened 6 months ago

ulno commented 6 months ago

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 commented 6 months ago

estimate [ulno]: 160h

mbz4 commented 6 months ago

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)?

stenoe commented 6 months ago

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.