List:Commits« Previous MessageNext Message »
From:mcbrown Date:September 11 2006 12:15pm
Subject:svn commit - mysqldoc@docsrva: r3313 - in trunk: refman-5.1 tools xsl.d
View as plain text  
Author: mcbrown
Date: 2006-09-11 14:15:44 +0200 (Mon, 11 Sep 2006)
New Revision: 3313

Log:
Adding a new CSS for MySQL pages into the main tree, so that we can use it in all documents, not just the reference manual

Fixes/improvements to deep=check.pl: 

 - We no longer check the width of <programlisting> elements by default, but you can force it by running 
   deep-check.pl directly with the --checkwidth command line option
 - You can also specify the line length to check; default is 72. Set the line length with
   --linelength=80
 - We no longer check for local images (on the filesystem, but not in the manual). You can force
   check on the command line by using --checkimages

Minor tweaks to the formatting of the C/J chapter.



Added:
   trunk/xsl.d/mysql-html.css
Modified:
   trunk/refman-5.1/connector-j.xml
   trunk/tools/deep-check.pl


Modified: trunk/refman-5.1/connector-j.xml
===================================================================
--- trunk/refman-5.1/connector-j.xml	2006-09-10 06:52:19 UTC (rev 3312)
+++ trunk/refman-5.1/connector-j.xml	2006-09-11 12:15:44 UTC (rev 3313)
Changed blocks: 1, Lines Added: 1, Lines Deleted: 1; 587 bytes

@@ -2699,7 +2699,7 @@
         automatically detected from the server configuration, or could
         be configured by the user through the
         <parameter>useUnicode</parameter> and
-        "<parameter>characterEncoding</parameter>" properties.
+        <parameter>characterEncoding</parameter> properties.
       </para>
 
       <para>


Modified: trunk/tools/deep-check.pl
===================================================================
--- trunk/tools/deep-check.pl	2006-09-10 06:52:19 UTC (rev 3312)
+++ trunk/tools/deep-check.pl	2006-09-11 12:15:44 UTC (rev 3313)
Changed blocks: 4, Lines Added: 32, Lines Deleted: 13; 2801 bytes

@@ -7,15 +7,28 @@
 # - Checks table column definition/actual columns
 # - Checks width of columns equal 100%
 # - Checks images (defined and local filesystem)
+#   Only reports filesystem images with --checkimages
 # - Checks section IDs (duplicates)
-# - Checks line length of <programlisting> elements (disabled)
+# - Checks line length of <programlisting> elements 
+#   Now enabled with --checkwidth
+#   Set max line length with --linelength (default: 72)
 
 # Martin MC Brown
 # mc@stripped
 # 2006-06-29
 
 use strict;
+use Getopt::Long;
 
+my ($checkwidth,
+    $linelength,
+    $checkimages) = (0,72,0);
+
+GetOptions("checkwidth" => \$checkwidth,
+           "checkimages" => \$checkimages,
+           "linelength=i" => \$linelength,
+           );
+
 eval "require XML::Parser::PerlSAX;";
 
 if ($@) 

@@ -58,16 +71,20 @@
     $known_imgs->{$img} = 1;
 }
 
-my $my_handler = MySQLDocBook->new();
+my $my_handler = MySQLDocBook->new({checkwidth => $checkwidth,
+                                linelength => $linelength});
 
 XML::Parser::PerlSAX->new->parse(Source => { SystemId => $file}, 
                                  Handler => $my_handler);
 
-foreach my $img (sort { $a cmp $b } keys %{$known_imgs})
+if ($checkimages)
 {
-    if ($known_imgs->{$img} == 1)
+    foreach my $img (sort { $a cmp $b } keys %{$known_imgs})
     {
-        printf("Image %s in filesystem, not referenced in manual\n",$img);
+        if ($known_imgs->{$img} == 1)
+        {
+            printf("Image %s in filesystem, not referenced in manual\n",$img);
+        }
     }
 }
 

