From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11002 invoked by alias); 23 Apr 2018 16:55:53 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10988 invoked by uid 89); 23 Apr 2018 16:55:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=href, httpequiv, http-equiv, sick X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Apr 2018 16:55:50 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 48C023182F28; Mon, 23 Apr 2018 16:55:49 +0000 (UTC) Received: from ovpn-117-63.phx2.redhat.com (ovpn-117-63.phx2.redhat.com [10.3.117.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACEED5C20D; Mon, 23 Apr 2018 16:55:48 +0000 (UTC) Message-ID: <1524502548.5688.181.camel@redhat.com> Subject: Re: style of code examples in changes.html From: David Malcolm To: Martin Sebor , Gerald Pfeifer , GCC Mailing List Date: Mon, 23 Apr 2018 18:35:00 -0000 In-Reply-To: <5b1c9631-4dc1-8d44-0863-f2ddedda33e1@gmail.com> References: <5b1c9631-4dc1-8d44-0863-f2ddedda33e1@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00142.txt.bz2 On Mon, 2018-04-16 at 20:34 -0600, Martin Sebor wrote: > Hi David & Gerald, (sorry for the late response; I was offline on vacation last week) > I noticed that the coding examples in the updates I committed > to changes.html use a different formatting style than David's. > I just copied mine from GCC 7 changes.html, and those I copied > from David's for that version :) There are at least two kinds of example in the website: (a) source code examples, and (b) "screenshots" of gcc output, which can themselves contain code output as part of a diagnostic. I got sick of hand-converting (b) to our HTML tags, so I wrote a script to do it, which I used for my gcc-8/changes.html. The script is in the website's CVS repository as: bin/gcc-color-to-html.py and can be run like this: LANG=C \ gcc $@ \ -fdiagnostics-color=always 2>&1 \ | ./bin/gcc-color-to-html.py See https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00186.html I also added a
  
around the output, though this isn't done by the above script. I actually had a fair bit more scripting than this, based on the scripting I did for my blogpost here: https://github.com/davidmalcolm/gcc-8-blogpost/blob/master/blog.html.in where lines like: INVOKE_GCC unclosed.c in a foo.html.in get turned into a "screenshot" of the pertinent gcc invocation in the foo.html. But given that we don't want to require running gcc itself to build the website (and indeed, specific gcc versions), I just used this to generate the patch. > Should we make an effort to > make them all look the same? Naturally, for (b), I favor the new style I used :) (using the black background, which may be enough to get the same look). I'm not sure if we want to use it for (a). > FWIW, I didn't notice the difference until my changes published. > I'm guessing that's because the style sheet the page uses isn't > referenced from the original document and the reference is only > added by Gerald's script. Is there a simple way to set things > up so we can see our changes as they will appear when published? I've been adding these lines to the of the page: while testing the content. Hope this is helpful Dave