How to use the breathe.DoxygenToRstRendererFactoryCreator function in breathe

To help you get started, we’ve selected a few breathe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rdiankov / openrave / docs / build_doc.py View on Github external
has_content = True
            def run(self):
                self.assert_has_content()
                args = shlex.split(self.content[0].encode('ascii'))
                text = subprocess.Popen(args,stdout=subprocess.PIPE).communicate()[0]
                return [docutils.nodes.literal_block(text=text)]
        rst.directives.register_directive('shell-block', ShellCommandDirective)

        # doxygen links using breathe
        parser_factory = breathe.DoxygenParserFactory()
        matcher_factory = breathe.ItemMatcherFactory()
        item_finder_factory_creator = breathe.DoxygenItemFinderFactoryCreator(parser_factory, matcher_factory)
        index_parser = breathe.DoxygenIndexParser()
        finder_factory = breathe.FinderFactory(index_parser, item_finder_factory_creator)
        node_factory = breathe.NodeFactory(docutils.nodes,sphinx.addnodes)
        renderer_factory_creator = breathe.DoxygenToRstRendererFactoryCreator(node_factory, parser_factory)
        builder_factory = breathe.BuilderFactory(breathe.RstBuilder, renderer_factory_creator)
        project_info_factory = breathe.ProjectInfoFactory()
        directive_factory = breathe.DoxygenDirectiveFactory(builder_factory, finder_factory, matcher_factory, project_info_factory)
        project_info_factory.update({'openrave':os.path.join(languagecode, 'xml')},'openrave')
        rst.directives.register_directive("doxygenindex", directive_factory.create_index_directive_container())
        rst.directives.register_directive("doxygenfunction", directive_factory.create_function_directive_container())
        rst.directives.register_directive("doxygenstruct", directive_factory.create_struct_directive_container())
        rst.directives.register_directive("doxygenenum",directive_factory.create_enum_directive_container())
        rst.directives.register_directive("doxygentypedef",directive_factory.create_typedef_directive_container())
        rst.directives.register_directive("doxygenclass",directive_factory.create_class_directive_container())

        rst.languages.get_language('ja')

        for source in glob('*.txt'):
            dest = os.path.splitext(source)[0] + '.html'
            if self.force or not os.path.exists(dest) or \
github rdiankov / openrave / docs / build_openravepy_internal.py View on Github external
classes_temp.pop(0) # remove the #define's
        classes += classes_temp

    xml2rst.setDefaultOptions()
    mainXsltF = open('xml2rst.xsl','r')
    projectname = 'openrave'
    defaultnamespace = 'OpenRAVE'

    # doxygen links using breathe
    parser_factory = breathe.DoxygenParserFactory()
    matcher_factory = breathe.ItemMatcherFactory()
    item_finder_factory_creator = breathe.DoxygenItemFinderFactoryCreator(parser_factory, matcher_factory)
    index_parser = breathe.DoxygenIndexParser()
    finder_factory = breathe.FinderFactory(index_parser, item_finder_factory_creator)
    node_factory = breathe.NodeFactory(docutils.nodes,sphinx.addnodes)
    renderer_factory_creator = breathe.DoxygenToRstRendererFactoryCreator(node_factory, parser_factory)
    project_info_factory = breathe.ProjectInfoFactory()
    builder_factory = breathe.BuilderFactory(breathe.RstBuilder, renderer_factory_creator)

    comments = ''
    for lang in options.languagecodes:
        project_info_factory.update({projectname:os.path.join('build',lang,'coreapixml')},projectname)
        project_info = project_info_factory.create_project_info({})
        finder = finder_factory.create_finder(project_info)

        # find the correct references
        comment_objects = []
        class_objects= []
        for class_name in classes:
            matcher = matcher_factory.create_name_type_matcher(class_name,'class')
            found_classes = finder.find(matcher)
            if len(found_classes) == 0: