mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
488 lines
18 KiB
Python
488 lines
18 KiB
Python
12 years ago
|
#!/usr/bin/env python
|
||
|
# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>
|
||
10 years ago
|
# (c) 2012-2014, Michael DeHaan <michael@ansible.com> and others
|
||
12 years ago
|
#
|
||
|
# This file is part of Ansible
|
||
|
#
|
||
|
# Ansible is free software: you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU General Public License as published by
|
||
|
# the Free Software Foundation, either version 3 of the License, or
|
||
|
# (at your option) any later version.
|
||
|
#
|
||
|
# Ansible is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||
|
#
|
||
|
|
||
9 years ago
|
from __future__ import print_function
|
||
8 years ago
|
__metaclass__ = type
|
||
9 years ago
|
|
||
12 years ago
|
import os
|
||
12 years ago
|
import glob
|
||
12 years ago
|
import sys
|
||
|
import yaml
|
||
|
import re
|
||
12 years ago
|
import optparse
|
||
12 years ago
|
import datetime
|
||
12 years ago
|
import cgi
|
||
9 years ago
|
import warnings
|
||
9 years ago
|
from collections import defaultdict
|
||
|
|
||
11 years ago
|
from jinja2 import Environment, FileSystemLoader
|
||
9 years ago
|
from six import iteritems
|
||
11 years ago
|
|
||
8 years ago
|
from ansible.errors import AnsibleError
|
||
|
from ansible.module_utils._text import to_bytes
|
||
8 years ago
|
from ansible.utils import plugin_docs
|
||
12 years ago
|
|
||
11 years ago
|
#####################################################################################
|
||
|
# constants and paths
|
||
|
|
||
11 years ago
|
# if a module is added in a version of Ansible older than this, don't print the version added information
|
||
|
# in the module documentation because everyone is assumed to be running something newer than this already.
|
||
9 years ago
|
TO_OLD_TO_BE_NOTABLE = 1.3
|
||
11 years ago
|
|
||
12 years ago
|
# Get parent directory of the directory this script lives in
|
||
|
MODULEDIR=os.path.abspath(os.path.join(
|
||
10 years ago
|
os.path.dirname(os.path.realpath(__file__)), os.pardir, 'lib', 'ansible', 'modules'
|
||
11 years ago
|
))
|
||
|
|
||
|
# The name of the DOCUMENTATION template
|
||
12 years ago
|
EXAMPLE_YAML=os.path.abspath(os.path.join(
|
||
11 years ago
|
os.path.dirname(os.path.realpath(__file__)), os.pardir, 'examples', 'DOCUMENTATION.yml'
|
||
|
))
|
||
12 years ago
|
|
||
|
_ITALIC = re.compile(r"I\(([^)]+)\)")
|
||
|
_BOLD = re.compile(r"B\(([^)]+)\)")
|
||
|
_MODULE = re.compile(r"M\(([^)]+)\)")
|
||
|
_URL = re.compile(r"U\(([^)]+)\)")
|
||
|
_CONST = re.compile(r"C\(([^)]+)\)")
|
||
|
|
||
10 years ago
|
DEPRECATED = " (D)"
|
||
11 years ago
|
#####################################################################################
|
||
12 years ago
|
|
||
|
def rst_ify(text):
|
||
11 years ago
|
''' convert symbols like I(this is in italics) to valid restructured text '''
|
||
12 years ago
|
|
||
9 years ago
|
try:
|
||
|
t = _ITALIC.sub(r'*' + r"\1" + r"*", text)
|
||
|
t = _BOLD.sub(r'**' + r"\1" + r"**", t)
|
||
|
t = _MODULE.sub(r':ref:`' + r"\1 <\1>" + r"`", t)
|
||
|
t = _URL.sub(r"\1", t)
|
||
|
t = _CONST.sub(r'``' + r"\1" + r"``", t)
|
||
|
except Exception as e:
|
||
|
raise AnsibleError("Could not process (%s) : %s" % (str(text), str(e)))
|
||
12 years ago
|
|
||
|
return t
|
||
|
|
||
11 years ago
|
#####################################################################################
|
||
12 years ago
|
|
||
11 years ago
|
def html_ify(text):
|
||
|
''' convert symbols like I(this is in italics) to valid HTML '''
|
||
12 years ago
|
|
||
12 years ago
|
t = cgi.escape(text)
|
||
11 years ago
|
t = _ITALIC.sub("<em>" + r"\1" + "</em>", t)
|
||
|
t = _BOLD.sub("<b>" + r"\1" + "</b>", t)
|
||
|
t = _MODULE.sub("<span class='module'>" + r"\1" + "</span>", t)
|
||
|
t = _URL.sub("<a href='" + r"\1" + "'>" + r"\1" + "</a>", t)
|
||
|
t = _CONST.sub("<code>" + r"\1" + "</code>", t)
|
||
12 years ago
|
|
||
|
return t
|
||
|
|
||
11 years ago
|
|
||
|
#####################################################################################
|
||
|
|
||
12 years ago
|
def rst_fmt(text, fmt):
|
||
11 years ago
|
''' helper for Jinja2 to do format strings '''
|
||
|
|
||
12 years ago
|
return fmt % (text)
|
||
|
|
||
11 years ago
|
#####################################################################################
|
||
|
|
||
12 years ago
|
def rst_xline(width, char="="):
|
||
11 years ago
|
''' return a restructured text line of a given length '''
|
||
|
|
||
12 years ago
|
return char * width
|
||
|
|
||
11 years ago
|
#####################################################################################
|
||
12 years ago
|
|
||
11 years ago
|
def write_data(text, options, outputname, module):
|
||
11 years ago
|
''' dumps module output to a file or the screen, as requested '''
|
||
|
|
||
12 years ago
|
if options.output_dir is not None:
|
||
10 years ago
|
fname = os.path.join(options.output_dir, outputname % module)
|
||
|
fname = fname.replace(".py","")
|
||
|
f = open(fname, 'w')
|
||
12 years ago
|
f.write(text.encode('utf-8'))
|
||
12 years ago
|
f.close()
|
||
|
else:
|
||
9 years ago
|
print(text)
|
||
12 years ago
|
|
||
11 years ago
|
#####################################################################################
|
||
|
|
||
10 years ago
|
|
||
10 years ago
|
def list_modules(module_dir, depth=0):
|
||
11 years ago
|
''' returns a hash of categories, each category being a hash of module names to file paths '''
|
||
|
|
||
9 years ago
|
categories = dict()
|
||
|
module_info = dict()
|
||
|
aliases = defaultdict(set)
|
||
|
|
||
|
# * windows powershell modules have documentation stubs in python docstring
|
||
|
# format (they are not executed) so skip the ps1 format files
|
||
|
# * One glob level for every module level that we're going to traverse
|
||
8 years ago
|
files = (
|
||
|
glob.glob("%s/*.py" % module_dir) +
|
||
|
glob.glob("%s/*/*.py" % module_dir) +
|
||
|
glob.glob("%s/*/*/*.py" % module_dir) +
|
||
|
glob.glob("%s/*/*/*/*.py" % module_dir)
|
||
|
)
|
||
9 years ago
|
|
||
|
for module_path in files:
|
||
|
if module_path.endswith('__init__.py'):
|
||
|
continue
|
||
|
category = categories
|
||
8 years ago
|
mod_path_only = module_path
|
||
9 years ago
|
# Start at the second directory because we don't want the "vendor"
|
||
8 years ago
|
|
||
|
mod_path_only = os.path.dirname(module_path[len(module_dir):])
|
||
|
|
||
9 years ago
|
# directories (core, extras)
|
||
|
for new_cat in mod_path_only.split('/')[1:]:
|
||
|
if new_cat not in category:
|
||
|
category[new_cat] = dict()
|
||
|
category = category[new_cat]
|
||
|
|
||
|
module = os.path.splitext(os.path.basename(module_path))[0]
|
||
8 years ago
|
if module in plugin_docs.BLACKLIST['MODULE']:
|
||
9 years ago
|
# Do not list blacklisted modules
|
||
|
continue
|
||
|
if module.startswith("_") and os.path.islink(module_path):
|
||
|
source = os.path.splitext(os.path.basename(os.path.realpath(module_path)))[0]
|
||
|
module = module.replace("_","",1)
|
||
|
aliases[source].add(module)
|
||
|
continue
|
||
|
|
||
|
category[module] = module_path
|
||
|
module_info[module] = module_path
|
||
|
|
||
|
# keep module tests out of becoming module docs
|
||
9 years ago
|
if 'test' in categories:
|
||
|
del categories['test']
|
||
|
|
||
9 years ago
|
return module_info, categories, aliases
|
||
12 years ago
|
|
||
11 years ago
|
#####################################################################################
|
||
|
|
||
|
def generate_parser():
|
||
|
''' generate an optparse parser '''
|
||
12 years ago
|
|
||
12 years ago
|
p = optparse.OptionParser(
|
||
|
version='%prog 1.0',
|
||
|
usage='usage: %prog [options] arg1 arg2',
|
||
11 years ago
|
description='Generate module documentation from metadata',
|
||
12 years ago
|
)
|
||
|
|
||
11 years ago
|
p.add_option("-A", "--ansible-version", action="store", dest="ansible_version", default="unknown", help="Ansible version number")
|
||
|
p.add_option("-M", "--module-dir", action="store", dest="module_dir", default=MODULEDIR, help="Ansible library path")
|
||
|
p.add_option("-T", "--template-dir", action="store", dest="template_dir", default="hacking/templates", help="directory containing Jinja2 templates")
|
||
11 years ago
|
p.add_option("-t", "--type", action='store', dest='type', choices=['rst'], default='rst', help="Document type")
|
||
11 years ago
|
p.add_option("-v", "--verbose", action='store_true', default=False, help="Verbose")
|
||
11 years ago
|
p.add_option("-o", "--output-dir", action="store", dest="output_dir", default=None, help="Output directory for module files")
|
||
|
p.add_option("-I", "--includes-file", action="store", dest="includes_file", default=None, help="Create a file containing list of processed modules")
|
||
12 years ago
|
p.add_option('-V', action='version', help='Show version number and exit')
|
||
11 years ago
|
return p
|
||
12 years ago
|
|
||
11 years ago
|
#####################################################################################
|
||
12 years ago
|
|
||
11 years ago
|
def jinja2_environment(template_dir, typ):
|
||
12 years ago
|
|
||
11 years ago
|
env = Environment(loader=FileSystemLoader(template_dir),
|
||
12 years ago
|
variable_start_string="@{",
|
||
|
variable_end_string="}@",
|
||
12 years ago
|
trim_blocks=True,
|
||
12 years ago
|
)
|
||
12 years ago
|
env.globals['xline'] = rst_xline
|
||
12 years ago
|
|
||
11 years ago
|
if typ == 'rst':
|
||
11 years ago
|
env.filters['convert_symbols_to_format'] = rst_ify
|
||
12 years ago
|
env.filters['html_ify'] = html_ify
|
||
12 years ago
|
env.filters['fmt'] = rst_fmt
|
||
|
env.filters['xline'] = rst_xline
|
||
8 years ago
|
template = env.get_template('plugin.rst.j2')
|
||
11 years ago
|
outputname = "%s_module.rst"
|
||
11 years ago
|
else:
|
||
|
raise Exception("unknown module format type: %s" % typ)
|
||
12 years ago
|
|
||
11 years ago
|
return env, template, outputname
|
||
12 years ago
|
|
||
11 years ago
|
#####################################################################################
|
||
9 years ago
|
def too_old(added):
|
||
|
if not added:
|
||
|
return False
|
||
|
try:
|
||
|
added_tokens = str(added).split(".")
|
||
|
readded = added_tokens[0] + "." + added_tokens[1]
|
||
|
added_float = float(readded)
|
||
|
except ValueError as e:
|
||
|
warnings.warn("Could not parse %s: %s" % (added, str(e)))
|
||
|
return False
|
||
|
return (added_float < TO_OLD_TO_BE_NOTABLE)
|
||
12 years ago
|
|
||
10 years ago
|
def process_module(module, options, env, template, outputname, module_map, aliases):
|
||
11 years ago
|
|
||
|
fname = module_map[module]
|
||
10 years ago
|
if isinstance(fname, dict):
|
||
|
return "SKIPPED"
|
||
|
|
||
10 years ago
|
basename = os.path.basename(fname)
|
||
|
deprecated = False
|
||
11 years ago
|
|
||
|
# ignore files with extensions
|
||
10 years ago
|
if not basename.endswith(".py"):
|
||
11 years ago
|
return
|
||
10 years ago
|
elif module.startswith("_"):
|
||
|
if os.path.islink(fname):
|
||
|
return # ignore, its an alias
|
||
10 years ago
|
deprecated = True
|
||
10 years ago
|
module = module.replace("_","",1)
|
||
|
|
||
9 years ago
|
print("rendering: %s" % module)
|
||
11 years ago
|
|
||
|
# use ansible core library to parse out doc metadata YAML and plaintext examples
|
||
8 years ago
|
doc, examples, returndocs, metadata = plugin_docs.get_docstring(fname, verbose=options.verbose)
|
||
11 years ago
|
|
||
|
# crash if module is missing documentation and not explicitly hidden from docs index
|
||
|
if doc is None:
|
||
8 years ago
|
sys.exit("*** ERROR: MODULE MISSING DOCUMENTATION: %s, %s ***\n" % (fname, module))
|
||
10 years ago
|
|
||
8 years ago
|
if metadata is None:
|
||
8 years ago
|
sys.exit("*** ERROR: MODULE MISSING METADATA: %s, %s ***\n" % (fname, module))
|
||
8 years ago
|
|
||
10 years ago
|
if deprecated and 'deprecated' not in doc:
|
||
8 years ago
|
sys.exit("*** ERROR: DEPRECATED MODULE MISSING 'deprecated' DOCUMENTATION: %s, %s ***\n" % (fname, module))
|
||
11 years ago
|
|
||
10 years ago
|
if module in aliases:
|
||
|
doc['aliases'] = aliases[module]
|
||
10 years ago
|
|
||
11 years ago
|
all_keys = []
|
||
12 years ago
|
|
||
11 years ago
|
if not 'version_added' in doc:
|
||
8 years ago
|
sys.exit("*** ERROR: missing version_added in: %s ***\n" % module)
|
||
11 years ago
|
|
||
|
added = 0
|
||
|
if doc['version_added'] == 'historical':
|
||
|
del doc['version_added']
|
||
|
else:
|
||
|
added = doc['version_added']
|
||
|
|
||
|
# don't show version added information if it's too old to be called out
|
||
9 years ago
|
if too_old(added):
|
||
|
del doc['version_added']
|
||
11 years ago
|
|
||
9 years ago
|
if 'options' in doc and doc['options']:
|
||
9 years ago
|
for (k,v) in iteritems(doc['options']):
|
||
9 years ago
|
# don't show version added information if it's too old to be called out
|
||
|
if 'version_added' in doc['options'][k] and too_old(doc['options'][k]['version_added']):
|
||
|
del doc['options'][k]['version_added']
|
||
9 years ago
|
if not 'description' in doc['options'][k]:
|
||
|
raise AnsibleError("Missing required description for option %s in %s " % (k, module))
|
||
9 years ago
|
|
||
|
required_value = doc['options'][k].get('required', False)
|
||
|
if not isinstance(required_value, bool):
|
||
|
raise AnsibleError("Invalid required value '%s' for option '%s' in '%s' (must be truthy)" % (required_value, k, module))
|
||
9 years ago
|
if not isinstance(doc['options'][k]['description'],list):
|
||
|
doc['options'][k]['description'] = [doc['options'][k]['description']]
|
||
|
|
||
10 years ago
|
all_keys.append(k)
|
||
10 years ago
|
|
||
11 years ago
|
all_keys = sorted(all_keys)
|
||
|
|
||
10 years ago
|
doc['option_keys'] = all_keys
|
||
11 years ago
|
doc['filename'] = fname
|
||
|
doc['docuri'] = doc['module'].replace('_', '-')
|
||
|
doc['now_date'] = datetime.date.today().strftime('%Y-%m-%d')
|
||
|
doc['ansible_version'] = options.ansible_version
|
||
|
doc['plainexamples'] = examples #plain text
|
||
8 years ago
|
doc['metadata'] = metadata
|
||
|
|
||
10 years ago
|
if returndocs:
|
||
9 years ago
|
try:
|
||
|
doc['returndocs'] = yaml.safe_load(returndocs)
|
||
|
except:
|
||
|
print("could not load yaml: %s" % returndocs)
|
||
|
raise
|
||
10 years ago
|
else:
|
||
|
doc['returndocs'] = None
|
||
11 years ago
|
|
||
|
# here is where we build the table of contents...
|
||
|
|
||
9 years ago
|
try:
|
||
|
text = template.render(doc)
|
||
|
except Exception as e:
|
||
|
raise AnsibleError("Failed to render doc for %s: %s" % (fname, str(e)))
|
||
11 years ago
|
write_data(text, options, outputname, module)
|
||
10 years ago
|
return doc['short_description']
|
||
12 years ago
|
|
||
11 years ago
|
#####################################################################################
|
||
11 years ago
|
|
||
8 years ago
|
def print_modules(module, category_file, deprecated, options, env, template, outputname, module_map, aliases):
|
||
10 years ago
|
modstring = module
|
||
9 years ago
|
if modstring.startswith('_'):
|
||
|
modstring = module[1:]
|
||
|
modname = modstring
|
||
10 years ago
|
if module in deprecated:
|
||
|
modstring = modstring + DEPRECATED
|
||
|
|
||
9 years ago
|
category_file.write(" %s - %s <%s_module>\n" % (to_bytes(modstring), to_bytes(rst_ify(module_map[module][1])), to_bytes(modname)))
|
||
10 years ago
|
|
||
11 years ago
|
def process_category(category, categories, options, env, template, outputname):
|
||
11 years ago
|
|
||
9 years ago
|
### FIXME:
|
||
|
# We no longer conceptually deal with a mapping of category names to
|
||
|
# modules to file paths. Instead we want several different records:
|
||
|
# (1) Mapping of module names to file paths (what's presently used
|
||
|
# as categories['all']
|
||
|
# (2) Mapping of category names to lists of module names (what you'd
|
||
|
# presently get from categories[category_name][subcategory_name].keys()
|
||
|
# (3) aliases (what's presently in categories['_aliases']
|
||
|
#
|
||
|
# list_modules() now returns those. Need to refactor this function and
|
||
|
# main to work with them.
|
||
|
|
||
11 years ago
|
module_map = categories[category]
|
||
9 years ago
|
module_info = categories['all']
|
||
12 years ago
|
|
||
10 years ago
|
aliases = {}
|
||
|
if '_aliases' in categories:
|
||
|
aliases = categories['_aliases']
|
||
|
|
||
11 years ago
|
category_file_path = os.path.join(options.output_dir, "list_of_%s_modules.rst" % category)
|
||
|
category_file = open(category_file_path, "w")
|
||
9 years ago
|
print("*** recording category %s in %s ***" % (category, category_file_path))
|
||
11 years ago
|
|
||
9 years ago
|
# start a new category file
|
||
12 years ago
|
|
||
11 years ago
|
category = category.replace("_"," ")
|
||
|
category = category.title()
|
||
|
|
||
10 years ago
|
modules = []
|
||
|
deprecated = []
|
||
|
for module in module_map.keys():
|
||
10 years ago
|
if isinstance(module_map[module], dict):
|
||
9 years ago
|
for mod in (m for m in module_map[module].keys() if m in module_info):
|
||
10 years ago
|
if mod.startswith("_"):
|
||
|
deprecated.append(mod)
|
||
|
else:
|
||
9 years ago
|
if module not in module_info:
|
||
|
continue
|
||
10 years ago
|
if module.startswith("_"):
|
||
|
deprecated.append(module)
|
||
10 years ago
|
modules.append(module)
|
||
|
|
||
9 years ago
|
modules.sort(key=lambda k: k[1:] if k.startswith('_') else k)
|
||
11 years ago
|
|
||
11 years ago
|
category_header = "%s Modules" % (category.title())
|
||
|
underscores = "`" * len(category_header)
|
||
|
|
||
11 years ago
|
category_file.write("""\
|
||
|
%s
|
||
|
%s
|
||
|
|
||
10 years ago
|
.. toctree:: :maxdepth: 1
|
||
11 years ago
|
|
||
|
""" % (category_header, underscores))
|
||
10 years ago
|
sections = []
|
||
11 years ago
|
for module in modules:
|
||
10 years ago
|
if module in module_map and isinstance(module_map[module], dict):
|
||
|
sections.append(module)
|
||
|
continue
|
||
|
else:
|
||
8 years ago
|
print_modules(module, category_file, deprecated, options, env, template, outputname, module_info, aliases)
|
||
11 years ago
|
|
||
10 years ago
|
sections.sort()
|
||
10 years ago
|
for section in sections:
|
||
10 years ago
|
category_file.write("\n%s\n%s\n\n" % (section.replace("_"," ").title(),'-' * len(section)))
|
||
10 years ago
|
category_file.write(".. toctree:: :maxdepth: 1\n\n")
|
||
10 years ago
|
|
||
10 years ago
|
section_modules = module_map[section].keys()
|
||
9 years ago
|
section_modules.sort(key=lambda k: k[1:] if k.startswith('_') else k)
|
||
10 years ago
|
#for module in module_map[section]:
|
||
9 years ago
|
for module in (m for m in section_modules if m in module_info):
|
||
8 years ago
|
print_modules(module, category_file, deprecated, options, env, template, outputname, module_info, aliases)
|
||
11 years ago
|
|
||
10 years ago
|
category_file.write("""\n\n
|
||
|
.. note::
|
||
8 years ago
|
- %s: This marks a module as deprecated, which means a module is kept for backwards compatibility but usage is discouraged.
|
||
|
The module documentation details page may explain more about this rationale.
|
||
8 years ago
|
""" % DEPRECATED)
|
||
11 years ago
|
category_file.close()
|
||
11 years ago
|
|
||
|
# TODO: end a new category file
|
||
|
|
||
|
#####################################################################################
|
||
|
|
||
|
def validate_options(options):
|
||
|
''' validate option parser options '''
|
||
|
|
||
|
if not options.module_dir:
|
||
8 years ago
|
sys.exit("--module-dir is required", file=sys.stderr)
|
||
11 years ago
|
if not os.path.exists(options.module_dir):
|
||
8 years ago
|
sys.exit("--module-dir does not exist: %s" % options.module_dir, file=sys.stderr)
|
||
11 years ago
|
if not options.template_dir:
|
||
8 years ago
|
sys.exit("--template-dir must be specified")
|
||
12 years ago
|
|
||
11 years ago
|
#####################################################################################
|
||
12 years ago
|
|
||
11 years ago
|
def main():
|
||
12 years ago
|
|
||
11 years ago
|
p = generate_parser()
|
||
12 years ago
|
|
||
11 years ago
|
(options, args) = p.parse_args()
|
||
|
validate_options(options)
|
||
12 years ago
|
|
||
11 years ago
|
env, template, outputname = jinja2_environment(options.template_dir, options.type)
|
||
12 years ago
|
|
||
9 years ago
|
mod_info, categories, aliases = list_modules(options.module_dir)
|
||
|
categories['all'] = mod_info
|
||
|
categories['_aliases'] = aliases
|
||
|
category_names = [c for c in categories.keys() if not c.startswith('_')]
|
||
11 years ago
|
category_names.sort()
|
||
11 years ago
|
|
||
9 years ago
|
# Write master category list
|
||
11 years ago
|
category_list_path = os.path.join(options.output_dir, "modules_by_category.rst")
|
||
9 years ago
|
with open(category_list_path, "w") as category_list_file:
|
||
|
category_list_file.write("Module Index\n")
|
||
|
category_list_file.write("============\n")
|
||
|
category_list_file.write("\n\n")
|
||
|
category_list_file.write(".. toctree::\n")
|
||
|
category_list_file.write(" :maxdepth: 1\n\n")
|
||
|
|
||
|
for category in category_names:
|
||
|
category_list_file.write(" list_of_%s_modules\n" % category)
|
||
|
|
||
|
#
|
||
|
# Import all the docs into memory
|
||
|
#
|
||
|
module_map = mod_info.copy()
|
||
|
|
||
|
for modname in module_map:
|
||
|
result = process_module(modname, options, env, template, outputname, module_map, aliases)
|
||
|
if result == 'SKIPPED':
|
||
|
del categories['all'][modname]
|
||
|
else:
|
||
|
categories['all'][modname] = (categories['all'][modname], result)
|
||
11 years ago
|
|
||
9 years ago
|
#
|
||
|
# Render all the docs to rst via category pages
|
||
|
#
|
||
11 years ago
|
for category in category_names:
|
||
|
process_category(category, categories, options, env, template, outputname)
|
||
12 years ago
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|