silkaj issueshttps://git.duniter.org/clients/python/silkaj/-/issues2024-03-14T15:09:31+01:00https://git.duniter.org/clients/python/silkaj/-/issues/18Use a Terminal based and/or Graphical user interface2024-03-14T15:09:31+01:00MoulUse a Terminal based and/or Graphical user interfaceCurrently 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 ...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))).
#### 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)
### Web framework
- [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 console0.30.0https://git.duniter.org/clients/python/silkaj/-/issues/265Introduce a translation i18n system: gettext2022-10-31T10:47:46+01:00MoulIntroduce a translation i18n system: gettextCheck [Babel](https://babel.pocoo.org/en/latest/)
I am confident [`gettext`](https://docs.python.org/3/library/gettext.html) is the lib to go with, because:
- it is a standard library (into Python)
- [YunoHost project is thinking about...Check [Babel](https://babel.pocoo.org/en/latest/)
I am confident [`gettext`](https://docs.python.org/3/library/gettext.html) is the lib to go with, because:
- it is a standard library (into Python)
- [YunoHost project is thinking about migrating to `gettext`](https://github.com/YunoHost/issues/issues/788) with multiple advantages over their `m18n` solution.
---
- [toturial](https://www.mattlayman.com/blog/2015/i18n/)
- [Python documentation about i18n](https://docs.python.org/3/library/i18n.html)
---
### Some readings
- [A complete guide to i18n in Python](https://www.mattlayman.com/blog/2015/i18n/)
- [`gettext` module](https://docs.python.org/3/library/gettext.html)
- [`i18n` module](https://docs.python.org/3/library/i18n.html)Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/119Improve confirmation message display2022-03-29T11:05:29+02:00MoulImprove confirmation message displaySimplify confirmation message as now there is a recap chart before sending a transaction:
- this is intermediary tx which are displayed to give an idea how tx have been sent.
Try to find a better way to present the output of sent trans...Simplify confirmation message as now there is a recap chart before sending a transaction:
- this is intermediary tx which are displayed to give an idea how tx have been sent.
Try to find a better way to present the output of sent transactions.Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/258Implement CSV, JSON, YAML, XML, SQL output formats2021-04-22T12:04:16+02:00matograineImplement CSV, JSON, YAML, XML, SQL output formatsCreate `--format=<format>` options, to get the result as script-readable into following formats:
- [ ] `csv`
- [ ] `json`
- [ ] `yaml`
- [ ] `xml`
- [ ] `sql`
### Commands
- [ ] `history`
- [ ] `wot`
- …Create `--format=<format>` options, to get the result as script-readable into following formats:
- [ ] `csv`
- [ ] `json`
- [ ] `yaml`
- [ ] `xml`
- [ ] `sql`
### Commands
- [ ] `history`
- [ ] `wot`
- …Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/183Possible improvements thanks to Click2023-06-28T17:35:33+02:00MoulPossible improvements thanks to ClickFollows #77:
- [ ] #173: Rename `--auth-seed/--seed` to `--auth-seedhex/--seedhex` in order to allow possible `--seed` authentication later on?
- [ ] add examples like in pipenv/poetry.
- [ ] Use [Context default](https://click.palletsp...Follows #77:
- [ ] #173: Rename `--auth-seed/--seed` to `--auth-seedhex/--seedhex` in order to allow possible `--seed` authentication later on?
- [ ] add examples like in pipenv/poetry.
- [ ] Use [Context default](https://click.palletsprojects.com/en/7.x/commands/#context-defaults) for Ğ1 and ĞTest endpoints?
- [ ] Use `@pass_obj` decorator instead of `@pass_context`
- [ ] [Promt and confirmation](https://click.palletsprojects.com/en/7.x/prompts/) (auth, tx/cert confirmation, license)
- [ ] Use [`echo()`](https://click.palletsprojects.com/en/7.x/utils/#printing-to-stdout) rather than `print()` to make it work on Windows and to be able to print `ANSI` colours later on.
- [ ] [Pager support](https://click.palletsprojects.com/en/7.x/utils/#pager-support):
- [ ] blocks
- [x] tx history
- [ ] [Screen clearing](https://click.palletsprojects.com/en/7.x/utils/#screen-clearing)
- [ ] [Editor](https://click.palletsprojects.com/en/7.x/utils/#launching-editors) for configuration #79
- [ ] [Application folder](https://click.palletsprojects.com/en/7.x/utils/#finding-application-folders): for configuration storage and authfiles
- [ ] [Launch app](https://click.palletsprojects.com/en/7.x/utils/#launching-applications): could replace `webbrowser`
- [ ] [Progress bar](https://click.palletsprojects.com/en/7.x/utils/#showing-progress-bars): `history`, `net`, `blocks`, and `verify` (#262) commands
- [ ] [auth-file/conf file](https://click.palletsprojects.com/en/7.x/arguments/#file-path-arguments) reading/writting
- [ ] `license` cmd: language and display mean choice as argument/option
- [ ] `balance`: cumulate auth-file and pubkeys passed as arguments? How to handle conflict (same resulting pubkey), not handled as currently passing twice same pubkey as argument?
- [ ] Add [aliases](https://click.palletsprojects.com/en/7.x/advanced/#command-aliases)
- [ ] [Password prompt](https://click.palletsprojects.com/en/7.x/options/#password-prompts): take care that we shouldn’t be able to pass the value with `--password`.
## Done
- [x] #154: [terminal size](https://click.palletsprojects.com/en/7.x/api/#click.get_terminal_size)
- [x] #469+
- [x] #419+Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/124Convert OrderedDict to dict2022-06-28T18:36:20+02:00MoulConvert OrderedDict to dict- https://linuxfr.org/news/sortie-de-python-3-7#toc-ordre-dinsertion-dans-les-dictionnaires
- https://docs.python.org/3.6/whatsnew/3.6.html#new-dict-implementation
- Requires Python version ≥ 3.6- https://linuxfr.org/news/sortie-de-python-3-7#toc-ordre-dinsertion-dans-les-dictionnaires
- https://docs.python.org/3.6/whatsnew/3.6.html#new-dict-implementation
- Requires Python version ≥ 3.6Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/204Display progress bar for long time commands2022-03-16T09:21:42+01:00MoulDisplay progress bar for long time commandsClick progress bar as for `verify` command:
- `blocks`
- `net` (for its rewrite?)
---
- [Click-spinner](https://github.com/click-contrib/click-spinner)
- Not available in Distributions: Debian, Fedora, Arch.Click progress bar as for `verify` command:
- `blocks`
- `net` (for its rewrite?)
---
- [Click-spinner](https://github.com/click-contrib/click-spinner)
- Not available in Distributions: Debian, Fedora, Arch.Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/324change "lookup" command to "check" command and display more info2021-04-07T16:11:02+02:00matograinechange "lookup" command to "check" command and display more infoA "check" function would be useful, instead of "id", to display more info :
`check <pubkey>` gives :
* identity is it is a member account
* identity status (pool/BC)
* \<pubkey>:\<checksum>
* "virgin" wallet (with or without in/out txs)...A "check" function would be useful, instead of "id", to display more info :
`check <pubkey>` gives :
* identity is it is a member account
* identity status (pool/BC)
* \<pubkey>:\<checksum>
* "virgin" wallet (with or without in/out txs)
`check <pubkey>:<checksum>` gives :
* \<pubkey> if right checksum ; WRONG PUBKEY if not
* identity is it is a member account
* identity status (pool/BC)
* "virgin" wallet (with or without in/out txs)
`check <identity>` gives:
* \<pubkey> if existing identity // NON-EXISTING IDENTITY if not
* identity status (pool/BC)
* \<pubkey>:\<checksum>
* "virgin" wallet (with or without in/out txs)
For now, no Duniter client gives the pubkey + checksum, although it is a useful information.
Maybe the checksum should be displayed separately. This should be discussed.Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/387lookup: Sort identities regarding the status2021-03-31T08:31:59+02:00matograinelookup: Sort identities regarding the statusFollowing #385.
`id`/`lookup` command displays IDs without sorting them out. However, IDs can be in different states :
* member
* will member
* revoked
* sleeping (after 1 years without membership, but before automatic revoke after 2 ye...Following #385.
`id`/`lookup` command displays IDs without sorting them out. However, IDs can be in different states :
* member
* will member
* revoked
* sleeping (after 1 years without membership, but before automatic revoke after 2 years)
* non-member because not enough certifications
I think `lookup` should sort the IDs. I am not sure on how to quickly find infos for cases 4 and 5.
Result could be like this :
```
silkaj id titi
Public keys found matching 'titi':
Members:
→ 9zHLPCPwEH37wDfPpPoajt7zxP13xKFr5n9HY2CYtBEq:CPg ↔ humezlaetitia
→ 4qJZFRfArLaUMEXDhsd69unsKynEFNLFazAVij4HNsBa:F4z ↔ laetitia97421
→ 4LCdTC9QsmqbFSHAhyaqGdDCVPr8Ywu2DZ8hDCzkdx4n:8ta ↔ Amandinelaetitia
→ CehfxBHrowP6tXouR73GS52QhGAoNMtabooKbCvT7f3j:6cG ↔ Laetiti974
→ FtZdA1HzHcDG6utoEgg6R5jjXfEne2ftS2UzvXajKurp:6Sm ↔ Laetitia
Will members:
→ EUn8uLJxgc3fVXJ1fBA74re4iD4Ws8Nk2xHytX1wLMfK:AQ2 ↔ LaetitiaCarivenc
→ HqHZt9J1U7MwC3RF1bSjPgxACsTypfNjUThYFMZZfK6X:Dk1 ↔ LaetitiaHOFF
Revoked:
→ 5Vcm1zkHKoAMo9yy7Lk2HDX2Yn54agavtEUdrcFNmqkP:8mU ↔ laetitiajanot
→ BfncGdTeq8qvhPZnBaM8T76SHM9xfx78ASRNZtGp64rZ:7tP ↔ titi
Sleeping:
→ BWKuSHYojjwzAXZZxSFTf5XVWneUMZqoWGUJEfWaFRL9:21F ↔ titi43
```Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/425Introduce humanize tool2023-11-27T21:56:19+01:00MoulIntroduce humanize toolCould be use in DeathReaper (commented comment in DR code).Could be use in DeathReaper (commented comment in DR code).0.20.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/319Graphics with mathplotlib2023-05-30T16:50:36+02:00MoulGraphics with mathplotlibI am not sure on how to integrate it. Can a window pop from the CLI? Can it be integrated into a GUI lib?
List of finding links:
- https://realpython.com/python-matplotlib-guide/
- https://pypi.org/project/matplotlib/
- https://matplotl...I am not sure on how to integrate it. Can a window pop from the CLI? Can it be integrated into a GUI lib?
List of finding links:
- https://realpython.com/python-matplotlib-guide/
- https://pypi.org/project/matplotlib/
- https://matplotlib.org
- https://github.com/matplotlib/matplotlib
- https://github.com/daleroberts/itermplot
- https://pypi.org/project/terminalplot/
- https://github.com/kressi/terminalplotBackloghttps://git.duniter.org/clients/python/silkaj/-/issues/340Multiline support into the table libs2023-07-10T22:07:30+02:00MoulMultiline support into the table libsHave a look if there is multiline support into the table libs:
- `tabulate`
- `texttable`
- …
That would be useful for the `history` command (!141) and others.Have a look if there is multiline support into the table libs:
- `tabulate`
- `texttable`
- …
That would be useful for the `history` command (!141) and others.Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/440Set console interface with Textual console/TUI framework2024-01-17T15:02:33+01:00MoulSet console interface with Textual console/TUI framework- Maintain both CLI and Console interfaces using same backend
## Prerequisites
- Read documentation, tutorials, get familiar with the framework, try PoC
## Implementation
- [ ] Install `textual` and [`textual-dev`](https://github.com/...- Maintain both CLI and Console interfaces using same backend
## Prerequisites
- Read documentation, tutorials, get familiar with the framework, try PoC
## Implementation
- [ ] Install `textual` and [`textual-dev`](https://github.com/Textualize/textual-dev)
- [ ] Find a way to have substrate client passed for the CLI and Console interfaces
- [ ] Sketch the views
- [ ] Implement the interfaces
- [ ] Write tests
### Design views of the interface
- https://excalidraw.com/ ([YunoHost package of excalidraw](https://github.com/YunoHost-Apps/excalidraw_ynh))
### Testing
- [Testing How-to](https://textual.textualize.io/guide/testing/)
- [pytest-asyncio](https://pypi.org/project/pytest-asyncio/)
- [pytest-textual-snapshot](https://github.com/Textualize/pytest-textual-snapshot)
## Launcher
- [ ] Create launcher, like for Vim, Neovim, Emacs, Ranger, so it can be started from GNOME Shell for instance
## Later
- Ploting: https://github.com/Textualize/textual-plotext
---
### About Textual
- [Repository](https://github.com/Textualize/textual)
- [Website](https://textual.textualize.io/)
- [Repology](https://repology.org/badge/vertical-allrepos/python:textual.svg)
- [Textual: The Definitive Guide](https://dev.to/wiseai/textual-the-definitive-guide-part-1-1i0p)
- [CSS in the Terminal with Python and Textual](https://www.willmcgugan.com/blog/tech/post/css-in-the-terminal-with-python-and-textual/)
- [Crash course on Fedora Magazine](https://fedoramagazine.org/crash-course-on-using-textual/)
### Videos
- [A Look At – and Inside – Textual](https://www.youtube.com/watch?v=1kTWxamIJ_k)
- [Terminal magic with Rich and Textual - Talk Python Live Stream](https://www.youtube.com/watch?v=laWyjfzur28)
- [CSS within the terminal with Python and Textual](https://www.youtube.com/watch?v=bXgIj2cXaZ4)
- [Will McGugan](https://www.youtube.com/c/WillMcGugan/videos)0.20.0https://git.duniter.org/clients/python/silkaj/-/issues/467Consider trogon: turn Click CLI app into a powerful terminal app2023-06-04T19:45:25+02:00MoulConsider trogon: turn Click CLI app into a powerful terminal app- https://github.com/Textualize/trogon- https://github.com/Textualize/trogonBackloghttps://git.duniter.org/clients/python/silkaj/-/issues/468rich-codex: Automate terminal screenshot for doc2024-03-11T22:36:41+01:00Moulrich-codex: Automate terminal screenshot for doc- https://github.com/ewels/rich-codex
- https://ewels.github.io/rich-codex/- https://github.com/ewels/rich-codex
- https://ewels.github.io/rich-codex/Backloghttps://git.duniter.org/clients/python/silkaj/-/issues/471Rename transfer’s comment to reference2023-06-30T16:20:34+02:00MoulRename transfer’s comment to referenceBanks are using this term: _Payment reference_.
This is more what we are aiming for.
- [ ] Rename CLI option: `silkaj money transfer -c/--comment` −> `-ref/--reference`. `-r` is already used by `--recipient`
- [ ] Rename UI fields of `t...Banks are using this term: _Payment reference_.
This is more what we are aiming for.
- [ ] Rename CLI option: `silkaj money transfer -c/--comment` −> `-ref/--reference`. `-r` is already used by `--recipient`
- [ ] Rename UI fields of `transfer` and `history` commands
- [ ] Adapt run time code and tests. Keep it named `comment` when using DuniterPy document, that’s the interface we won’t change.Backlog