commit-gnue
[Top][All Lists]
Advanced

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

r5320 - in trunk: gnue-common/src/datasources/drivers/adodbapi gnue-comm


From: jcater
Subject: r5320 - in trunk: gnue-common/src/datasources/drivers/adodbapi gnue-common/src/datasources/drivers/adodbapi/adodbapi gnue-common/src/datasources/drivers/db2 gnue-common/src/datasources/drivers/informix/informix gnue-common/src/datasources/drivers/ingres gnue-common/src/datasources/drivers/interbase gnue-common/src/datasources/drivers/mysql gnue-common/src/datasources/drivers/mysql/mysql gnue-common/src/datasources/drivers/odbc/wodbc gnue-common/src/datasources/drivers/oracle gnue-common/src/datasources/drivers/oracle/cxoracle gnue-common/src/datasources/drivers/oracle/dcoracle gnue-common/src/datasources/drivers/postgresql gnue-common/src/datasources/drivers/postgresql/pygresql gnue-common/src/datasources/drivers/postgresql/pypgsql gnue-common/src/datasources/drivers/sapdb gnue-common/src/datasources/drivers/sybase gnue-common/utils/helpers www/utils www/web/project www/web/shared
Date: Sun, 14 Mar 2004 22:55:00 -0600 (CST)

Author: jcater
Date: 2004-03-14 22:54:58 -0600 (Sun, 14 Mar 2004)
New Revision: 5320

Modified:
   trunk/gnue-common/src/datasources/drivers/adodbapi/Info.py
   trunk/gnue-common/src/datasources/drivers/adodbapi/adodbapi/Info.py
   trunk/gnue-common/src/datasources/drivers/db2/Info.py
   trunk/gnue-common/src/datasources/drivers/informix/informix/Info.py
   trunk/gnue-common/src/datasources/drivers/ingres/Info.py
   trunk/gnue-common/src/datasources/drivers/interbase/Info.py
   trunk/gnue-common/src/datasources/drivers/mysql/Info.py
   trunk/gnue-common/src/datasources/drivers/mysql/mysql/Info.py
   trunk/gnue-common/src/datasources/drivers/odbc/wodbc/Info.py
   trunk/gnue-common/src/datasources/drivers/oracle/Info.py
   trunk/gnue-common/src/datasources/drivers/oracle/cxoracle/Info.py
   trunk/gnue-common/src/datasources/drivers/oracle/dcoracle/Info.py
   trunk/gnue-common/src/datasources/drivers/postgresql/Info.py
   trunk/gnue-common/src/datasources/drivers/postgresql/pygresql/Info.py
   trunk/gnue-common/src/datasources/drivers/postgresql/pypgsql/Info.py
   trunk/gnue-common/src/datasources/drivers/sapdb/Info.py
   trunk/gnue-common/src/datasources/drivers/sybase/Info.py
   trunk/gnue-common/utils/helpers/files.py
   trunk/gnue-common/utils/helpers/info.py
   trunk/www/utils/create-website
   trunk/www/web/project/index.php
   trunk/www/web/shared/_header.php
   trunk/www/web/shared/base.css
Log:
More work on automating a "Supported Database" page


Modified: trunk/gnue-common/src/datasources/drivers/adodbapi/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/adodbapi/Info.py  2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/adodbapi/Info.py  2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,10 +25,10 @@
 #
 # Documentation
 #
-name = "ADO API"
+name = "MS ADO (MS SQL-Server/MS Access)"
 url = ""
 description = """
-Drivers for MS SQL-Server/MS Access database access.
+The Microsoft ADO API allows access MS SQL-Server and MS Access databases.
 """
 isfree = False  # Should be false for non-free DBMSs... we don't want to
                     # show URLs for non-free on our website

Modified: trunk/gnue-common/src/datasources/drivers/adodbapi/adodbapi/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/adodbapi/adodbapi/Info.py 
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/adodbapi/adodbapi/Info.py 
2004-03-15 04:54:58 UTC (rev 5320)
@@ -30,15 +30,7 @@
 A Python DB-API 2.0 module that makes it easy to use Microsoft ADO
 for connecting with databases and other data sources.
 
-Features:
-  * 100% DB-API 2.0 compliant.
-  * Includes pyunit testcases that describes how to use the module.
-  * Fully implemented in Python.
-  * Licensed under the LGPL license, which means that it can be used freely 
even in commercial programs subject to certain restrictions.
-  * Supports eGenix mxDateTime, Python 2.3 datetime module and Python time 
module.
-
 Prerequisites:
