Allow doc string extraction and use for pluginapi.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Fri, 25 Jan 2013 23:12:18 +0000 (00:12 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Fri, 25 Jan 2013 23:15:57 +0000 (00:15 +0100)
Allow us to extract docstrings from our sources using the
sphinx.ext.autodoc module.

First use: Extract some of the docs for the pluginapi and
provide it in a new "Plugin API" section.

docs/source/conf.py
docs/source/index.rst
docs/source/pluginwriter/api.rst [new file with mode: 0644]

index 4209acc8a4c293495fdf1676e73eafc0a5408ce8..8113e247fb190700ed896b570e1638ad99a75397 100644 (file)
@@ -26,7 +26,7 @@ sys.path.insert(0, os.path.abspath(os.path.join('..', '..')))
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = ['sphinx.ext.autodoc']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['source/_templates']
index ac8bd1106a5899a2886d61acbc08ba333c02a7c7..adaafb59944eb7869b7933aff54c87eb02cb3f79 100644 (file)
@@ -70,6 +70,7 @@ This guide covers writing new GNU MediaGoblin plugins.
 
    pluginwriter/foreward
    pluginwriter/quickstart
+   pluginwriter/api
 
 
 Indices and tables
diff --git a/docs/source/pluginwriter/api.rst b/docs/source/pluginwriter/api.rst
new file mode 100644 (file)
index 0000000..206c8b0
--- /dev/null
@@ -0,0 +1,23 @@
+.. MediaGoblin Documentation
+
+   Written in 2013 by MediaGoblin contributors
+
+   To the extent possible under law, the author(s) have dedicated all
+   copyright and related and neighboring rights to this software to
+   the public domain worldwide. This software is distributed without
+   any warranty.
+
+   You should have received a copy of the CC0 Public Domain
+   Dedication along with this software. If not, see
+   <http://creativecommons.org/publicdomain/zero/1.0/>.
+
+
+==========
+Plugin API
+==========
+
+:mod:`pluginapi` Module
+-----------------------
+
+.. automodule:: mediagoblin.tools.pluginapi
+   :members: get_config, register_routes, register_template_path