On Wed, 2018-04-04 at 21:01 +0200, Gerald Pfeifer wrote: > On Wed, 4 Apr 2018, David Malcolm wrote: > > Here's the new script I've been using for converting from > > diagnostic-color.c output to HTML spans that use gcc.css, > > via something like: > > > > LANG=C gcc $@ -fdiagnostics-color=always 2>&1 > > | ./bin/gcc-color-to-html.py > > > > The script converts SGR_SEQ(COLOR_BOLD) to a > > <span class="bold"> > > rather than > > <b> > > so that it can use > > </span> > > for all SGR_RESET, without needing to track the nesting. > > > > OK to commit to the website (for reference)? > > Oh, yes! > > Really nice.
Thanks. > (You may want to identify yourself as the author, "Contributed by > David Malcolm, and would you like to contribute as "Copyright (C) > 2018 Free Software Foundation, Inc."? Full GPL may be a bit of > overkill, but of course also a good option.) I've committed it to CVS, with the following changes: bin/gcc-color-to-html.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/bin/gcc-color-to-html.py b/bin/gcc-color-to-html.py index 160d345..0d97ead 100755 --- a/bin/gcc-color-to-html.py +++ b/bin/gcc-color-to-html.py @@ -1,4 +1,23 @@ #!/usr/bin/python3 +# +# Copyright (C) 2018 Free Software Foundation, Inc. +# +# Contributed by David Malcolm +# +# GCC is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 3, or (at your option) any later +# version. +# +# GCC is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# <http://www.gnu.org/licenses/>. + import html import re import sys -- 1.8.5.3