-  * Python 1.5.2 or higher.
   * Mark Hammond's win32all python for windows extensions.
 
 

Modified: trunk/gnue-common/src/datasources/drivers/db2/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/db2/Info.py       2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/db2/Info.py       2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,10 +25,10 @@
 #
 # Documentation
 #
-name = "IBM DB/2"
+name = "IBM DB2 (7.1)"
 url = ""
 description = """
-IBM DB/2 is a commercial RDBMS product popular in many companies.
+IBM DB2 is a commercial RDBMS product popular in many companies.
 """
 isfree = False  # Should be false for non-free DBMSs... we don't want to
                     # show URLs for non-free on our website

Modified: trunk/gnue-common/src/datasources/drivers/informix/informix/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/informix/informix/Info.py 
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/informix/informix/Info.py 
2004-03-15 04:54:58 UTC (rev 5320)
@@ -26,7 +26,7 @@
 # Notes on this driver
 #
 name = _("Kinfxdb Informix driver")
-url = "http://thor.prohosting.com/~alexan/pub/Kinfxdb/Kinfxdb-0.2.tar.gz";
+url = "http://thor.prohosting.com/~alexan/pub/Kinfxdb/";
 doc = """
 Description
 -----------

Modified: trunk/gnue-common/src/datasources/drivers/ingres/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/ingres/Info.py    2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/ingres/Info.py    2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,7 +25,7 @@
 #
 # Documentation
 #
-name = "OpenIngres, CA Ingres, CA Ingres II"
+name = "OpenIngres 1.2, CA Ingres 6.4, CA Ingres II"
 url = ""
 description = """
 CA OpenIngres is a commercial database system.

Modified: trunk/gnue-common/src/datasources/drivers/interbase/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/interbase/Info.py 2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/interbase/Info.py 2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,7 +25,7 @@
 #
 # Documentation
 #
-name = "Firebird/Interbase Databases"
+name = "Firebird/Interbase"
 url = "http://www.firebirdsql.org/";
 description = """
 Firebird is a free relational database offering many ANSI SQL-92 features that

Modified: trunk/gnue-common/src/datasources/drivers/mysql/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/mysql/Info.py     2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/mysql/Info.py     2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,7 +25,7 @@
 #
 # Documentation
 #
-name = "MySQL 4.x+"
+name = "MySQL (4.x+)"
 url = "http://www.mysql.org/";
 description = """
 MySQL is a fast database that runs on numerous platforms. It is one of the
@@ -33,6 +33,9 @@
 
 Given the transactional nature of GNUe, we recommend using MySQL 4.x+ with
 transaction support compiled in.
+
+Not all features of GNUe are usable under MySQL, such as auto-populating fields
+with serials/sequences and query-by-detail.
 """
 
 isfree = True  # Should be false for non-free DBMSs... we don't want to

Modified: trunk/gnue-common/src/datasources/drivers/mysql/mysql/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/mysql/mysql/Info.py       
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/mysql/mysql/Info.py       
2004-03-15 04:54:58 UTC (rev 5320)
@@ -30,7 +30,7 @@
 doc = """
 Description
 -----------
-Written by Andy Dustman, this driver supports MySQL 3.22, 3.23, and
+Mysql-python, written by Andy Dustman, supports MySQL 3.22, 3.23, and
 4.x.
 
 Support

Modified: trunk/gnue-common/src/datasources/drivers/odbc/wodbc/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/odbc/wodbc/Info.py        
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/odbc/wodbc/Info.py        
2004-03-15 04:54:58 UTC (rev 5320)
@@ -26,7 +26,7 @@
 # Notes on this driver
 #
 name = _("PythonWin ODBC Driver")
-url = 
"http://aspn.activestate.com/ASPN/Downloads/ActivePython/Extensions/Win32all";
+url = "http://www.python.org/windows/win32/odbc.html";
 doc = """
 Description
 -----------

Modified: trunk/gnue-common/src/datasources/drivers/oracle/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/oracle/Info.py    2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/oracle/Info.py    2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,7 +25,7 @@
 #
 # Documentation
 #
-name = "Oracle 7.3/8i/9i"
+name = "Oracle (7.3, 8i+)"
 url = ""
 description = """
 Oracle is a popular commercial relational database system.

