Generate the documentation.
779604
def get_documentation(self, request, *args, **kw):
        
        ret = dict()
        ret['resource'] = self.name()
        ret['urls'] = self._get_url_doc()
        ret['description'] = self.__doc__
        ret['representation'] = self._get_representation_doc()
        ret['methods'] = self._get_method_doc()
        return ret
128663
def doc():
    """"""
    kwdb = current_app.kwdb

    libraries = get_collections(kwdb, libtype="library")
    resource_files = get_collections(kwdb, libtype="resource")
    hierarchy = get_navpanel_data(kwdb)

    return flask.render_template("home.html",
                                 data={"libraries": libraries,
                                       "version": __version__,
                                       "libdoc": None,
                                       "hierarchy": hierarchy,
                                       "resource_files": resource_files
                                   })
865499
def documentation(self):
        """"""

        # Return the documentation as a scalar term, which has .text() and .html methods to do
        # metadata substitution using Jinja

        s = ''

        rc = self.build_source_files.documentation.record_content

        if rc:
            s += rc

        for k, v in  self.metadata.documentation.items():
            if  v:
                s += '\n### {}\n{}'.format(k.title(), v)

        return self.metadata.scalar_term(s)
331512
function GENERATE_METHOD(name, spec) {
  var doc = {};
  doc[name] = {
    '!type': 'fn(' + GENERATE_PARAMS(spec.params) + ')' + GENERATE_RETURN(spec.return),
    '!doc': spec.description
  }
  return doc;
}
394100
private function generate()
	{
		// only load sections if we dont have a cache
		$this->discoverComponentSections();

		// generate output by processing sections
		$this->output['sections'] = $this->processComponentSections($this->sections);

		// remove duplicate available versions & order
		$this->output['versions']['available'] = array_unique($this->output['versions']['available']);

		// get the highest version available
		$this->output['versions']['max'] = end($this->output['versions']['available']);

		// create cache folder
		$cacheFile = PATH_APP . DS . 'cache' . DS . 'api' . DS . 'documentation.json';

		if (App::has('filesystem') && !App::get('filesystem')->exists(dirname($cacheFile)))
		{
			App::get('filesystem')->makeDirectory(dirname($cacheFile));
		}

		// save cache file
		file_put_contents($cacheFile, json_encode($this->output));
	}
763586
private function buildDocumentation() {
        $model = new Swagger\Model();
        $model->setId($this->getClassName());
        $this->buildProperties($model);
        foreach($this->getRelatedModels() as $alias => $relatedModel) {
            $this->buildProperties($model, $alias);
        }
        $resource = new Swagger\Resource();
        $resource->setApiVersion('1.0')->setBasePath('/v1.0')->setResourcePath($this->getClassName());
        $resource->setDescription('');
        $documentation = $model . "\n" . $resource;
        $this->getObject()->setDocumentation($documentation);
    }
239965
def _generate_event_doc(event):
    '''
    
    '''

    # Create a copy of the object that we will return.
    eventc = event.copy()

    # Set the ID of the document to be the JID.
    eventc["_id"] = '{}-{}'.format(
                                    event.get('tag', '').split('/')[2],
                                    event.get('tag', '').split('/')[3]
                                  )

    # Add a timestamp field to the document
    eventc["timestamp"] = time.time()

    # remove any return data as it's captured in the "returner" function
    if eventc.get('data').get('return'):
        del eventc['data']['return']

    return eventc
1341705
def generate_docs(app):
    
    config = app.config
    config_dir = app.env.srcdir
    source_root = os.path.join(config_dir, config.apidoc_source_root)
    output_root = os.path.join(config_dir, config.apidoc_output_root)
    execution_dir = os.path.join(config_dir, '..')

    # Remove any files generated by earlier builds
    cleanup(output_root)

    command = ['sphinx-apidoc', '-f', '-o', output_root, source_root]
    # Exclude anything else we were specifically asked to
    for exclude in config.apidoc_exclude:
        command.append(os.path.join(source_root, exclude))
    process = Popen(command, cwd=execution_dir)
    process.wait()
1007633
def generate_documentation(schema):
    

    documentation_title = "Configuration documentation"
    documentation = documentation_title + "\n"
    documentation += "=" * len(documentation_title) + '\n'

    for section_name in schema:
        section_created = False

        for option_name in schema[section_name]:

            option = schema[section_name][option_name]

            if not section_created:
                documentation += '\n'
                documentation += section_name + '\n'
                documentation += '-' * len(section_name) + '\n'
                section_created = True

            documentation += '\n'
            documentation += option_name + '\n'
            documentation += '~' * len(option_name) + '\n'

            if option.get('required'):

                documentation += "** This option is required! **\n"

            if option.get('type'):

                documentation += '*Type : %s.*\n' % option.get('type')

            if option.get('description'):

                documentation += option.get('description') + '\n'

            if option.get('default'):

                documentation += 'The default value is %s.\n' % option.get('default')

            if option.get('deprecated'):

                documentation += "** This option is deprecated! **\n"

    return documentation
