Adding sphinx proper doc

This commit is contained in:
BJ Dierkes 2010-01-28 05:26:04 -06:00
parent 68fcf67342
commit e91b38e21e
19 changed files with 713 additions and 151 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ examples/CementExample/cement_example.log
examples/CementExample/var
build
dist
doc/build/

View File

@ -20,11 +20,21 @@ def register_default_hooks():
Registers Cement framework hooks.
Hook definitions:
options_hook -- Used to add options to a namespaces options object
post_options_hook -- Run after all options have been setup and merged
validate_config_hook -- Run after config options are setup
pre_plugins_hook -- Run just before all plugins are loaded (run once)
post_plugins_hook -- Run just after all plugins are loaded (run once)
options_hook
Used to add options to a namespaces options object
post_options_hook
Run after all options have been setup and merged
validate_config_hook
Run after config options are setup
pre_plugins_hook
Run just before all plugins are loaded (run once)
post_plugins_hook
Run just after all plugins are loaded (run once)
"""
define_hook('options_hook')
@ -38,8 +48,23 @@ def lay_cement(config=None, banner=None):
Primary method to setup an application for Cement.
Keyword arguments:
config -- Dict containing application config.
banner -- Optional text to display for --version
config
Dict containing application config.
banner
Optional text to display for --version
Usage:
.. code-block:: python
from cement.core.configuration import get_default_config
from cement.core.app_setup import lay_cement
lay_cement(get_default_config())
"""
global namespaces

View File