Modified: trunk/gnue-common/src/datasources/drivers/oracle/cxoracle/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/oracle/cxoracle/Info.py   
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/oracle/cxoracle/Info.py   
2004-03-15 04:54:58 UTC (rev 5320)
@@ -25,12 +25,12 @@
 #
 # Notes on this driver
 #
-name = _("CX_Oracle SQLNet Driver")
-url = "http://www.computronix.com/utilities/";
+name = _("cx_Oracle SQLNet Driver")
+url = "http://www.computronix.com/utilities.shtml";
 doc = """
 Description
 -----------
-An Oracle driver from Computronix.  Works with Oracle 7.3, 8.x, and 9i via
+An Oracle driver from Computronix. Works with Oracle 7.3, 8.x, and 9i via
 Oracle's SQL-Net OCI interface.
 
 Support
@@ -40,6 +40,7 @@
 
 Platforms Tested:
   * Debian Woody/Sarge/Sid
+  * RedHat
 
 Supported Properties
 --------------------

Modified: trunk/gnue-common/src/datasources/drivers/oracle/dcoracle/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/oracle/dcoracle/Info.py   
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/oracle/dcoracle/Info.py   
2004-03-15 04:54:58 UTC (rev 5320)
@@ -26,13 +26,18 @@
 # Notes on this driver
 #
 name = _("DCOracle2 OCI Driver")
-url = "http://www.zope.org/Products/DCOracle2/";
+url = "http://www.zope.org/Members/matt/dco2/";
 doc = """
 Description
 -----------
 An Oracle driver from Digital Creations (Zope).  Works with Oracle
 7.3, 8.x, 9i via Oracle's SQL-Net OCI interface.
 
+The "Oracle Database Bindings for Python" are packaged with the 
+"Zope Oracle Database Adapter". GNUe does not use the Zope 
+Adapter, so you can safely ignore any installation instructions 
+referring to Zope.
+
 Support
 -------
 POSIX Support: YES
@@ -57,4 +62,5 @@
 1. Requires Oracle Client Libraries.
 
 2. Does not recognize the TWO_TASK environment setting.
+
 """

Modified: trunk/gnue-common/src/datasources/drivers/postgresql/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/postgresql/Info.py        
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/postgresql/Info.py        
2004-03-15 04:54:58 UTC (rev 5320)
@@ -25,7 +25,7 @@
 #
 # Documentation
 #
-name = "PostgreSQL"
+name = "PostgreSQL (7.x+)"
 url = "http://www.postgresql.org/";
 description = """
 PostgreSQL is an free object-relational database, which supports a large part

Modified: trunk/gnue-common/src/datasources/drivers/postgresql/pygresql/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/postgresql/pygresql/Info.py       
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/postgresql/pygresql/Info.py       
2004-03-15 04:54:58 UTC (rev 5320)
@@ -25,14 +25,13 @@
 #
 # Notes on this driver
 #
-name = _("Psycopg")
-url = "http://initd.org/software/psycopg/";
+name = _("PyGreSQL")
+url = "http://druid.net/pygresql/";
 doc = """
 Description
 -----------
-From the Psycopg website: "It was written from scratch with the aim of
-being very small and fast, and stable as a rock."  Written by initd.org
-volunteers.
+PyGreSQL is the PostgreSQL-Python driver available via PostgreSQL's CVS tree.
+It is compliant to Python's DB-API 2.0.
 
 Support
 -------
@@ -53,11 +52,12 @@
 Examples
 --------
   [myconn]
-  provider=psycopg        # Use the psycopg adapter
+  provider=pygresql       # Use the pygresql adapter
   host=localhost          # The hostname/IP of the postgresql host
   dbname=mydb             # The name of the pg database
 
 Notes
 -----
-1.  Available in Debian [sid] as: "apt-get install python-psycopg"
+1. The developers of GNUe have had mixed results with the PygreSQL driver
+   and generally recommend one of the others.
 """

Modified: trunk/gnue-common/src/datasources/drivers/postgresql/pypgsql/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/postgresql/pypgsql/Info.py        
2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/postgresql/pypgsql/Info.py        
2004-03-15 04:54:58 UTC (rev 5320)
@@ -25,12 +25,12 @@
 #
 # Notes on this driver
 #
