On Mon, 11 Sep 2017 14:35:03 +0200 Adam Borowski <[email protected]> wrote: > Package: buildd.debian.org > Severity: wishlist > > Hi! > A lot of software colorizes their build logs. This makes reading them > massively more convenient: to find the error, instead of poring through > 20 pages of text, you wiggle the scrollbar for a second and watch for the > flash of red. > > Most such software disables colors when redirected (ie, when !isatty(1) or > [ ! -t 1 ]), but around 2% does so unconditionally, this results in raw ANSI > codes in the HTML. They should be either supported or at the very least > filtered out. > > Thus, please pipe the logs through "ansi2html -nw" (package colorized-logs). > It has an extra benefit of replacing unprintable characters, such as > backspace (replaced with ⌫)[1], unpaired \r (↵), \a (♪) or \l (<hr>). > > The package is available in stretch, jessie-backports and buster. The > version in stretch/jessie-bpo uses unmodified VGA palette which has a > downside of making bright yellow on white very hard to read (Java stuff > loves bright yellow) -- this is accurate as same happens on a real terminal > with a white background; the version in buster fudges yellow to be less > accurate and more readable. Another solution would be switching to a > on-black/on-dark scheme like Travis[3] does, but this is a matter of taste. > > If you insist for keeping strict plaintext-in-HTML, then you'd want ansi2txt > instead. > > > Meow! > > [1] It's debatable whether \b or \r should be printed or erase text; > ansi2html opts to be strictly hardcopy so no information is lost[2]. > [2] Ok, ok, you can't tell a replaced U+0007 from U+266A, but hey. > [3] I guess that upstreams look at Travis drastically more often than > at our build logs; this also explains the large uptick of colored logs.
发自我的 iPhone