@ -19,8 +19,10 @@ def run_command(cmd_name=None):
decorator used on a Controller function.
Keyword arguments:
cmd_name -- The command name as store in the global 'namespaces'. For
example, namespaces['root'].commands['cmd_name'].
cmd_name
The command name as store in the global 'namespaces'. For
example, namespaces['root'].commands['cmd_name'].
"""
log.debug("processing passed command '%s'", cmd_name)
@ -71,10 +73,7 @@ def run_command(cmd_name=None):
cmd = namespaces[namespace].commands[actual_cmd]
log.debug("executing command '%s'" % actual_cmd)
run_controller_command(cmd['controller_namespace'], cmd['func'],
cli_opts, cli_args)
cli_opts, cli_args)
else:
raise CementArgumentError, "Unknown command '%s', see --help?" % actual_cmd

View File

@ -32,11 +32,28 @@ namespaces = {}
def get_api_version():
"""Get the Cement API Version"""
"""Get the Cement API Version."""
return CEMENT_API
def ensure_api_compat(module_name, required_api):
"""Ensure the application is compatible with this version of Cement."""
"""
Ensure the application is compatible with this version of Cement.
Required Arguments:
module_name
Name of the applications module.
required_api
The Cement API version required by the application.
Possible Exceptions:
CementRuntimeError
Raised if required_api/CEMENT_API do not match.
"""
if required_api == CEMENT_API:
pass
else:
@ -48,6 +65,18 @@ def t_f_pass(value):
"""
A quick hack for making true/false type values actually True/False in
python.
Required arguments:
value
The presumed 'true' or 'false' value.
Returns:
boolean
True/False based on logic of the operation.
"""
try:
if str(value.lower()) in ['true', True]:
@ -65,9 +94,16 @@ def set_config_opts_per_file(namespace, section, config_file):
config file does not exist.
Required arguments:
namespace -- The namespace to set config options for
section -- Section of the configuration file to read.
config_file -- The config file to parse.
namespace
The namespace to set config options for
section
Section of the configuration file to read.
config_file
The config file to parse.
"""
config = namespaces[namespace].config
@ -124,9 +160,17 @@ def set_config_opts_per_file(namespace, section, config_file):
def set_config_opts_per_cli_opts(namespace, cli_opts):
"""
Determine if any config optons were passed via cli options, and if so
override the config option.
override the config option. Overwrites the global
namespaces['namespace'].config dict.
Required arguments:
namespace
The namespace of whose config to modify.
cli_opts
The cli_opts as parsed from OptParse.
Returns the updated config dict.
"""
for opt in namespaces[namespace].config:
try:
@ -138,7 +182,21 @@ def set_config_opts_per_cli_opts(namespace, cli_opts):
def validate_config(config):
"""
Validate that all required cement configuration options are set.
Validate that all required cement configuration options are set. Also
creates any common directories based on config settings if they do not
exist.
Required arguments:
config
The config dict to validate.
Possible Exceptions:
CementConfigError
Raised on invalid configuration.
"""
required_settings = [
'config_source', 'config_files', 'debug', 'datadir',

View File

@ -18,6 +18,30 @@ class CementController(object):
pass
def run_controller_command(namespace, func, *args, **kwargs):
"""
Cleanly run a command function from a controller.
Arguments:
namespace
The namespace of the controller
func
The name of the function
args
Any additional arguments to pass to the function
kwargs
Any additional keyword arguments to pass to the function.
Usage:
.. code-block:: python
from cement.core.controller import run_controller_command
run_controller_command('root', 'cmd_name', myarg=True)
"""
controller = namespaces[namespace].controller()
func = getattr(controller, func)(*args, **kwargs)
@ -28,20 +52,29 @@ class expose(object):
Arguments:
template -- A template in python module form
(i.e 'myapp.templates.mytemplate')
namespace -- The namespace to expose the command in. Default: root
template
A template in python module form (i.e 'myapp.templates.mytemplate')
namespace
The namespace to expose the command in. Default: root
Optional Keyword Arguments:
is_hidden -- True/False whether command should display on --help.
Usage:
is_hidden
True/False whether command should display on --help.
@expose('app_module.view.template', namespace='namespace')
def mycommand(self):
...
Usage:
.. code-block:: python
class MyController(CementController):
@expose('myapp.templates.mycontroller.cmd', namespace='root')
def cmd(self):
foo="Foo"
bar="Bar"
return dict(foo=foo, bar=bar)
"""
def __init__(self, template=None, namespace='root', **kwargs):
# These get set in __call__

View File

@ -11,8 +11,19 @@ def define_hook(name):
Define a hook namespace that plugins can register hooks in.
Required arguments:
name -- The name of the hook, stored as hooks['name']
name
The name of the hook, stored as hooks['name']
Usage:
.. code-block:: python
from cement.core.hook import define_hook
define_hook('myhookname_hook')
"""
log.debug("defining hook '%s'", name)
if hooks.has_key(name):
@ -25,12 +36,21 @@ def register_hook(**kwargs):
Decorator function for plugins to register hooks. Used as:
Optional keyword arguments:
weight -- The weight in which to order the hook function (default: 0)
weight
The weight in which to order the hook function (default: 0)
Usage:
.. code-block:: python
from cement.core.hook import register_hook
@register_hook()
def my_hook():
...
def my_hook(*args, **kwargs):
# do something here
res = 'Something to return'
return res
"""
def decorate(func):
@ -54,12 +74,22 @@ def run_hooks(*args, **kwargs):
function run.
Optional arguments:
name -- The name of the hook function
args -- Any additional args are passed to the hook function
kwargs -- Any kwargs are passed to the hook function
name
The name of the hook function
args
Any additional args are passed to the hook function
kwargs
Any kwargs are passed to the hook function
Usage:
for res in run_hooks('hook_name'):
.. code-block:: python
from cement.core.hook import run_hook
for result in run_hooks('hook_name'):
# do something with result from each hook function
...
"""

View File

@ -9,10 +9,22 @@ def setup_logging(clear_loggers=True, level=None, to_console=True):
Primary Cement method to setup logging.
Keyword arguments:
clear_loggers -- Boolean, whether to clean exiting loggers (default: True)
level -- The log level (info, warn, error, debug, fatal), (default: None)
to_console -- Boolean, whether or not to log to console
clear_loggers
Boolean, whether to clean exiting loggers (default: True)
level
The log level (info, warn, error, debug, fatal), (default: None)
to_console
Boolean, whether or not to log to console
Usage:
.. code-block:: python
from cement.core.log import setup_logging
setup_logging()
"""
config = namespaces['root'].config
all_levels = ['INFO', 'WARN', 'ERROR', 'DEBUG', 'FATAL']
@ -82,9 +94,15 @@ def get_logger(name):
of 'name' (should be passed as __name__).
Arguments:
name -- Name of the module calling get_logger (use __name__).
name
Name of the module calling get_logger (use __name__).
Usage:
.. code-block:: python
from cement.core.log import get_logger
log = get_logger(__name__)
"""

View File

@ -8,26 +8,33 @@ from cement.core.opt import init_parser
class CementNamespace(object):
"""
Class that handles plugins and namespaces.
Required Arguments:
label
Namespace label. Class is stored in the global 'namespaces'
dict as namespaces['label'].
version
The version of the application.
required_api
The required Cement API the application was built on.
Optional Keyword Arguments:
description
Description of the plugin/namespace (default: '')
commands
A dict of command functions (default: {})
is_hidden
Boolean, whether command should display in --help output
(default: False)
config
A config dict (default: None)
banner
A version banner to display for --version (default: '')
"""
def __init__(self, label, version, required_api, **kw):
"""
Initialize CementNamespace class.
Required arguments:
label -- Namespace label. Class is stored in the global
'namespaces' dict as namespaces['label'].
version -- The version of the application.
required_api-- The required Cement API the application was built on.
Optional keyword arguments:
description -- Description of the plugin/namespace (default: '')
commands -- A dict of command functions (default: {})
is_hidden -- Boolean, whether command should display in --help
output (default: False)
config -- A config dict (default: None)
banner -- A version banner to display for --version (default: '')
"""
self.label = label
self.version = version
self.required_api = required_api
@ -50,10 +57,13 @@ def define_namespace(namespace, namespace_obj):
"""
Define a namespace for commands, options, configuration, etc.
Keyword arguments:
namespace -- Label of the namespace
namespace_obj -- CementNamespace object. Stored in global 'namespaces'
dict as namespaces['namespace']
Required Arguments:
namespace
Label of the namespace
namespace_obj
CementNamespace object. Stored in global 'namespaces' dict as
namespaces['namespace']
"""
if namespaces.has_key(namespace):

View File

@ -7,35 +7,6 @@ from cement import namespaces
from cement.core.log import get_logger
log = get_logger(__name__)
#class Options(object):
# """
# This class is used to setup the OptParse object for later use, and is
# the object that is passed around thoughout the application.
# """
# def __init__(self):
# self.parser = None
# self.init_parser()
#
# def add_default_options(self):
# """
# Sets up default options for applications using Cement.
# """
# pass
#
# def init_parser(self, version_banner=None):
# """
# Sets up the Options object and returns it for use throughout the
# application.
#
# Arguments
#
# version_banner => option txt to be display for --version.
# """
# fmt = IndentedHelpFormatter(
# indent_increment=4, max_help_position=32, width=77, short_first=1
# )
# self.parser = OptionParser(formatter=fmt, version=version_banner)
def init_parser(banner=None):
@ -43,7 +14,11 @@ def init_parser(banner=None):
Create an OptionParser object and returns its parser member.
Keyword arguments:
banner -- Optional version banner to display for --version
banner
Optional version banner to display for --version
Returns: OptionParser object.
"""
fmt = IndentedHelpFormatter(
@ -60,11 +35,12 @@ def parse_options(namespace='root'):
also handles merging root options into plugins, if the plugins config
is set to do so (merge_root_options)
Keyword arguments:
namespace -- The namespace to parse options for (defaullt: 'root')
Required Arguments:
Returns:
tuple -- (options, args)
namespace
The namespace to parse options for (defaullt: 'root')
Returns: tuple (options, args)
"""

View File

@ -23,20 +23,31 @@ def register_plugin(**kwargs):
Decorator function to register plugin namespace.
Usage:
.. code-block:: python
from cement.core.plugin import register_plugin
@register_plugin()
class myplugin(CementPlugin):
...
class ExamplePlugin(CementPlugin):
def __init__(self):
CementPlugin.__init__(self,
label='example',
version='0.1',
description='Example plugin',
required_api='0.5-0.6:20100115',
controller = 'ExampleController'
)
*Note: 'ExampleController' should match up with the controller object in
myapp.controllers.example.ExampleController.*
"""
def decorate(func):
"""
Decorate a plugin class and add the namespace to global namespaces
dictionary (not the 'root' namespace).
dictionary.
Arguments:
func -- The function to decorate
Returns:
func -- The original function
"""
nms = func.__module__.split('.')
inst_func = func()
@ -64,7 +75,10 @@ def load_plugin(plugin):
Load a cement plugin.
Required arguments:
plugin -- Name of the plugin to load
plugin
Name of the plugin to load. Should be accessible from the module
path of 'myapp.plugins.myplugin'.
"""
config = namespaces['root'].config
@ -110,6 +124,7 @@ def load_all_plugins():
"""
Attempt to load all enabled plugins. Passes the existing config and
options object to each plugin and allows them to add/update each.
"""
for res in run_hooks('pre_plugins_hook'):
pass # No result expected

View File

@ -17,22 +17,20 @@ log = get_logger(__name__)
class render(object):
"""
Class decorator to render data with Genshi text formatting engine or json.
Called when the function is decorated, sets up the engine and template for
later use. If not passed a template, render will do nothing (unless
--json is passed, by which json is returned).
*Note: This is called form the cement.core.controller.expose() decorator
and likely shouldn't ever be needed to call directly.*
Keywork arguments:
template
The module path to the template (default: None)
"""
def __init__(self, template=None):
"""
Called when the function is decorated, sets up the engine and
template for later use. If not passed a template, render will do
nothing (unless --json is passed, by which json is returned).
Keywork arguments:
template -- The module path to the template (default: None)
Usage:
@expose('myapp.templates.myplugin.template_name')
def mycommand(self, *args, *kwargs)
...
"""
self.func = None
self.template = template
self.tmpl_module = None

View File

@ -1 +1,25 @@
"""
The module handles the integration with PasteScript enabling the following
plugins to the 'paste' command line utility:
cement-app
Generates a base application built on Cement.
cement-plugin
Generates an external plugin for an application built on Cement.
cement-helper
Generates an external helper for an application built on Cement.
Usage:
.. code-block::
$ paster cement-app helloworld
$ paster cement-plugin helloworld myplugin
$ paster cement-helper helloworld myhelper
"""
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -30,35 +30,7 @@ Copyright (c) 2008 TurboGears Team
-----------------------------------------------------------------------------
Paste commands to a generate a new Cement projects and plugins.
Create a new project named helloworld with this command:
$ paster cement-app helloworld
Create a new plugin for the helloworld project with this command:
$ paster cement-plugin helloworld myplugin
Usage:
.. parsed-literal::
paster cement-app [--version][-h|--help]
[--dry-run][-t|--templates *TEMPLATES*]
.. container:: paster-usage
--version
show program's version number and exit
-h, --help
show this help message and exit
--dry-run
dry run (don't actually do anything)
-t *TEMPLATES*, --templates=*TEMPLATES*
user specific template
Paste commands to generate a new Cement projects and plugins.
"""
@ -92,6 +64,7 @@ class CementAppCommand(command.Command):
Example usage::
$ paster cement-app yourproject
"""
version = CEMENT_VERSION
summary = __doc__.splitlines()[0]

89
doc/Makefile Normal file
View File

@ -0,0 +1,89 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TheCementCLIApplicationFramework.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TheCementCLIApplicationFramework.qhc"
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

11
doc/source/api.rst Normal file
View File

@ -0,0 +1,11 @@
Cement API Documentation
========================
This page contains the internal API documentation for the Cement Framework.
.. toctree::
:maxdepth: 20
api/core
api/paste

85
doc/source/api/core.rst Normal file
View File

@ -0,0 +1,85 @@
Cement Core API Documentation
=============================
:mod:`cement.core.app_setup`
--------------------------------
.. automodule:: cement.core.app_setup
:members:
:mod:`cement.core.command`
------------------------------
.. automodule:: cement.core.command
:members:
:mod:`cement.core.configuration`
------------------------------------
.. automodule:: cement.core.configuration
:members:
:mod:`cement.core.controller`
---------------------------------
.. automodule:: cement.core.controller
:members:
:mod:`cement.core.exc`
--------------------------
.. automodule:: cement.core.exc
:members:
:mod:`cement.core.hook`
---------------------------
.. automodule:: cement.core.hook
:members:
:mod:`cement.core.log`
--------------------------
.. automodule:: cement.core.log
:members:
:mod:`cement.core.namespace`
--------------------------------
.. automodule:: cement.core.namespace
:members:
:mod:`cement.core.opt`
--------------------------
.. automodule:: cement.core.opt
:members:
:mod:`cement.core.plugin`
-----------------------------
.. automodule:: cement.core.plugin
:members:
:mod:`cement.core.util`
---------------------------
.. automodule:: cement.core.util
:members:
:mod:`cement.core.view`
---------------------------
.. automodule:: cement.core.view
:members:

194
doc/source/conf.py Normal file
View File

@ -0,0 +1,194 @@
# -*- coding: utf-8 -*-
#
# The Cement CLI Application Framework documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 28 02:44:35 2010.
#
# 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
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
# -- 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.
extensions = ['sphinx.ext.autodoc']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Cement'
copyright = u'2009, BJ Dierkes'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.5'
# The full version, including alpha/beta/rc tags.
release = '0.5.4'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
#unused_docs = []
# 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.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- 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'.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_use_modindex = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'Cementdoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Cement.tex', u'Cement Documentation',
u'BJ Dierkes', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_use_modindex = True

21
doc/source/index.rst Normal file
View File

@ -0,0 +1,21 @@
.. The Cement CLI Application Framework documentation master file, created by
sphinx-quickstart on Thu Jan 28 02:44:35 2010.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to The Cement Framework's documentation!
================================================================
Contents:
.. toctree::
:maxdepth: 2
api
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -95,6 +95,8 @@ setup(name='Cement',
# Only required if you want to use paster
"PasteScript",
"tempita",
# Required for documentation
# "Pygments",
],
setup_requires=[
"ConfigObj",