[Blends-commit] [SCM] website branch, master, updated. 20a4cd5dba0a772a89fa940ddb2e5f16128c6735

Ole Streicher ole at aip.de
Mon May 2 14:08:14 UTC 2016


The following commit has been merged in the master branch:
commit 20a4cd5dba0a772a89fa940ddb2e5f16128c6735
Author: Ole Streicher <ole at aip.de>
Date:   Mon May 2 16:04:52 2016 +0200

    New "Index" keyword in tasks header
    This keyword (default: true) describes whether the task should be included in
    the tasks_idx.html index web page.
    The use of this is to provide additional, informational tasks that can be
    referenced with an URL, but are not part of the blend. In Debian-Astro, it
    will be used to provide a comparison with other astronomy software
    collections, as SciSoft or AstroConda.

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index f2335e3..a77ad88 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -1009,7 +1009,7 @@ class Tasks:
 
     def getPackageNames(self, sections):
         return set(itertools.chain(*(task.getPackageNames(sections)
-                                     for task in self.tasks.values())))
+                                     for task in self.tasks.values() if task.in_tasklist)))
 
 class TaskDependencies:
     # List of depencencies defined in one metapackage
@@ -1045,6 +1045,9 @@ class TaskDependencies:
         # This is NOT YET implemented
         self.metadepends     = None
 
+        # Include the task in the task list? Defaults to True.
+        self.in_tasklist = True
+
     def SetMetapackageInfo(self, pkgname, ddtptranslations=None):
         # Gather information (specifically description translations if exists) about metapackage itself
         self.metapkg             = DependantPackage(pkgname)
@@ -1115,6 +1118,9 @@ class TaskDependencies:
                         self.metapkg.properties['desc']['en']['long']  = longDesc
                         found_description = True
                     continue
+                if key == 'Index':
+                    self.in_tasklist = (stanza['index'].lower() != 'false')
+                    continue
                 if key == 'Meta-Depends':
                     self.metadepends = stanza['meta-depends']
                     continue
diff --git a/webtools/templates/tasks_idx.xhtml b/webtools/templates/tasks_idx.xhtml
index 8d64c06..ae4fe7d 100644
--- a/webtools/templates/tasks_idx.xhtml
+++ b/webtools/templates/tasks_idx.xhtml
@@ -73,7 +73,7 @@ table {
 	</thead>
 	<tbody>
           <py:for each="task in taskskeys">
-	    <tr>
+	    <tr py:if="tasks[task].in_tasklist">
 	      <td style="text-transform:capitalize;">
 		<a href="${task}" name="${task}" id="${task}">
 		  ${tasks[task].metapkg.properties['PrintedName']}

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list