Use a Terminal based and/or Graphical user interface
Currently silkaj is using dirty one-shot `os.system("clear")` then `texttable` libs to display charts. It's not possible to sort lines and to keep open all this charts. It could also be possible to see evolving charts. Silkaj could be a multiple user interface client. Silkaj would stay a CLI client. Then, I would preferably go first for a console/TUI client using `textual`/`blessed`, then a GUI client using `PyGObject`/`GTK4`. We could have three modes with different features depending on the interface: - `silkaj-cli` - `silkaj-console/tui` - `silkaj-gtk/gui` --- ### TUI - #440+ #### Curses libraries > All in Debian - [blessed](https://github.com/jquast/blessed) − [doc](https://blessed.readthedocs.io/en/stable/index.html) - [urwid](https://github.com/urwid/urwid) - [curtisies](https://github.com/thomasballinger/curtsies) - [terminaltables](https://github.com/Robpol86/terminaltables) - [npyscreen](https://pypi.org/project/npyscreen/) − [Blog article](https://medium.com/@ValTron/create-tui-on-python-71377849879d) - [picotui](https://github.com/pfalcon/picotui) - [asciimatics](https://github.com/peterbrittain/asciimatics) - [bitcoind-ncurses2](https://github.com/esotericnonsense/bitcoind-ncurses2) #### Curses To do so, I suggest to use `curses` lib. We could takes example and use curses lib used on XMPP console client [Poezio](https://poez.io). - [(es) Prez](https://www.youtube.com/watch?v=CoWmLJVtTQs) #### Inspiration - [Ranger](https://github.com/ranger/ranger/tree/master/ranger/gui) - [Poezio](https://lab.louiz.org/poezio/poezio/-/tree/master/poezio/ui) --- ### GTK/PyGObject - https://pygobject.readthedocs.io/en/latest/ - https://rafaelmardojai.pages.gitlab.gnome.org/pygobject-guide/gtk4.html - https://www.bassi.io/articles/2022/12/02/on-pygobject/ - https://www.gtk.org/ - Could also be a solution, but it would need lots of work. - Could be a nice way to have it on the Librem 5/PinePhone - Modern Python applications which uses Python3/GTK+3: [Lollypop](https://wiki.gnome.org/Apps/Lollypop). [Pitivi](https://en.wikipedia.org/wiki/Pitivi), ([Gajim](https://en.wikipedia.org/wiki/Gajim), [Deluge](https://en.wikipedia.org/wiki/Deluge_(software))). - [Cambalache: tool to build GTK interface](https://www.phoronix.com/news/Cambalache-1.0-GTK-UIs) #### GTK3+ - [pgi API](https://lazka.github.io/pgi-docs/) - [Python GTK3 Tutorial](https://python-gtk-3-tutorial.readthedocs.io/en/latest/) #### GTK4 - [Tutorial](https://belmoussaoui.com/article/5-how-to-create-a-gtk-application-using-python-part-1) - [The Simplicity of Making Librem 5 Apps](https://puri.sm/posts/the-simplicity-of-making-librem-5-apps/) - https://github.com/ToshioCP/Gobject-tutorial - https://github.com/ToshioCP/Gtk4-tutorial - https://bestofcpp.com/repo/ToshioCP-Gtk4-tutorial - http://ssalewski.de/gtkprogramming.html - https://docs.gtk.org/gtk4/getting_started.html #### Slint - https://github.com/slint-ui/slint/ - https://slint.dev/ - v1.5.0 adds Python API support - Rust based - Multiple platforms native: web, Android, … --- ### GUI Desktop frameworks - https://www.analyticsindiamag.com/8-python-gui-frameworks-for-developers/ ### Terminal not based on Ncurses (in Debian) - [python-prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) - [DearPyGui](https://github.com/hoffstadt/DearPyGui) - [imgui](https://github.com/ocornut/imgui/wiki/Bindings#python) ### Web framework - [NiceGUI](https://nicegui.io/) - [Flask](https://github.com/pallets/flask): [click-web click module](https://github.com/fredrik-corneliusson/click-web), would generate forms from CLI commands and options - [Sanic](https://github.com/huge-success/sanic) ### Web/Multi-platform/Android - [GUY : un module python3 pour créer des GUI multiplateforme (android aussi!)](https://linuxfr.org/users/manatlan/journaux/guy-un-module-python3-pour-creer-des-gui-multiplateforme-android-aussi) - [wuy](https://github.com/manatlan/wuy), [guy](https://github.com/manatlan/guy) - [Kivy](https://kivy.org/#home) - [BeeWare](https://beeware.org/): - [Toga](https://github.com/beeware/toga), in alpha stage, based on GTK+3, https://toga.readthedocs.io/en/latest/ - [Article](https://pyfound.blogspot.com/2020/05/cpython-on-mobile-platforms.html) - [Using Python for Mobile Development: Kivy vs BeeWare](https://dbader.org/blog/python-mobile-development-kivy-vs-beeware) ### GUI from the CLI - [Gooey](https://github.com/chriskiehl/Gooey) ### ~~Aioconsole~~ - ~~https://github.com/vxgmichel/aioconsole~~ This is an `async`/`await` Python console
issue