-name = _("PyPgSQL")
+name = _("pyPgSQL")
 url = "http://pypgsql.sf.net/";
 doc = """
 Description
 -----------
-Written by Billy Allie, PyPgSQL is a database interface for PostgreSQL 7.x.
+Written by Billy Allie, pyPgSQL is a database interface for PostgreSQL 7.x.
 
 Support
 -------
@@ -55,4 +55,7 @@
   host=localhost          # The hostname/IP of the postgresql host
   dbname=mydb             # The name of the pg database
 
+Notes
+-----
+1. pyPgSQL is available in Debian as python-pgsql.
 """

Modified: trunk/gnue-common/src/datasources/drivers/sapdb/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sapdb/Info.py     2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/sapdb/Info.py     2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,7 +25,7 @@
 #
 # Documentation
 #
-name = "MaxDB RDBMS (formerly SAP-DB)"
+name = "MaxDB (formerly SAP-DB)"
 url = "http://www.mysql.com/products/maxdb/";
 description = """
 MySQL's MaxDB is an enhanced version of SAP DB, SAP AG's open source

Modified: trunk/gnue-common/src/datasources/drivers/sybase/Info.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sybase/Info.py    2004-03-14 
01:31:53 UTC (rev 5319)
+++ trunk/gnue-common/src/datasources/drivers/sybase/Info.py    2004-03-15 
04:54:58 UTC (rev 5320)
@@ -25,10 +25,11 @@
 #
 # Documentation
 #
-name = "Sybase"
+name = "Sybase (11.0.3, 11.5.1, 11.9.2)"
 url = ""
 description = """
-Sybase Adaptive Server Enterprise is a commercial database.
+Sybase Adaptive Server Enterprise is a commercial database that
+is freely downloadable for Linux.
 """
 isfree = False  # Should be false for non-free DBMSs... we don't want to
                     # show URLs for non-free on our website

Modified: trunk/gnue-common/utils/helpers/files.py
===================================================================
--- trunk/gnue-common/utils/helpers/files.py    2004-03-14 01:31:53 UTC (rev 
5319)
+++ trunk/gnue-common/utils/helpers/files.py    2004-03-15 04:54:58 UTC (rev 
5320)
@@ -3,6 +3,10 @@
 
 SVN_BASE=os.path.abspath(os.path.join(os.path.dirname(__file__),'../../..'))
 
+# TODO: Replace with StructuredText processor
+def htmlify(text):
+  return "<p>" + escape(text.strip()).replace('\n\n','</p>\n<p>') + '</p>'
+
 def openModuleFile(module,file):
   """
   Open a file in the gnue-<module>/ directory.
@@ -68,7 +72,7 @@
       line = lines[i].rstrip()
       if not line and lines[i+1].rstrip()[:1] and lines[i+2][:3] == '---':
         buffer = []
-        section = lines[i+1].rstrip()
+        section = lines[i+1].strip()
         self.sectionOrder.append(section)
         self.sections[section.upper()] = buffer
         i += 3
@@ -84,19 +88,32 @@
         i += 1
 
 
-  def asText(self, section):
-    return string.join(self.sections[section.upper()],'\n').strip()
+  def asText(self, section, default=""):
+    try:
+      return string.join(self.sections[section.upper()],'\n').strip()
+    except KeyError:
+      return default
 
-  def asHTML(self, section):
-    return '<p>' + escape(self.asText(section)).replace('\n\n','</p>\n<p>') + 
'</p>'
+  def asHTML(self, section, default=""):
+    return htmlify(self.asText(section, default))
 
-  def firstParaAsHTML(self, section):
-    text = 
string.join(self.sections[section.upper()],'\n').strip().split('\n\n')[0]
-    return '<p>' + text + '</p>'
+  def asPreHTML(self, section, default=""):
+    try:
+      v = string.join(self.sections[section.upper()],'\n')
+    except KeyError:
+      v = default
+    return '<pre>\n' + escape(v) + '\n</pre>\n'
 
+  def firstParaAsHTML(self, section, default=""):
+    try:
+      text = 
string.join(self.sections[section.upper()],'\n').strip().split('\n\n')[0]
+      return htmlify(text)
+    except KeyError:
+      return htmlify(default)
 
+
 def addToolLinks(html, links, base, exclude=""):
   for name, tool in links.items():
     if tool != exclude:
