# -*- coding: utf-8 -*-
-# This is a hack of the builtin todo extension, to make the todo_list more user friendly
+# This is a hack of the builtin todo extension, to make the todo_list
+# more user friendly
from sphinx.ext.todo import *
import re
+
def _(s):
return s
if not hasattr(env, 'todo_all_todos'):
env.todo_all_todos = []
-
# remove the item that was added in the constructor, since I'm tired of
# reading through docutils for the proper way to construct an empty list
lists = []
for i in xrange(5):
- lists.append(nodes.bullet_list("", nodes.Text('','')))
+ lists.append(nodes.bullet_list("", nodes.Text('', '')))
lists[i].remove(lists[i][0])
lists[i]['classes'].append('todo_list')
todo_entry = todo_info['todo']
- env.resolve_references(todo_entry, todo_info['docname'], app.builder)
+ env.resolve_references(todo_entry, todo_info['docname'],
+ app.builder)
item = nodes.list_item('', para)
todo_entry[1]['classes'].append('details')
item.append(comment)
- lists[priority-1].insert(0, item)
-
+ lists[priority - 1].insert(0, item)
node.replace_self(lists)
+
def setup(app):
app.add_config_value('todo_include_todos', False, False)
app.connect('doctree-read', process_todos)
app.connect('doctree-resolved', process_todo_nodes)
app.connect('env-purge-doc', purge_todos)
-
# cinder documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
-# This file is execfile()d with the current directory set to its containing dir.
+# This file is execfile()d with the current directory set
+# to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys
+import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('./'))
-# -- General configuration -----------------------------------------------------
+# -- General configuration ----------------------------------------------------
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+# Add any Sphinx extension module names here, as strings.
+# They can be extensions coming with Sphinx (named 'sphinx.ext.*')
+# or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'ext.cinder_todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig','sphinx.ext.graphviz']
+extensions = ['sphinx.ext.autodoc',
+ 'sphinx.ext.intersphinx',
+ 'ext.cinder_todo',
+ 'sphinx.ext.coverage',
+ 'sphinx.ext.pngmath',
+ 'sphinx.ext.ifconfig',
+ 'sphinx.ext.graphviz']
-# autodoc generation is a bit aggressive and a nuisance when doing heavy text edit cycles.
-# execute "export SPHINX_DEBUG=1" in your terminal to disable
+# autodoc generation is a bit aggressive and a nuisance
+# when doing heavy text edit cycles. Execute "export SPHINX_DEBUG=1"
+# in your terminal to disable
if not os.getenv('SPHINX_DEBUG'):
extensions += ['ext.cinder_autodoc']
todo_include_todos = True
# Add any paths that contain templates here, relative to this directory.
-# Changing the path so that the Hudson build output contains GA code and the source
-# docs do not contain the code so local, offline sphinx builds are "clean."
+# Changing the path so that the Hudson build output contains GA code
+# and the source docs do not contain the code so local, offline sphinx builds
+# are "clean."
templates_path = []
if os.getenv('HUDSON_PUBLISH_DOCS'):
- templates_path = ['_ga', '_templates']
+ templates_path = ['_ga', '_templates']
else:
- templates_path = ['_templates']
+ templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
'api_ext/rst_extension_template',
'vmwareapi_readme',
'installer',
- ]
+]
# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = []
-# The reST default role (used for this markup: `text`) to use for all documents.
+# The reST default role (used for this markup: `text`) to use
+# for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['cinder.']
-# -- Options for man page output -----------------------------------------------
+# -- Options for man page output ----------------------------------------------
# Grouping the document tree for man pages.
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
man_pages = [
('man/cinder-manage', 'cinder-manage', u'Cloud controller fabric',
[u'OpenStack'], 1)
- ]
+]
-# -- Options for HTML output ---------------------------------------------------
+# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
htmlhelp_basename = 'cinderdoc'
-# -- Options for LaTeX output --------------------------------------------------
+# -- Options for LaTeX output -------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
+# (source start file, target name, title, author, documentclass
+# [howto/manual]).
latex_documents = [
- ('index', 'Cinder.tex', u'Cinder Documentation',
- u'Anso Labs, LLC', 'manual'),
+ ('index', 'Cinder.tex', u'Cinder Documentation',
+ u'Anso Labs, LLC', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('http://docs.python.org/', None),
'swift': ('http://swift.openstack.org', None)}
-