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

Single, universal function for printing outputs #168

Open
tdviet opened this issue Sep 19, 2022 · 0 comments
Open

Single, universal function for printing outputs #168

tdviet opened this issue Sep 19, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@tdviet
Copy link
Owner

tdviet commented Sep 19, 2022

The outputs are printed by every command separately. It would be easier for maintaining to have a single place for printing output.

The function print_output(output_data, format, delimiter, template_string) where output_data could be a dict or list of dicts, and format could be table, csv, JSON, YAML, env (format for environment variables), value (values only), template (see #167). When printing in csv format, the user can define custom delimiter, e.g. tab instead of comma. More formats could be added easily as we have all printing in single place.

@tdviet tdviet added the enhancement New feature or request label Sep 19, 2022
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

1 participant