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

Add a flag to prettify output #221

Open
csjones opened this issue Aug 23, 2020 · 0 comments
Open

Add a flag to prettify output #221

csjones opened this issue Aug 23, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@csjones
Copy link
Contributor

csjones commented Aug 23, 2020

🗣 Context

When outputting with the format --csv, --json, or --yaml

💬 Narrative

As a user
I want the command output to be easily parsable by me
So that I can quickly debug a command result

📝 Notes

Idea originates from #220 where it was discussed to have output of all commands is parsable by default.

🎨 Design

Provide design example, screenshot, text input/output etc

asc certificates list --json

{"example":{"sample":[{"example":"sample","random_value":8.95}]}}

asc certificates list --pretty --json

{
   "example":{
      "sample":[
         {
            "example":"sample",
            "random_value":8.95
         }
      ]
   }
}

asc certificates list --csv

CERT,DATESMPL,EXAMPLE,SAMPLE
M109UYTGSF007,08/01/2020 13:51:00,true,false
M109UYTGSF007,08/02/2020 13:56:01,false,false
M109UYTGSF007,08/03/2020 13:55:02,false,false
M109UYTGSF007,08/04/2020 13:54:03,true,true
M109UYTGSF007,08/05/2020 13:55:04,false,true

asc certificates list --pretty --csv

    CERT               DATESMPL            EXAMPLE     SAMPLE
M109UYTGSF007    08/01/2020 13:51:00         true       false
M109UYTGSF007    08/02/2020 13:56:01        false       false
M109UYTGSF007    08/03/2020 13:55:02        false       false
M109UYTGSF007    08/04/2020 13:54:03         true        true
M109UYTGSF007    08/05/2020 13:55:04        false        true

✅ Acceptance Criteria

GIVEN there is output that can be prettified with a command
WHEN the command is executed with --pretty
THEN the output is formatted for easy readability

🚫 Out of Scope

The scope making command output pretty is limited to --csv, --json, or --yaml.

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

No branches or pull requests

2 participants