735856
def create_py3_docs():
    
    # we want the correct .rst 'type' for our data
    trans = {"methods": "function", "exceptions": "exception", "constants": "attribute"}
    data = get_py3_info()
    for k, v in data.items():
        output = []
        for name, desc in v:
            output.append("")
            output.append(".. _%s:" % name)  # reference for linking
            output.append("")
            output.append(".. py:%s:: %s" % (trans[k], name))
            output.append("")
            output.extend(auto_undent(desc))
        with open("../doc/py3-%s-info.inc" % k, "w") as f:
            f.write("\n".join(output))
859097
def generate_type_docs(types):
    
    output = StringIO()

    indent = "  "  # 2

    # loop through the basic types and add them to the RAML formatted output
    for type_name in types:

        if types[type_name].get("type") != None:

            output.write(indent + type_name + ":\n")

            indent += "  "  # 4

            type_safe = types[type_name]["type"].replace(" ", "_")

            # if we are dealing with a list, set type to array and specify type of items
            if types[type_name].get("items") != None:
                items_safe = types[type_name]["items"].replace(" ", "_")
                # if items_safe == "base":
                #     items_safe = "object"
                output.write(indent + "type: " + type_safe + "\n")
                output.write(indent + "items: " + items_safe + "\n")

            # otherwise, use the type per normal
            else:
                output.write(indent + "type: " + type_safe + "\n")

            # add the description
            if types[type_name].get("description") != None:
                output.write(indent + "description: " + types[type_name]["description"] + "\n")

            indent = indent[:-2]    # 2

    type_docs = output.getvalue()
    output.close()
    return type_docs
36132
public function docGenerate()
    {
        $this->_exec('cd '.__DIR__.'/docs && composer install');
        $this->_exec(__DIR__.'/docs/build');
        $this->_exec(__DIR__.'/vendor/bin/couscous preview');
    }
227768
public function generateDocumentation()
    {
        if ($this->documentation !== null) {
            $this->documentation->setIndentationString($this->getIndentationString());
            $this->documentation->setIndentationLevel($this->getIndentationLevel());

            return $this->documentation->generate();
        } else {
            return null;
        }
    }
1152246
def _process_docs(self, anexec, docblocks, parent, module, docsearch):
        """"""
        #The documentation for the parameters is stored outside of the executable
        #We need to get hold of them from docblocks from the parent text
        key = "{}.{}".format(parent.name, anexec.name)
        if key in docblocks:
            docs = self.docparser.to_doc(docblocks[key][0], anexec.name)
            anexec.docstart, anexec.docend = (docblocks[key][1], docblocks[key][2])
            self.docparser.process_execdocs(docs, anexec, key)
12133
public function generateDocumentation($packageKey)
    {
        $documentationPath = Files::concatenatePaths([$this->packageManager->getPackage($packageKey)->getPackagePath(), 'Documentation']);
        $contextVariables = [];
        $contextVariables['packageKey'] = $packageKey;

        $templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/Documentation/conf.py';
        $fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);
        $targetPathAndFilename = $documentationPath . '/conf.py';
        $this->generateFile($targetPathAndFilename, $fileContent);

        $templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/Documentation/Makefile';
        $fileContent = file_get_contents($templatePathAndFilename);
        $targetPathAndFilename = $documentationPath . '/Makefile';
        $this->generateFile($targetPathAndFilename, $fileContent);

        $templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/Documentation/index.rst';
        $fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);
        $targetPathAndFilename = $documentationPath . '/index.rst';
        $this->generateFile($targetPathAndFilename, $fileContent);

        $targetPathAndFilename = $documentationPath . '/_build/.gitignore';
        $this->generateFile($targetPathAndFilename, '*' . chr(10) . '!.gitignore' . chr(10));
        $targetPathAndFilename = $documentationPath . '/_static/.gitignore';
        $this->generateFile($targetPathAndFilename, '*' . chr(10) . '!.gitignore' . chr(10));
        $targetPathAndFilename = $documentationPath . '/_templates/.gitignore';
        $this->generateFile($targetPathAndFilename, '*' . chr(10) . '!.gitignore' . chr(10));

        return $this->generatedFiles;
    }
420888
function Documentation() {
  return {
    composes: [],
    descriptors: {},
    getPropDescriptor(name) {
      return this.descriptors[name] || (this.descriptors[name] = {});
    },
    addComposes(name) {
      this.composes.push(name);
    },
    set(key, value) {
      this[key] = value;
    },
  };
}
490488
function GENERATE_METHOD(name, spec, parent) {
  name = name.replace(/!+$/, '');
  return GENERATE_DOC(spec.description + '\n'
    + '@method ' + name + '\n'
    + (parent ? ('@for ' + parent + '\n') : '@for common\n')
    + _.reduce(spec.params, function(memo, paramSpec, paramName) {
        return memo + '@param {' + GENERATE_TYPE(paramSpec.type) + '} ' + paramName + ' ' + paramSpec.description + '\n'; 
      }, '')
    + ( !_.isEmpty(spec.return) ? ('@return {' + GENERATE_TYPE(spec.return.type) + '} ' + spec.return.description + '\n') : ''));
}