Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Use prettytable in CLI #9195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

FirelightFlagboy
Copy link
Contributor

@FirelightFlagboy FirelightFlagboy commented Dec 13, 2024

Goes from:

02ff2c07042dd5bde23fe108b048f76f        cancelled       user (email=[redacted]
801167da3548c3f4613235528f6399f3        finished        device
7b9bbc4c33fa062a8e297b73b8a472ed        finished        device
b258fca310f2305c10abb3c42dca4906        finished        user (email=[redacted]
f1e0c71d31c1dec07699b0e06b2fa8c2        cancelled       user (email=[redacted]

To

+----------------------------------+-----------+--------+------------+
| Invitation token                 | Status    | Type   | Email      |
+==================================+===========+========+============+
| 02ff2c07042dd5bde23fe108b048f76f | cancelled | user   | [redacted] |
+----------------------------------+-----------+--------+------------+
| 801167da3548c3f4613235528f6399f3 | finished  | device |            |
+----------------------------------+-----------+--------+------------+
| 7b9bbc4c33fa062a8e297b73b8a472ed | finished  | device |            |
+----------------------------------+-----------+--------+------------+
| b258fca310f2305c10abb3c42dca4906 | finished  | user   | [redacted] |
+----------------------------------+-----------+--------+------------+
| f1e0c71d31c1dec07699b0e06b2fa8c2 | cancelled | user   | [redacted] |
+----------------------------------+-----------+--------+------------+

Or in csv format:

Invitation token,Status,Type,Email
02ff2c07042dd5bde23fe108b048f76f,cancelled,user,[redacted]
801167da3548c3f4613235528f6399f3,finished,device,
7b9bbc4c33fa062a8e297b73b8a472ed,finished,device,
b258fca310f2305c10abb3c42dca4906,finished,user,[redacted]
f1e0c71d31c1dec07699b0e06b2fa8c2,cancelled,user,[redacted]

@FirelightFlagboy FirelightFlagboy requested a review from a team as a code owner December 13, 2024 10:44
Goes from:

```
02ff2c07042dd5bde23fe108b048f76f        cancelled       user (email=[redacted]
801167da3548c3f4613235528f6399f3        finished        device
7b9bbc4c33fa062a8e297b73b8a472ed        finished        device
b258fca310f2305c10abb3c42dca4906        finished        user (email=[redacted]
f1e0c71d31c1dec07699b0e06b2fa8c2        cancelled       user (email=[redacted]
```

To

```
+----------------------------------+-----------+--------+------------+
| Invitation token                 | Status    | Type   | Email      |
+==================================+===========+========+============+
| 02ff2c07042dd5bde23fe108b048f76f | cancelled | user   | [redacted] |
+----------------------------------+-----------+--------+------------+
| 801167da3548c3f4613235528f6399f3 | finished  | device |            |
+----------------------------------+-----------+--------+------------+
| 7b9bbc4c33fa062a8e297b73b8a472ed | finished  | device |            |
+----------------------------------+-----------+--------+------------+
| b258fca310f2305c10abb3c42dca4906 | finished  | user   | [redacted] |
+----------------------------------+-----------+--------+------------+
| f1e0c71d31c1dec07699b0e06b2fa8c2 | cancelled | user   | [redacted] |
+----------------------------------+-----------+--------+------------+
```

Or in csv format:

```
Invitation token,Status,Type,Email
02ff2c07042dd5bde23fe108b048f76f,cancelled,user,[redacted]
801167da3548c3f4613235528f6399f3,finished,device,
7b9bbc4c33fa062a8e297b73b8a472ed,finished,device,
b258fca310f2305c10abb3c42dca4906,finished,user,[redacted]
f1e0c71d31c1dec07699b0e06b2fa8c2,cancelled,user,[redacted]
```
Copy link
Contributor

@AureliaDolo AureliaDolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nice !

Are they other place where this output could be useful ?

It's surely because I'm working on it but maybe the shared recovery info and list would benefit from that kind of (maybe optional) display.

@touilleMan
Copy link
Member

I'm really not convinced by this:

  • It adds yet another dependency, which seems dead (no change in 2 years), which alors relies on a dead dependency (dirs-next, not updated in 2 years )
  • CSV format is obviously not meant for readability, it seems we are trying to add more features "just because we can". YAGNI
  • It is questionable in which way the output is more readable. I would say adding color is a much MUCH bigger improvement in term of readability than framing the result in a ASCII table (see Parsec v2 CLI for instance)

Copy link
Member

@touilleMan touilleMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment #9195 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CLI] Improve display when listing invitation
3 participants