From: Michael Hanke Date: Sun, 10 Oct 2010 01:40:57 +0000 (-0400) Subject: Split packages lists into software and datasets. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1aa372ec222b6cdec46ca971c0cae516514d8075;p=neurodebian.git Split packages lists into software and datasets. --- diff --git a/neurodebian/dde.py b/neurodebian/dde.py index dc2961c..bb89036 100755 --- a/neurodebian/dde.py +++ b/neurodebian/dde.py @@ -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 index 0000000..ee3e844 --- /dev/null +++ b/neurodebian/templates/datasets_toc.rst @@ -0,0 +1,11 @@ +.. _full_dataset_list: + +Dataset packages +================ + +.. toctree:: + :maxdepth: 1 +{% for p in pkgs|sort %} + pkgs/{{ p }}.rst +{%- endfor %} + diff --git a/neurodebian/templates/pkgs_toc.rst b/neurodebian/templates/pkgs_toc.rst index 9e13be9..3c23bb3 100644 --- a/neurodebian/templates/pkgs_toc.rst +++ b/neurodebian/templates/pkgs_toc.rst @@ -1,7 +1,7 @@ .. _full_pkg_list: -Package list -============ +Software packages +================= .. toctree:: :maxdepth: 1 diff --git a/sphinx/_templates/layout.html b/sphinx/_templates/layout.html index e99d552..9e6eb54 100644 --- a/sphinx/_templates/layout.html +++ b/sphinx/_templates/layout.html @@ -6,9 +6,10 @@ {% block rootrellink %}
  • Debian
  • -
  • Neuroscience Repository »
  • -
  • Package list »
  • -
  • FAQ
  • +
  • Neuroscience Repository
  • +
  • Software
  • +
  • Datasets
  • +
  • FAQ
  • {% endblock %} {% block sidebar1 %}{% endblock %}