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 "flow" tablefmt which doesn't do any formatting #314

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

elric1
Copy link

@elric1 elric1 commented Mar 3, 2024

This will help for programs that may have an option to simply output the data without any formatting at all. This is done by first providing defaults to TableFormat. We do this so that fields can be added without breaking the ABI. We then add two fields "align_columns" and "elide_empty_columns". The former stops padding things out to align them and this is also useful for, e.g. HTML. The latter just removes columns where all of the entries are empty. We use those two to define a TableFormat "flow" which just outputs the data joined by " " with no alignment or other formatting.

@elric1 elric1 changed the title Add "none" tablefmt which doesn't do any formatting Add "flow" tablefmt which doesn't do any formatting Mar 4, 2024
@astanin
Copy link
Owner

astanin commented Sep 26, 2024

I'm not sure what is the use case for this feature. And for occasional user it's not a big deal to have their own TableFormat outside of the module.

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

Successfully merging this pull request may close these issues.

2 participants