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
Curses libraries
All in Debian
- blessed − doc
- urwid
- curtisies
- terminaltables
- npyscreen − Blog article
- picotui
- asciimatics
- 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.
Inspiration
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. Pitivi, (Gajim, Deluge).
GTK3+
GTK4
- Tutorial
- 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
Terminal not based on Ncurses (in Debian)
Web framework
- Flask: click-web click module, would generate forms from CLI commands and options
- Sanic
Web/Multi-platform/Android
- GUY : un module python3 pour créer des GUI multiplateforme (android aussi!)
- wuy, guy
- Kivy
-
BeeWare:
- Toga, in alpha stage, based on GTK+3, https://toga.readthedocs.io/en/latest/
- Article
- Using Python for Mobile Development: Kivy vs BeeWare
GUI from the CLI
Aioconsole
-
https://github.com/vxgmichel/aioconsoleThis is anasync
/await
Python console
Edited by Moul