woefe / ytcc

Command line tool to keep track of your favorite playlists on YouTube and many other places.
GNU General Public License v3.0
178 stars 20 forks source link

Truncate long titles #91

Closed zoidby closed 3 years ago

zoidby commented 3 years ago

Videos sometimes come with very long titles so that the tui-table exceeds the width of the terminal. This in turn leads to line breaks which make the interface messy. Please see this screenshot for example: screenshot--2021-05-30--17-35-49

The ideal solution would be to have a line break only in the single cell, that exceeds the limit.

But i guess that could be to much to implement. Truncating the title (and maybe putting … to indicate it) so that the whole row will never be longer than the term width would be sufficient as well.

woefe commented 3 years ago

Yes, I agree. I thought about multiline tables a while back, but I couldn't find an easy way to do it.

Instead, I have now implemented the truncating of long lines. It still needs some work. See #92