timewarrior icon indicating copy to clipboard operation
timewarrior copied to clipboard

Wrap annotations in summary

Open varac opened this issue 6 years ago • 2 comments

Please wrap the annotation into multiple colums, otherwise it doesn't make too much sense if you can't read it in the summary:

 timew summary :annotations :id oas    

Wk Date       Day ID Tags      Annotation        Start     End    Time   Total
W6 2019-02-07 Thu @1 +123, oas Working my a... 0:31:51 0:32:50 0:00:59 0:00:59
                                                                              
                                                                       0:00:59

i.e. like this:

 timew summary :annotations :id oas    

Wk Date       Day ID Tags      Annotation        Start     End    Time   Total
W6 2019-02-07 Thu @1 +123, oas Working my ass  0:31:51 0:32:50 0:00:59 0:00:59
                               off after an al-
                               ready long day                     
                                                                       0:00:59

varac avatar Feb 06 '19 23:02 varac

While you are at it, it will also be useful to allow the summary report to be wider. This will be very useful if the report contains more or longer fields as shown above (numerous tags and annotations).

Perhaps this relates to all timew output which might be premised on a standard screen width.

A wider screen width (or report width) preference could be specified in timewarrior.cfg.

grovesteyn avatar Jan 21 '20 07:01 grovesteyn

@grovesteyn You write that you can configure this in timewarrior.cfg, but how? Unfortunately the documentation is very poor and I can't find anything at all. What do I have to enter in the config so that the column width of the annotation becomes wider with the "summary" command?

CreativeLibre avatar Sep 27 '22 10:09 CreativeLibre

@grovesteyn You write that you can configure this in timewarrior.cfg, but how?

Currently, the maximum length of 15 chars for the annotations column in the summary is hard-coded and can't be configured.

(I believe @grovesteyn was proposing one possible way to change the configuration (by saying "could be specified in timewarrior.cfg"), and not referring to something that is already implemented.)

Making the annotations column length in summary configurable seems to be a fairly simple change, I wonder whether author(s) would be interested in a patch and, in such case, whether they have any concerns that should be taken care of in implementation proposals.

drebs avatar Apr 29 '23 10:04 drebs

I'd be happy if a PR making the maximum width of the annotations column configurable would also take unicode character widths into account (see https://github.com/GothenburgBitFactory/timewarrior/pull/529#issuecomment-1508193650).

A more complete solution (apart from wrapping) would be to let the annotations column width grow until the summary table hits the terminal width an only then to apply the cut off. 🤔 (Currently, the summary table width is fixed to 1024 characters.)

lauft avatar May 02 '23 20:05 lauft

Version 1.6.0-dev and onward now wrap the annotation column in the summary table. Timewarrior - Summary Table

The table (maximum) width is also no longer hardcoded/fixed, but set to the current width of the terminal.

lauft avatar Oct 31 '23 10:10 lauft