-
Notifications
You must be signed in to change notification settings - Fork 141
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
Consider deprecating in favour of "table" package #79
Comments
Cool. Does it also have truncation like cli-table? |
@stephanethomas I cannot find the definition of "truncation" in the docs beyond brief statement in the "features" section ("Text truncation based on predefined widths"). If thats a generic truncation of a string in a column, then that falls outside of the "table" formation scope. I suggest you to use a utility function to format data before using it to draw a table, e.g. That said, |
truncation with ellipsis: "this is a long sentence" would become "this is a…" |
Do you it is the responsibility of the table formation library to truncate the data? |
Not necessarily, but it is convenient and would have familiarity with cli-table. |
http://github.com/jamestalmage/cli-table2 does truncation. Also has colspan and rowspan, layouts can be as complex as you want. |
@jamestalmage cli-table2 is quite nice. If I had known about it, I'd probably skipped developing I am thinking I pushed |
@gajus Thank you! Sorry I haven't promoted it better 😞 I do make an attempt to support dynamic widths, but it is limited. There is no way to set which column takes priority if there is contention for screen width, nor a way to set a minimum for a dynamic row. |
cli-table2 needs to be cleaned up, though ;) you had said it yourself, @jameskoster |
@stevenvachon Please create an issue on https://github.com/gajus/table regarding the ability to truncate content. I will update README.md to reflect the requirement. |
@stevenvachon Here is the complete list of open |
All I know regarding code cleanliness is that #51 (comment) contains
|
V3 released:
|
Implemented streaming. |
Wow, that streaming gif is enticing. |
Implemented word wrapping, e.g. Without
with
|
Hyphenated? :) awesome work |
Does it have multi-line rows? Looking for that feature in an ascii/unicode table now... |
tty-table handles multi-line rows out of the box. It also has a drop-in adapter automattic/cli-table.
|
How exactly is this better than "table" package?
|
I have written a library for displaying data in a table.
https://github.com/gajus/table
This package implements all features of
cli-table
and addresses some of the open issues:Consider deprecating
cli-table
in favour oftable
package.The reason I choose to write a library from the ground up is because I am building something that will heavily rely on text tables and neither of the implementations (ascii-table, cli-table or text-table) met my requirements. I have looked at all the source codes. ascii-table package had the best API, but I did not feel comfortable working with a codebase using prototype inheritance, no separation of logic and minimal test coverage.
I have put a lot of thinking into how to make table package modular, easy to test, easy to contribute to and easy to extend for different use cases.
The text was updated successfully, but these errors were encountered: