The following commit has been merged in the master branch:
commit d5b63676efa94171d84c29d0c6c489de141bb319
Author: Andreas Tille <[email protected]>
Date:   Sun Jul 7 00:08:47 2013 +0200

    Add very basic ubuntu thermometer

diff --git a/misc/thermometer/templates/thermometer.xhtml 
b/misc/thermometer/templates/uthermometer.xhtml
similarity index 87%
copy from misc/thermometer/templates/thermometer.xhtml
copy to misc/thermometer/templates/uthermometer.xhtml
index 07c83fb..c9fd00f 100644
--- a/misc/thermometer/templates/thermometer.xhtml
+++ b/misc/thermometer/templates/uthermometer.xhtml
@@ -58,21 +58,21 @@ table.pkg tr.othered {
 -->
 </style>
 <head>
-<title>$projectname Thermometer</title>
+<title>Ubuntu $projectname Thermometer</title>
 <meta http-equiv="Content-Type" content="application/xhtml+xml; 
charset=UTF-8"/>
 <link href="../inc/style.css" type="text/css" rel="stylesheet"/>
 </head>
 <body>
 <table class="pkg">
-<caption><h3>$projectname Package Thermometer</h3></caption>
+<caption><h3>Ubuntu $projectname Package Thermometer</h3></caption>
 <tr class='title'>
  <th>Package</th>
- <th>stable</th><th>testing</th><th>unstable</th><th>stable-bpo</th>
+ 
<th>stable</th><th>testing</th><th>unstable</th><th>stable-bpo</th><th>precise</th><th>quantal</th><th>raring</th>
 </tr>
 <py:for each="pkg in blend_data">
- <tr class='${pkg.debianstatus}'>
+ <tr class='${pkg.ubuntustatus}'>
   <td><strong>${pkg.source}</strong> (<a 
href='http://packages.qa.debian.org/${pkg.source}'>PTS</a>,<a 
href='${pkg.homepage}'>UP</a>)</td>
-  
<td>${pkg.stable}</td><td>${pkg.testing}</td><td>${pkg.unstable}</td><td>${pkg.stable_bpo}</td>
+  
<td>${pkg.stable}</td><td>${pkg.testing}</td><td>${pkg.unstable}</td><td>${pkg.stable_bpo}</td><td>${pkg.precise}</td><td>${pkg.quantal}</td><td>${pkg.raring}</td>
  </tr>
 </py:for>
 </table>
diff --git a/misc/thermometer/thermometer.py b/misc/thermometer/thermometer.py
index bc06ac6..773cf1f 100755
--- a/misc/thermometer/thermometer.py
+++ b/misc/thermometer/thermometer.py
@@ -103,7 +103,13 @@ def main():
                 WHEN stable.version IS NOT NULL AND unstable.version IS NULL 
THEN 'obsolete'
                 WHEN stable.version IS NULL AND testing.version IS NULL AND 
unstable.version IS NULL THEN 'unpackaged'
                 WHEN experimental.version IS NOT NULL OR unreleased.version IS 
NOT NULL THEN 'workInProgress'
-                ELSE 'unknown' END AS debianstatus
+                ELSE 'unknown' END AS debianstatus,
+           CASE WHEN raring.version >= unstable.version THEN 'upToDate'
+                WHEN raring.version <  unstable.version THEN 'ubuntuOutOfDate'
+                WHEN stable.version IS NOT NULL AND unstable.version IS NULL 
THEN 'obsolete'
+                WHEN stable.version IS NULL AND testing.version IS NULL AND 
unstable.version IS NULL THEN 'unpackaged'
+                WHEN experimental.version IS NOT NULL OR unreleased.version IS 
NOT NULL THEN 'workInProgress'
+                ELSE 'unknown' END AS ubuntustatus
      FROM (
       SELECT DISTINCT p.source, '' AS wnpp FROM packages p
       JOIN blends_dependencies bd ON bd.package = p.package
@@ -270,10 +276,11 @@ def main():
     
     t = datetime.now()
     
-    template = loader.load('thermometer.xhtml')
-    outputfile = outputdir + '/' + blendname + '_thermometer.html'
+    outputfile  = outputdir + '/' + blendname + '_thermometer.html'
+    uoutputfile = outputdir + '/ubuntu_' + blendname + '_thermometer.html'
     try:
         os.unlink(outputfile)
+        os.unlink(uoutputfile)
     except: # simply continue if file does not exist
         pass
     
@@ -292,8 +299,13 @@ def main():
     data['updatetimestamp']   = 'Last update:' + ' ' + 
formatdate(time.mktime(t.timetuple()))
     
     f = open(outputfile, 'w')
+    template = loader.load('thermometer.xhtml')
     print >> f, template.generate(**data).render('xhtml')
     f.close()
+    f = open(uoutputfile, 'w')
+    utemplate = loader.load('uthermometer.xhtml')
+    print >> f, utemplate.generate(**data).render('xhtml')
+    f.close()
 
 if __name__ == '__main__':
     main()

-- 
Static and dynamic websites for Debian Pure Blends

_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to