public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: gcc-patches@gcc.gnu.org,	David Malcolm <dmalcolm@redhat.com>
Subject: [PATCH 0/2] wwwdocs: Updates for gcc 8 changes (v2)
Date: Wed, 04 Apr 2018 17:57:00 -0000	[thread overview]
Message-ID: <1522865087-39444-1-git-send-email-dmalcolm@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.21.1803182357560.3430@anthias.pfeifer.com>

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

  parent reply	other threads:[~2018-04-04 17:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 21:33 [PATCH 0/3] wwwdocs: Updates for gcc 8 changes David Malcolm
2018-03-16 21:33 ` [PATCH 3/3] Document my gcc 8 changes for the website David Malcolm
2018-03-18 23:20   ` Gerald Pfeifer
2018-03-16 21:33 ` [PATCH 2/3] Add htdocs/ansi2html.css David Malcolm
2018-03-18 23:06   ` Gerald Pfeifer
2018-03-16 21:38 ` [PATCH 1/3] bin: add ansi2html.sh David Malcolm
2018-03-18 23:03 ` [PATCH 0/3] wwwdocs: Updates for gcc 8 changes Gerald Pfeifer
2018-03-19  0:26   ` David Malcolm
2018-04-04 17:57   ` David Malcolm [this message]
2018-04-04 17:57     ` [PATCH 1/2] wwwdocs: Add bin/gcc-color-to-html.py David Malcolm
2018-04-04 19:01       ` Gerald Pfeifer
2018-04-04 19:50         ` David Malcolm
2018-04-04 19:53           ` Gerald Pfeifer
2018-04-04 17:57     ` [committed 2/2] wwwdocs: Document my gcc 8 changes for the website (v2) David Malcolm
2018-04-04 19:02       ` Gerald Pfeifer
2018-04-04 19:24         ` David Malcolm
2018-04-04 20:04           ` Gerald Pfeifer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522865087-39444-1-git-send-email-dmalcolm@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).