commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5894 - in trunk: gnue-appserver/src/gcd gnue-common/src/schema/scripter


From: johannes
Subject: r5894 - in trunk: gnue-appserver/src/gcd gnue-common/src/schema/scripter/processors
Date: Sat, 12 Jun 2004 11:53:44 -0500 (CDT)

Author: johannes
Date: 2004-06-12 11:53:43 -0500 (Sat, 12 Jun 2004)
New Revision: 5894

Modified:
   trunk/gnue-appserver/src/gcd/gcd2sql.py
   trunk/gnue-common/src/schema/scripter/processors/HTML.py
Log:
Fixed help-text for gcd2sql and use proper format-patterns in HTML processor


Modified: trunk/gnue-appserver/src/gcd/gcd2sql.py
===================================================================
--- trunk/gnue-appserver/src/gcd/gcd2sql.py     2004-06-12 16:40:11 UTC (rev 
5893)
+++ trunk/gnue-appserver/src/gcd/gcd2sql.py     2004-06-12 16:53:43 UTC (rev 
5894)
@@ -72,7 +72,13 @@
                  "Default encoding is UTF-8") )
 
     self.addCommandOption ('output', 'o', argument = 'dest',
-        help = _("to be added later"))
+        help= _("The destination for the created files. This can be in several 
"
+                "formats. If <dest> is a file name, then output is written to "
+                "this file. If <dest> is a directory, then <dest>/<Vendor>.sql 
"
+                "is created. The default is to create <Vendor>.sql in the "
+                "current directory. "
+                "NOTE: the first form (<dest> as a filename) "
+                "is not supported for --vendors all."))
 
     ConfigOptions = {}
 

Modified: trunk/gnue-common/src/schema/scripter/processors/HTML.py
===================================================================
--- trunk/gnue-common/src/schema/scripter/processors/HTML.py    2004-06-12 
16:40:11 UTC (rev 5893)
+++ trunk/gnue-common/src/schema/scripter/processors/HTML.py    2004-06-12 
16:53:43 UTC (rev 5894)
@@ -62,13 +62,13 @@
     hdr = tableDef.getPhase (0).header
 
     pro.append ("")
-    pro.extend (self.comment ("Table definition '%s'" % tableDef.name))
+    pro.extend (self.comment (u"Table definition '%s'" % tableDef.name))
 
-    pro.append ('<H2 class="tabledef"><A name="%s">%s</A></H2>' % \
-        (tableDef.name, _("Table definition of '%s'") % tableDef.name))
+    pro.append (u'<H2 class="tabledef"><A name="%s">%s</A></H2>' % \
+        (tableDef.name, u_("Table definition of '%s'") % tableDef.name))
 