@@ -77,9 +94,10 @@
 {
     my $self = shift;
     my $class = ref($self) || $self;
-    my $tag = shift;
+    my $options = shift;
 
-    return bless {'tag' => $tag,
+
+    return bless {'options' => $options,
                   'sectionids' => {},
                   'currsection' => '',
                   'sectionmap' => [],

@@ -263,14 +281,15 @@
 {
     my ($self, $element) = @_;
 
-    if ($self->{checklinelength})
+    if ($self->{options}->{checkwidth} && 
+        $self->{checklinelength})
     {
         my @lines = split /[\r\n]+/,$element->{Data};
-#        foreach my $line (@lines)
-#        {
-#            printf STDERR ("Following line is more than 72 characters long\n%s\n\n",$line) 
-#                if (length($line) > 72);
-#        }
+        foreach my $line (@lines)
+        {
+            printf STDERR ("Following line is more than $self->{options}->{linelength} characters long\n%s\n\n",$line) 
+                if (length($line) > $self->{options}->{linelength});
+        }
     }
 
     $self->{text} .= $element->{Data} if ($self->{intag} == 1);


Added: trunk/xsl.d/mysql-html.css
===================================================================
--- trunk/xsl.d/mysql-html.css	                        (rev 0)
+++ trunk/xsl.d/mysql-html.css	2006-09-11 12:15:44 UTC (rev 3313)
Changed blocks: 1, Lines Added: 228, Lines Deleted: 0; 4250 bytes

@@ -0,0 +1,228 @@
+div.chapter p {
+  font-family: "Times Roman", Serif;
+  font-size:100%;
+  display: block;
+  max-width:720px;
+}
+div.chapter h1, div.chapter h2, div.chapter h3, div.chapter h4, div.chapter h5, div.chapter h6, div.chapter p.title {
+  font-family: Helvetica, Arial, sans-serif;
+}
+div.chapter code {
+  color: #0e4075;
+  font-weight: normal;
+  font-family:courier, fixed, monospace;
+   font-size:95%;
+}
+div.chapter pre {
+  color: #a1520f;
+  background-color: white;
+  font-family:courier, fixed, monospace;
+  font-size:95%;
+}
+.type {
+  font-family:courier, fixed, monospace;
+  font-size:95%;
+}
+div.chapter div.titlepage h2 {
+  font-size:200%;
+  font-weight: normal;
+  color:black;
+  background-color:white;
+}
+div.section div.titlepage h2 {
+  font-size:180%;
+  font-weight: bold;
+  color:black;
+  background-color:white;
+}
+div.section div.titlepage h3 {
+  font-size:160%;
+  font-weight: bold;
+  color:black;
+  background-color:white;
+}
+div.section div.titlepage h4 {
+  font-size:140%;
+  font-weight: bold;
+  color: black;
+  background-color:white;
+}
+div.section div.titlepage h5 {
+  font-size:120%;
+  font-weight: bold;
+  color: black;
+  background-color:white;
+}
+div.section div.titlepage h6 {
+  font-weight: normal;
+  color:black;
+  background-color:white;
+}
+div.warning, div.note {
+  border-left: 5px solid black;
+  padding-left: 5px;
+  margin-right: 1in;
+}
+
+div.warning h3, div.note h3{
+  font-size: 90%;
+}
+
+div.chapter pre.programlisting {
+  background: #dddddd;
+  color:black;
+  display:block;
+  width:720px;
+  font-size:90%;
+  padding:2px;
+}
+.guibutton {
+  background: #dddddd;
+  display:inline;
+  border: 1px solid #555555;
+  padding:1px;
+  line-height:1.2em;
+}
+strong.keycap {
+  background: #eeeeee;
+  display:inline;
+  border: 1px solid #000000;
+  font-variant: small-caps;
+  padding:1px;
+  line-height:1.2em;
+}
+#subfld h1 {
+  font-size: 90%;
+  font-weight: bold;
+}
+span.section a span strong.command {
+  color: black;
+  text-decoration: underline;
+}
+dt span code {
+  font-weight: bold;
+}
+li div.itemizedlist ul li p {
+  font-size: 95%;
+}
+li p {
+  font-size: 100%;
+}
+ol li p {
+  font-size: 95%;
+}
+ul li p {
+  font-size: 95%;
+}
+ul li p em {
+  font-size: 100%;
+}
+li div ol li p {
+  font-size: 105%
+}
+li div ul li p {
+  font-size: 105%
+}
+code {
+  font-size: 95%;
+}
+p strong code {
+  font-size: 95%;
+  font-weight: normal;
+}
+pre strong code {
+  font-weight: normal;
+  font-size: 100%;
+}
+
+em {
+  font-style: italic;
+  font-size: 100%;
+}
+em code {
+  font-size: 110%;
+}
+code em code {
+  font-size: 100%;
+}
+span.type {
+  font-family:courier, fixed, monospace;
+}
+span.bold strong {
+  font-style: italic;
+  font-weight: bold;
+}
+span.emphasis em {
+  font-style: italic;
+  font-weight: normal;
+}
+span.section span strong.command {
+  font-family: monospace;
+  font-weight: bold;
+}
+span.section code.literal {
+  font-family: courier, fixed, monospace;
+  font-weight: bold;
+  color: #026789;
+  font-size:90%;
+}
+td code.literal {
+font-size:100%;
+}
+p.deprecated span.bold strong {
+  color:red;
+  font-weight: bold;
+  font-style: normal;
+}
+div.section div.titlepage h1 code, div.section div.titlepage h2 code, div.section
+div.titlepage h3 code, div.section div.titlepage h4 code, div.section
+div.titlepage h5 code, div.section div.titlepage h1 code {
+  font-size:100%;
+}
+/* Colours and borders */
+strong.command {
+  font-family:courier, fixed, monospace;
+  font-size:90%;
+  color: #990000;
+  font-weight: normal;
+}
+strong.userinput code {
+  color: #0e4075;
+}
+code.filename {
+  color: #3352ff;
+}
+span.emphasis em {
+  color: #003333;
+}
+span.bold strong {
+  color: #003333;
+}
+
+span.section span strong.command {
+  color: #026789;
+}
+
+h3.title code.literal {
+  color: black;
+}
+table {
+  width:720px;
+  border: none;
+}
+table tr {
+  vertical-align: top;
+}
+td {
+  font-family:roman, 'times new roman', times, serif;
+  font-size: 95%;
+  padding:0px 5px 0px 5px;
+  border: outset 0.1em white;
+}
+th, div.informaltable td strong {
+  font-family:helvetica, arial, sans-serif;
+  color:black;
+  font-weight:bold;
+  font-style:normal;
+}
+


Thread
svn commit - mysqldoc@docsrva: r3313 - in trunk: refman-5.1 tools xsl.dmcbrown11 Sep