WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Ack! The Xen Interfaces web page is making me blind!

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Ack! The Xen Interfaces web page is making me blind!
From: Randy Thelen <rthelen@xxxxxxxxxx>
Date: Tue, 28 Feb 2006 00:50:15 -0800
Delivery-date: Tue, 28 Feb 2006 08:50:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Folks --

I've been squinting at the Developer Manual for too damn long. I built a perl script for fixing, what I believe, to be a bug in the HTML for the Xen interfaces documentation web page.

The problem, as I see it, is the abundance of <FONT SIZE="-2"> ... </ FONT> tags lying around. They begin to affect text at section 4.1.3:

http://www.cl.cam.ac.uk/Research/SRG/netos/xen/readmes/interface/ interface.html#SECTION00513000000000000000

The script I wrote carefully removes all the offending tags and makes, in my humble opinion, a much more readable version of the web page.

Here's the Perl script I wrote to perform the work:

$ cat stripfont-2.pl
#!/usr/bin/perl -w
use strict;

undef $/;  # Enter "file slurp" mode

$_ = <>;   # Read entire file

s{ <FONT\ SIZE="-2">           # Start at an opening <FONT> tag.
       (                       # Keep track of the stuff in between.
         (
[^<] | # Either the segment doesn't begin with an angle bracket, or </?A[^>]*> | # ... it does and it's an anchor tag (opening or closing)
           <BR>             |  # ... it's a simple break.
           </?(TT|I|B|EM)>     # ... it's an opening or closing tag.
          )*                   # Collect them all
        )
    </FONT>                    # Up to </FONT>
}{$1}gix; # Replace with the stuff between the opening/closing FONT tags.

print $_;                      # Output the results

Ideally, "the web admin" would run this script on the Xen interfaces .html for us. Else, the version of the .html with the the font tags stripped can be found here:

http://www.madscientistroom.org/xen-interface2.html

The stripfont-2.pl script can be found here:

http://www.madscientistroom.org/stripfont-2.pl

I ran the above script with the following command line:

$ cat xen-interface.html | ./stripfont-2.pl > xen-interface2.html

Incidentally, the PDF file is fine.

-- Randy

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Ack! The Xen Interfaces web page is making me blind!, Randy Thelen <=