-    hdr.append ('<H3 class="fieldlist">%s</H3>' % _("List of fields"))
-    hdr.append ('<TABLE class="tabledef" width="90%" border="0" ' + \
+    hdr.append (u'<H3 class="fieldlist">%s</H3>' % _("List of fields"))
+    hdr.append (u'<TABLE class="tabledef" width="90%" border="0" ' + \
                 'cellpadding="3" cellspacing="1">')
     hdr.extend (self._tableHeader ())
 
@@ -96,13 +96,13 @@
     epi = tableDef.getPhase (0).epilogue
 
     epi.append ("")
-    epi.extend (self.comment ("Primary key '%s'" % pkDef.name))
+    epi.extend (self.comment (u"Primary key '%s'" % pkDef.name))
 
-    epi.append ('<H3 class="primarykey">%s</H3>' % \
-      _("Primary Key: %s") % pkDef.name)
+    epi.append (u'<H3 class="primarykey">%s</H3>' % \
+      u_("Primary Key: %s") % pkDef.name)
 
     epi.append ('<UL>')
-    epi.extend (["  <LI>%s</LI>" % pkf.name for pkf in pkDef.fields])
+    epi.extend ([u"  <LI>%s</LI>" % pkf.name for pkf in pkDef.fields])
     epi.append ('</UL>')
 
 
@@ -120,11 +120,11 @@
     epi = tableDef.getPhase (0).epilogue
 
     epi.append ("")
-    epi.extend (self.comment ("Index '%s'" % indexDef.name))
-    epi.append ('<H3 class="index">%s: %s</H3>' % (uniq, indexDef.name))
+    epi.extend (self.comment (u"Index '%s'" % indexDef.name))
+    epi.append (u'<H3 class="index">%s: %s</H3>' % (uniq, indexDef.name))
 
     epi.append ('<UL>')
-    epi.extend (["  <LI>%s</LI>" % ixf.name for ixf in indexDef.fields])
+    epi.extend ([u"  <LI>%s</LI>" % ixf.name for ixf in indexDef.fields])
     epi.append ('</UL>')
 
 
@@ -136,30 +136,30 @@
     epi = tableDef.getPhase (0).epilogue
 
     epi.append ("")
-    epi.extend (self.comment ("Constraint '%s'" % constraint.name))
+    epi.extend (self.comment (u"Constraint '%s'" % constraint.name))
     if constraint.kind == "foreignkey":
-      epi.append ('<H3 class="constraint">%s: %s</H3>' % 
+      epi.append (u'<H3 class="constraint">%s: %s</H3>' % 
         (_("Foreign Key"), constraint.name))
 
-      epi.append ('<TABLE class="constraintdef" width="90%" border="0" ' + \
+      epi.append (u'<TABLE class="constraintdef" width="90%" border="0" ' + \
                   'cellpadding="3" cellspacing="1">')
-      epi.append ('<TR>')
-      epi.append ('  <TH class="fields">%s</TH>' % tableDef.name)
-      epi.append ('  <TH class="fields">&nbsp;</TH>')
-      epi.append ('  <TH class="fields"><A HREF="#%s">%s</A></TH>' % \
+      epi.append (u'<TR>')
+      epi.append (u'  <TH class="fields">%s</TH>' % tableDef.name)
+      epi.append (u'  <TH class="fields">&nbsp;</TH>')
+      epi.append (u'  <TH class="fields"><A HREF="#%s">%s</A></TH>' % \
         (constraint.reftable, constraint.reftable))
-      epi.append ('</TR>')
+      epi.append (u'</TR>')
 
-      epi.append ('<TR>')
-      epi.append ('  <TD class="fields">')
-      epi.extend (["    %s<BR>" % cf.name for cf in constraint.fields])
-      epi.append ('  </TD>')
-      epi.append ('  <TD class="fields">%s</TD>' % _("references"))
-      epi.append ('  <TD class="fields">')
+      epi.append (u'<TR>')
+      epi.append (u'  <TD class="fields">')
+      epi.extend ([u"    %s<BR>" % cf.name for cf in constraint.fields])
+      epi.append (u'  </TD>')
+      epi.append (u'  <TD class="fields">%s</TD>' % _("references"))
+      epi.append (u'  <TD class="fields">')
       epi.extend (["    %s<BR>" % rf.name for rf in constraint.reffields])
-      epi.append ('  </TD>')
-      epi.append ('</TR>')
-      epi.append ('</TABLE>')
+      epi.append (u'  </TD>')
+      epi.append (u'</TR>')
+      epi.append (u'</TABLE>')
 
 
 
@@ -173,12 +173,12 @@
     """
     res = []
 
-    res.append ('<TR>')
-    res.append ('  <TH class="fields">%s</TH>' % "Field")
-    res.append ('  <TH class="fields">%s</TH>' % "Type")
-    res.append ('  <TH class="fields">%s</TH>' % "Nullable")
-    res.append ('  <TH class="fields">%s</TH>' % "Default")
-    res.append ('</TR>')
+    res.append (u'<TR>')
+    res.append (u'  <TH class="fields">%s</TH>' % "Field")
+    res.append (u'  <TH class="fields">%s</TH>' % "Type")
+    res.append (u'  <TH class="fields">%s</TH>' % "Nullable")
+    res.append (u'  <TH class="fields">%s</TH>' % "Default")
+    res.append (u'</TR>')
 
     return res
 
@@ -207,13 +207,13 @@
     else:
       default = "&nbsp;"
 
-    res.append ('<TR>')
-    res.append ('  <TD class="fields">%s</TH>' % gsField.name)
-    res.append ('  <TD class="fields">%s</TH>' % \
+    res.append (u'<TR>')
+    res.append (u'  <TD class="fields">%s</TH>' % gsField.name)
+    res.append (u'  <TD class="fields">%s</TH>' % \
                 self._translateType (gsField))
-    res.append ('  <TD class="fields">%s</TH>' % null)
-    res.append ('  <TD class="fields">%s</TH>' % default)
-    res.append ('</TR>')
+    res.append (u'  <TD class="fields">%s</TH>' % null)
+    res.append (u'  <TD class="fields">%s</TH>' % default)
+    res.append (u'</TR>')
 
     return res
 
@@ -226,12 +226,12 @@
     """
     On start of a dump just create the HTML- and HEAD-tags
     """
-    self._writeText (['<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 ' + \
-       'Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>',
-      '<HTML>', 
-      ' <HEAD>', 
-      '  <TITLE>GNUe Schema Definition: %s</TITLE>' % self.source,
-      '  <META name="author" content="gnue-schema">'])
+    self._writeText ([u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 ' + \
+       u'Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>',
+       u'<HTML>',
+       u' <HEAD>',
+       u'  <TITLE>GNUe Schema Definition: %s</TITLE>' % self.source,
+       u'  <META name="author" content="gnue-schema">'])
 
 
   # ---------------------------------------------------------------------------
@@ -244,7 +244,7 @@
     """
     self.encoding = encoding
     self._writeText ([ \
-      '  <META HTTP-EQUIV="content-type" content="text/html; charset=%s">' % \
+      u'  <META HTTP-EQUIV="content-type" content="text/html; charset=%s">' % \
       self.encoding])
 
 
@@ -278,24 +278,24 @@
     destination.
     """
     self._writeText (self.comment ('List of tables'))
-    self._writeText ('<H1 class="toc">%s</H1>' % \
-      _("Table definitions in '%s'") % self.source)
+    self._writeText (u'<H1 class="toc">%s</H1>' % \
+      u_("Table definitions in '%s'") % self.source)
 
-    self._writeText ('<UL>\n')
+    self._writeText (u'<UL>\n')
 
     for table in self.__tables:
-      self._writeText ('  <LI><A HREF="#%s">%s</A></LI>\n' % \
+      self._writeText (u'  <LI><A HREF="#%s">%s</A></LI>\n' % \
         (table.name, table.name))
 
-    self._writeText ('</UL>\n')
+    self._writeText (u'</UL>\n')
 
     for table in self.__tables:
       # table.writeDefinition (self.destination, self.encoding)
       BaseProcessor.writePhase (self, table, 0)
-      self._writeText ('<HR>')
+      self._writeText (u'<HR>')
 
-    self._writeText (['<P>%s %s UTC</P>' % (_("Generated on"), now ())])
-    self._writeText (['</BODY>'])
+    self._writeText ([u'<P>%s %s UTC</P>' % (_("Generated on"), now ())])
+    self._writeText ([u'</BODY>'])
 
 
   # ---------------------------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]