commit-gnue
[Top][All Lists]
Advanced

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

r5571 - in trunk/www: utils/webhelpers web/gallery


From: jcater
Subject: r5571 - in trunk/www: utils/webhelpers web/gallery
Date: Mon, 29 Mar 2004 17:11:22 -0600 (CST)

Author: jcater
Date: 2004-03-29 17:11:20 -0600 (Mon, 29 Mar 2004)
New Revision: 5571

Removed:
   trunk/www/web/gallery/appserver1.png
   trunk/www/web/gallery/designer1.png
   trunk/www/web/gallery/designer2.jpg
   trunk/www/web/gallery/designer2_t.jpg
   trunk/www/web/gallery/designer3.png
   trunk/www/web/gallery/designer4.png
   trunk/www/web/gallery/designer5.png
   trunk/www/web/gallery/designer5_t.png
   trunk/www/web/gallery/designer6.png
   trunk/www/web/gallery/designer6_t.png
   trunk/www/web/gallery/designer7.png
   trunk/www/web/gallery/designer8.png
   trunk/www/web/gallery/forms1.png
   trunk/www/web/gallery/forms10.png
   trunk/www/web/gallery/forms10_t.png
   trunk/www/web/gallery/forms2.jpg
   trunk/www/web/gallery/forms2_t.jpg
   trunk/www/web/gallery/forms3.png
   trunk/www/web/gallery/forms4.png
   trunk/www/web/gallery/forms5.jpg
   trunk/www/web/gallery/forms5_t.jpg
   trunk/www/web/gallery/forms6.jpg
   trunk/www/web/gallery/forms6_t.jpg
   trunk/www/web/gallery/forms7.png
   trunk/www/web/gallery/forms8.jpg
   trunk/www/web/gallery/forms8_t.jpg
   trunk/www/web/gallery/forms9.jpg
   trunk/www/web/gallery/forms9_t.jpg
   trunk/www/web/gallery/navigator1.png
   trunk/www/web/gallery/navigator1_t.png
   trunk/www/web/gallery/navigator2.png
   trunk/www/web/gallery/navigator2_t.png
Modified:
   trunk/www/utils/webhelpers/tools.py
   trunk/www/utils/webhelpers/utils.py
Log:
added technote support

Modified: trunk/www/utils/webhelpers/tools.py
===================================================================
--- trunk/www/utils/webhelpers/tools.py 2004-03-29 22:45:52 UTC (rev 5570)
+++ trunk/www/utils/webhelpers/tools.py 2004-03-29 23:11:20 UTC (rev 5571)
@@ -10,6 +10,7 @@
 
 import sys, os, string
 from StringIO import StringIO
+from xml.sax.saxutils import escape
 from helpers.files import SVN_BASE, addToolLinks, htmlify
 from helpers.tools import Tool
 from helpers.info import DatasourceInfo
@@ -225,6 +226,61 @@
     phpWrapper('tools/%s/docs/faq.php' % tool, html, name + " FAQ")
 
     ##
+    # Write out technotes
+    #
+    html = '<h1><a href="../..">%s</a> Tech Notes</h1>\n' % name
+
+    if not mod.technotes.notes:
+      html += "<p>%s currently has no tech notes.</p>" % name
+
+    current = []
+    deprecated = []
+    obsolete = []
+    for note in mod.technotes.notes:
+      props, text = mod.technotes.getTechnote(note)
+
+      try:
+        title = escape(props['title'])
+      except:
+        print "WARNING: gnue-%s technote %s has no title" % (tool, technum)
+        title = "Untitled"
+
+      technum = note.split('.')[0]
+      t = '<li><a href="%s.php">[%s] %s</a></li>' % (technum, technum, title)
+      try:
+        status = props['status'].lower()
+      except:
+        print "WARNING: gnue-%s technote %s has no status" % (tool, technum)
+        status = 'current'
+
+      if status == 'current':
+        current.append(t)
+      elif status == 'deprecated':
+        deprecated.append(t)
+      elif status == 'obsolete':
+        obsolete.append(t)
+      else:
+        print "WARNING: gnue-%s technote %s has an invalid status: %s" % 
(tool, technum, status)
+        current.append(t)
+
+      html2 = '<h1>%s Tech Note #%s</h1>\n' %  (package.replace('-',' '), 
technum)
+      html2 += '<pre>\n\n%s</pre>\n' % escape(text)
+
+      phpWrapper('tools/%s/docs/technotes/%s.php' % (tool,technum) , html2,
+                "%s Tech Note %s:  %s" % (package.replace('GNUe-',''),
+                          technum, title),  module="developers")
+
+    for n, set in (
+          ('Current',current) ,
+          ('Deprecated',deprecated),
+          ('Obsolete', obsolete) ):
+      if set:
+        html += '<h2>%s Tech Notes</h2>\n<ul>%s</ul>\n' % (n, 
string.join(set,'\n'))
+
+    phpWrapper('tools/%s/docs/technotes/index.php' % tool, html,
+               name + " Tech Notes", module="developers")
+
+    ##
     # Write out tool's roadmap
     #
     html = '<h1><a href="./">%s</a> Roadmap</h1>\n' % name

Modified: trunk/www/utils/webhelpers/utils.py
===================================================================
--- trunk/www/utils/webhelpers/utils.py 2004-03-29 22:45:52 UTC (rev 5570)
+++ trunk/www/utils/webhelpers/utils.py 2004-03-29 23:11:20 UTC (rev 5571)
@@ -5,14 +5,15 @@
 SVN_BASE=os.path.abspath(os.path.join(os.path.dirname(__file__),'../../..'))
 sys.path.insert(0,os.path.join(SVN_BASE,'gnue-common','utils'))
 
-def phpWrapper(file, html, title=""):
+def phpWrapper(file, html, title="", module=""):
   path = file.split('/')
   os.system('mkdir -p %s/%s' % (DEST,string.join(path[:-1],'/')))
   out = open(os.path.join(DEST, file),'w')
 
-  module = path[0]
-  if module not in ('project','tools','packages', 'developers'):
-    module = 'project'
+  if not module:
+    module = path[0]
+    if module not in ('project','tools','packages', 'developers'):
+      module = 'project'
 
   out.write("""\
 <?php $BASEDIR="%s";

Deleted: trunk/www/web/gallery/appserver1.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer1.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer2.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer2_t.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer3.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer4.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer5.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer5_t.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer6.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer6_t.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer7.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/designer8.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms1.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms10.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms10_t.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms2.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms2_t.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms3.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms4.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms5.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms5_t.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms6.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms6_t.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms7.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms8.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms8_t.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms9.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/forms9_t.jpg
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/navigator1.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/navigator1_t.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/navigator2.png
===================================================================
(Binary files differ)

Deleted: trunk/www/web/gallery/navigator2_t.png
===================================================================
(Binary files differ)





reply via email to

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