On Mon, 2018-03-19 at 00:02 +0100, Gerald Pfeifer wrote: > Hi David, > > On Fri, 16 Mar 2018, David Malcolm wrote: > > This patch kit is for the website; I generated it against a local > > git mirror of the CVS repo. > > > > It adds lots of examples of colorized output from GCC, which > > I generated using ansi2html.sh, an LGPLv2 script for turning ANSI > > color codes into HTML spans. It also emits a .css file for mapping > > the span classes into HTML colorization. > > do we really need to import ansi2html.sh here? It's only supposed > to be used once, to generate the CSS file, I think, or do you expect > to be further use? > > As for the CSS, have you considered using more meaningful class names > instead of those color codes (most of which aren't actually used in > your patch to the website)? I guess I'm really wondering about two > things: > > (a) Can we only introduce those styles we actually use?, and > > (b) The question on class names. > > (I can see that you possibly may want to keep the names as is, but > in that case, could we prune and only keep what we use?) > > Gerald
Thanks for the review. I reworked things to avoid using ansi2html.sh and the new .css file Instead, I wrote a Python 3 script (gcc-color-to-html.py) that "knows" how to convert the various SGR codes used in GCC's diagnostic-color.c into HTML spans that reuse our existing gcc.css. I had to add a few entries to gcc.css to match diagnostic-color.c Here's an updated version of the patches. David Malcolm (2): Add bin/gcc-color-to-html.py Document my gcc 8 changes for the website (v2) bin/gcc-color-to-html.py | 98 +++++++++++++++++ htdocs/gcc-8/changes.html | 263 +++++++++++++++++++++++++++++++++++++++++++++- htdocs/gcc.css | 5 + 3 files changed, 365 insertions(+), 1 deletion(-) create mode 100755 bin/gcc-color-to-html.py -- 1.8.5.3