-      html = html.replace(name,'<a href="%s/%s/">%s</a>' % (base, tool, name))
+      html = html.replace('\n',' ').replace('  ',' ').replace(name,'<a 
href="%s/%s/">%s</a>' % (base, tool, name))
   return html
\ No newline at end of file

Modified: trunk/gnue-common/utils/helpers/info.py
===================================================================
--- trunk/gnue-common/utils/helpers/info.py     2004-03-14 01:31:53 UTC (rev 
5319)
+++ trunk/gnue-common/utils/helpers/info.py     2004-03-15 04:54:58 UTC (rev 
5320)
@@ -1,5 +1,4 @@
-
-import sys, os, string, time
+import sys, os, string, time, gnue
 from files import openModuleFile, importModule, SubheadedFile, SVN_BASE
 from StringIO import StringIO
 
@@ -8,8 +7,9 @@
 ##
 
 class Info:
-  def __init__(self, info):
+  def __init__(self, name, info):
     self._info = info
+    self.name = name
 
   def get(self, tag, default=""):
     try:
@@ -17,17 +17,20 @@
     except AttributeError:
       return default
 
-  def bool(self, tag, default=0)
+  def bool(self, tag, default=0):
     return int(self.get(tag,default))
 
+  def subheaded(self, tag, default=""):
+    return SubheadedFile(StringIO(self.get(tag, default)))
 
+
 class DatasourceInfo:
   def __init__(self):
     m = importModule('common','src/datasources', 'drivers')
     vendors = m.DRIVERS
     aliases = m.ALIASES
 
-    vendorMap = {}
+    self.vendorMap = vendorMap = {}
 
     for vendor in vendors:
 
@@ -43,7 +46,7 @@
 
 
       try:
-        dbinfo = Info(importModule('common','src/datasources/drivers/%s' % 
vendor,'Info'))
+        dbinfo = Info(vendor, 
importModule('common','src/datasources/drivers/%s' % vendor,'Info'))
       except ImportError:
         print "WARNING: common/datasources/drivers/%s has no Info.py" % vendor
         continue
@@ -53,5 +56,35 @@
         print "WARNING: top-level datasource %s has no name in Info.py" % 
vendor
         dbname = vendor
 
-      vendorMap[dbname] = ""
+      driverMap = {}
+      vendorMap[dbname] = [dbinfo, driverMap]
+      for driver in drivers:
+        try:
+          dinfo = Info(driver, 
importModule('common','src/datasources/drivers/%s/%s' % (vendor,driver),'Info'))
+        except ImportError:
+          print "WARNING: common/datasources/drivers/%s/%s has no Info.py" % 
(vendor, driver)
+          continue
 
+        dname = dinfo.get('name')
+        if not dname:
+          print "WARNING: datasource driver %s.%s has no name in Info.py" % 
(vendor, driver)
+          dname = driver
+
+        if driverMap.has_key(dname):
+          print "WARNING: datasource driver %s.%s has a duplicate name of %s" 
% (vendor, driver, driverMap[dname].name)
+
+        driverMap[dname] = dinfo
+
+  def asHTML(self):
+    for dbname, stuff in self.vendorMap.items():
+      dbinfo, driverMap = stuff
+      if dbinfo.bool('isfree') and dbinfo.get('url'):
+        if '(' in dbname:
+          f, l = dbname.split('(',1)
+          print '<a href="%s">%s</a> (%s' % (dbinfo.get('url'), f.strip(),l)
+        else:
+          print '<a href="%s">%s</a>' % (dbinfo.get('url'), dbname)
+      else:
+        print dbname
+
+

Modified: trunk/www/utils/create-website
===================================================================
--- trunk/www/utils/create-website      2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/www/utils/create-website      2004-03-15 04:54:58 UTC (rev 5320)
@@ -7,11 +7,12 @@
 ############################################################
 
 import sys, os, string
+from StringIO import StringIO
 
 SVN_BASE=os.path.abspath(os.path.join(os.path.dirname(__file__),'../..'))
 sys.path.insert(0,os.path.join(SVN_BASE,'gnue-common','utils'))
 
-from helpers.files import addToolLinks
+from helpers.files import addToolLinks, htmlify
 from helpers.tools import Tool
 from helpers.info import DatasourceInfo
 
@@ -23,7 +24,7 @@
           If you are a developer running this from svn, you are likely
           running the wrong script.
 
-  If you really do want to run this script, run:
+  If you really want to run this script, run:
     %s --update [--dest <path>]
 
   Be warned! It will try to update your /var/www/ unless you run
@@ -92,7 +93,6 @@
 
     # Handle each release:
     for release in mod.releases.releaseOrder:
-      os.system("mkdir -p %s/tools/%s/%s" % (DEST, tool, release))
       html = '<h1>%s %s</h1>' % (package, release) + \
                 '<p><a href="..">%s</a> %s was released on %s.</p>\n\n' % 
(name, release, mod.releases.getReleaseDate(release,dfmt))
 
@@ -253,14 +253,109 @@
        databases.</p>
        """ + toolHomePageHtml  , "Developer Tools")
 
-  DatasourceInfo()
+  ##
+  # Write out tool/common/databases/ home page
+  #
+  dinfo = DatasourceInfo()
+  html = "<h1>Supported Databases</h1>\n"
+  html += "<p>The following databases are at least partially supported by GNUe 
Common and the GNUe tools.</p><ul>"
+  sortable = []
 
+  for dbname, stuff in dinfo.vendorMap.items():
+    dbinfo, driverMap = stuff
+    if '(' in dbname:
+      f, l = dbname.split('(',1)
+      shortname = f.strip()
+      h = '<li><a href="%s.php">%s</a> (%s</li>' % (dbinfo.name, f.strip(),l)
+    else:
+      shortname = dbname
+      h= '<li><a href="%s.php">%s</a></li>' % (dbinfo.name, dbname)
+    sortable.append((dbname.lower(),h))
+
+    # Create individual page for each datadriver
+    html2 = "<h1>"
+
+    if dbinfo.bool('isfree') and dbinfo.get('url'):
+      if '(' in dbname:
+        html2 += '<a href="%s">%s</a> (%s</h1>' % (dbinfo.get('url'), 
f.strip(),l)
+      else:
+        html2 += '<a href="%s">%s</a></h1>' % (dbinfo.get('url'), dbname)
+    else:
+      html2 += "%s</h1>" % dbname
+
+
+    html2 += htmlify(dbinfo.get('description','No description was provided for 
this database/connection type.'))
+
+    html2 += "\n<p>To utilize %s within GNUe, you must use one of the 
following python drivers:</p>\n<ul>" % shortname
+
+    sort2 = []
+    for dr, db in driverMap.items():
+      sort2.append((dr.lower(), dr, db))
+    sort2.sort()
+
+    html3 = ""
+    for foo, drname, drinfo in sort2:
+      html2 += '<li><a href="#%s">%s</a></li>\n' % (drinfo.name, drname)
+      html3 += '<h2><a name="%s">%s</a></h2>\n' % (drinfo.name, drname)
+      url = drinfo.get('url')
+
+      sh = drinfo.subheaded('doc')
+      if sh.sections[None]:
+        html3 += sh.asHTML(None)
+
+      html3 += sh.asHTML('Description', 'No description was provided for 
driver.')
+
+      html3 += '<div class="indent">'
+      if url:
+        html3 += '<p>Home Page: <a href="%s">%s</a></p>' % (url, url)
+      else:
+        html3 += '<p>Home Page: <i>n/a</i></p>'
+
+      if sh.asText('Support',''):
+        html3 += sh.asHTML('Support')
+
+      html3 += '</div>'
+
+      for sec in sh.sectionOrder:
+        if sec.upper() in ('DESCRIPTION','SUPPORT'):
+          continue
+        html3 += '<h3>%s</h3>\n' % sec
+        if sec.upper() == 'EXAMPLES':
+          html3 += "<p>The following is an example of a connection.conf 
entry:</p>\n" + sh.asPreHTML(sec)
+        else:
+          html3 += sh.asHTML(sec)
+
+
+    html2 += '</ul>\n\n' + html3
+
+    phpWrapper('tools/common/databases/%s.php' % dbinfo.name,html2,
+               'Support for %s'%shortname)
+
+  # write database home page
+  sortable.sort()
+  for dbname, h in sortable:
+    html += h + '\n'
+
+  html += "</ul>"
+
+  phpWrapper('tools/common/databases/index.php',html,'Supported Databases')
+
+#    if dbinfo.bool('isfree') and dbinfo.get('url'):
+#      if '(' in dbname:
+#        f, l = dbname.split('(',1)
+#        h = '<li><a href="%s">%s</a> (%s</li>' % (dbinfo.get('url'), 
f.strip(),l)
+#      else:
+#        h= '<li><a href="%s">%s</a></li>' % (dbinfo.get('url'), dbname)
+#    else:
+#      h = "<li>%s</li>" % dbname
+
 ######################################################################
 #
 #
 def phpWrapper(file, html, title=""):
+  path = file.split('/')
+  os.system('mkdir -p %s/%s' % (DEST,string.join(path[:-1],'/')))
   out = open(os.path.join(DEST, file),'w')
-  path = file.split('/')
 
   out.write("""\
 <?php $BASEDIR="%s";

Modified: trunk/www/web/project/index.php
===================================================================
--- trunk/www/web/project/index.php     2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/www/web/project/index.php     2004-03-15 04:54:58 UTC (rev 5320)
@@ -26,7 +26,7 @@
       <a href="glossary.html#open_architecture">open architecture</a> and
       easy maintenance. It gives users a modular system
       and freedom from being stuck with a single-source vendor.
-      GNUe supports multi-language interfaces and non-ASCII character sets.
+      GNUe supports multi-language interfaces, non-ASCII character sets, and 
most popular <a href="../tools/common/databases/">database systems</a>.
       </p>
 
     <h2><a href="../packages/">ERP Packages</a></h2>

Modified: trunk/www/web/shared/_header.php
===================================================================
--- trunk/www/web/shared/_header.php    2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/www/web/shared/_header.php    2004-03-15 04:54:58 UTC (rev 5320)
@@ -5,7 +5,7 @@
         <meta http-equiv="content-type" content="text/html; 
charset=iso-8859-1" />
         <meta name="author" content="GNU Enterprise" />
         <meta name="COPYRIGHT" content="Copyright (c) 2001-2004 Free Software 
Foundation"/>
-        <meta name="KEYWORDS" content="Free Software, FreeSoftware, 
Freesoftware, free software, GNU, gnu, GPL, gpl, Unix, UNIX, *nix, unix, MySQL, 
mysql, SQL, sql, Database, DataBase, database, gnue, enterprise software, 
corba, supply chain, accounting, erp, crm,E-Commerce, GNU 
Enterprise,Application Service Providers, Business 2 Business, Customer 
Relationship Managment, Enterprise Application Integration, eai, E-Commerce, 
Middleware, postgresql, AP, AR, GL, xml, CORBA "/>
+        <meta name="KEYWORDS" content="Free Software, FreeSoftware, 
Freesoftware, free software, GNU, gnu, GPL, gpl, Unix, UNIX, *nix, unix, MySQL, 
mysql, SQL, sql, Database, DataBase, database, gnue, enterprise software, 
corba, supply chain, accounting, erp, crm,E-Commerce, GNU 
Enterprise,Application Service Providers, Business 2 Business, Customer 
Relationship Managment, Enterprise Application Integration, eai, E-Commerce, 
Middleware, postgresql, AP, AR, GL, xml, CORBA, forms, reports, reporting, 
application server, integration, data entry"/>
 <meta name="DESCRIPTION" content="Free software for your business"/>
         <meta name="robots" content="all" />
 

Modified: trunk/www/web/shared/base.css
===================================================================
--- trunk/www/web/shared/base.css       2004-03-14 01:31:53 UTC (rev 5319)
+++ trunk/www/web/shared/base.css       2004-03-15 04:54:58 UTC (rev 5320)
@@ -85,12 +85,15 @@
   color: #000000;
 }
 
-#body h1,h2 {
+#body div.indent {
+  margin-left: 12px;
+}
+
+#body h1,h2, h3 {
   font-weight: bold;
   color: #333366;
 /*  background-color: #fcfcfc; */
   border-width: thin;
-  border-style: solid none dashed none;
   margin: 0 0 0 0;
   padding: 0 0 0 0 ;
 }
@@ -99,6 +102,7 @@
   width: 100%;
   font-size: 18px;
   background-color: #f9f9f9;
+  border-style: solid none dashed none;
 }
 
 #body h2 {
@@ -107,6 +111,13 @@
   border-style: none none dotted none;
 }
 
+#body h3 {
+  font-size: 13px;
+  text-decoration: underline;
+  margin: 10px 0 -6px 0;
+  border-style: none;
+}
+
 #body h1 a {
   font-weight: bold;
   color: #333366;





reply via email to

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