Open NewUserHa opened 2 years ago
I may add an option to tabulate which allows to specify a custom formatter function for all or some values. In your case you would be able to supply a function which shortens strings.
Would it work for you?
Related: #170
the most common cases may be ...
that .shorten
provided. the other left may need a custom function I guess
for a table that contains only a few lines that have very long text, like:
to
since https://github.com/astanin/python-tabulate#automating-multilines already uses https://docs.python.org/3/library/textwrap.html#textwrap.wrap, probably could use https://docs.python.org/3/library/textwrap.html#textwrap.shorten?