[Checkins] SVN: zope.kgs/trunk/src/zope/kgs/template Added a special dir that will be executed for each version.

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Jan 27 05:35:06 EST 2009


Log message for revision 95112:
  Added a special dir that will be executed for each version.
  

Changed:
  U   zope.kgs/trunk/src/zope/kgs/template.py
  A   zope.kgs/trunk/src/zope/kgs/templates/VERSION/
  A   zope.kgs/trunk/src/zope/kgs/templates/VERSION/CHANGES.html

-=-
Modified: zope.kgs/trunk/src/zope/kgs/template.py
===================================================================
--- zope.kgs/trunk/src/zope/kgs/template.py	2009-01-27 10:30:37 UTC (rev 95111)
+++ zope.kgs/trunk/src/zope/kgs/template.py	2009-01-27 10:35:06 UTC (rev 95112)
@@ -60,12 +60,16 @@
             continue
         elif srcPath.endswith('.pt'):
             continue
+        elif srcPath.endswith('.html'):
+            html = Template(srcPath, data, templates)()
+            open(dstPath, 'w').write(html)
+        elif filename == 'VERSION':
+            for version in data['versions']:
+                versionDir = os.path.join(dst, version['name'])
+                generateSite(srcPath, versionDir, data, templates)
         elif os.path.isdir(srcPath):
             if not os.path.exists(dstPath):
                 os.mkdir(dstPath)
             generateSite(srcPath, dstPath, data, templates)
-        elif srcPath.endswith('.html'):
-            html = Template(srcPath, data, templates)()
-            open(dstPath, 'w').write(html)
         else:
             shutil.copyfile(srcPath, dstPath)

Added: zope.kgs/trunk/src/zope/kgs/templates/VERSION/CHANGES.html
===================================================================
--- zope.kgs/trunk/src/zope/kgs/templates/VERSION/CHANGES.html	                        (rev 0)
+++ zope.kgs/trunk/src/zope/kgs/templates/VERSION/CHANGES.html	2009-01-27 10:35:06 UTC (rev 95112)
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html metal:use-macro="templates/master.pt/macros/page" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <title metal:fill-slot="page-title">Changes</title>
+  </head>
+  <body>
+  </body>
+</html>



More information about the Checkins mailing list