[Dirvish] Mailed reports from Dirvish: columns don't fit

Rolf-Werner Eilert eilert-sprachen at t-online.de
Mon Oct 4 07:07:56 UTC 2010

Am 29.09.2010 11:40, schrieb Dave Howorth:
> Rolf-Werner Eilert wrote:
>> This is certainly not a major bug in Dirvish, but it's somewhat... you
>> know :-)
>> When Dirvish makes a report and sends it via mail to me, the columns
>> aren't straight, i. e. the number of whitespaces in the head of the
>> "table" doesn't correspond to the number of signs produced in the lines
>> underneath.
> Dirvish does try to align the columns but your VAULT:BRANCH names are
> longer than it expects, as are mine :(
> If you care then you could modify dirvish-expire to expect longer names.
> Look at lines 144 and 166 where it shows "%-15s %-15s %-16.16s  %s\n".
> Change the first 15 to something larger (18 would be sufficient for the
> example you showed, I believe).
> Of course it would be better if there were just a single format string
> shared between the two lines and some kind of automatic scheme would be
> even better, but then there are other possibilities as well. How about
> tabs as separators, or formatting the report in XML :)
> Another possibility, if you don't want to change dirvish-expire, is to
> post-process the output with a little script.
> Cheers, Dave

Thank you, Dave, for the ideas. To make things easy, I changed the two 
lines in dirvish-expire. Tomorrow morning we'll know the result :-)

Tabs would be nice, but can lead to unstraight columns as well. A 
table-like thing in XML would be nice, but then the mail output would 
have to be interpreted.

I like the idea with the script, too. However, you would have to fiddle 
around the mbox file... Or does dirvish-expire write the output into 
some temp-file? Didn't find any hint in the code about this, but again, 
I don't know much about Perl.



More information about the Dirvish mailing list