]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Split packages lists into software and datasets.
authorMichael Hanke <michael.hanke@gmail.com>
Sun, 10 Oct 2010 01:40:57 +0000 (21:40 -0400)
committerMichael Hanke <michael.hanke@gmail.com>
Sun, 10 Oct 2010 01:40:57 +0000 (21:40 -0400)
neurodebian/dde.py
neurodebian/templates/datasets_toc.rst [new file with mode: 0644]
neurodebian/templates/pkgs_toc.rst
sphinx/_templates/layout.html

index dc2961c1cc589b77f7cc1b64a26f975a4b1225b3..bb8903666e3ca163921cf55e23e54e08acacccc6 100755 (executable)
@@ -633,8 +633,20 @@ def write_pkgpages(jinja_env, cfg, db, outdir, addenum_dir):
     # generate the TOC with all packages
     toc_template = jinja_env.get_template('pkgs_toc.rst')
     toc = codecs.open(os.path.join(outdir, 'pkgs.rst'), 'w', 'utf-8')
-    toc.write(toc_template.render(pkgs=db.keys()))
+    # this is a fragile test
+    toc.write(toc_template.render(
+        pkgs=[k for k in db.keys()
+                if not ('Datasets', 'neurodebian-data') in db[k]]))
     toc.close()
+    # and now only for dataset packages
+    toc_template = jinja_env.get_template('datasets_toc.rst')
+    toc = codecs.open(os.path.join(outdir, 'datasets.rst'), 'w', 'utf-8')
+    # this is a fragile test
+    toc.write(toc_template.render(
+        pkgs=[k for k in db.keys()
+                if ('Datasets', 'neurodebian-data') in db[k]]))
+    toc.close()
+
 
     # and now each individual package page
     pkg_template = jinja_env.get_template('pkg.rst')
diff --git a/neurodebian/templates/datasets_toc.rst b/neurodebian/templates/datasets_toc.rst
new file mode 100644 (file)
index 0000000..ee3e844
--- /dev/null
@@ -0,0 +1,11 @@
+.. _full_dataset_list:
+
+Dataset packages
+================
+
+.. toctree::
+  :maxdepth: 1
+{% for p in pkgs|sort %}
+  pkgs/{{ p }}.rst
+{%- endfor %}
+
index 9e13be94003b23ae98bd1b2154e7144de3055d2a..3c23bb3b0cef50624c336d8588fd882127f0c282 100644 (file)
@@ -1,7 +1,7 @@
 .. _full_pkg_list:
 
-Package list
-============
+Software packages
+=================
 
 .. toctree::
   :maxdepth: 1
index e99d5520437262884a516a3172bb0cbb5ff7d665..9e6eb5436353217c3160f7028e1863e79362cf1c 100644 (file)
@@ -6,9 +6,10 @@
 
 {% block rootrellink %}
   <li><a href="http://www.debian.org" target="_blank">Debian</a> |&nbsp;</li>
-  <li><a href="{{ pathto('index') }}">Neuroscience Repository</a> &raquo;</li>
-  <li><a href="{{ pathto('pkgs') }}">Package list</a> &raquo;</li>
-  <li><a href="{{ pathto('faq') }}">FAQ</a></li>
+  <li><a href="{{ pathto('index') }}">Neuroscience Repository</a> |&nbsp;</li>
+  <li><a href="{{ pathto('pkgs') }}">Software</a> |&nbsp;</li>
+  <li><a href="{{ pathto('datasets') }}">Datasets</a> |&nbsp;</li>
+  <li><a href="{{ pathto('faq') }}">FAQ</a> |&nbsp;</li>
 {% endblock %}
 
 {% block sidebar1 %}{% endblock %}