How to use breathe - 10 common examples

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
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 \
                    os.path.getmtime(dest) < os.path.getmtime(source):
github rdiankov / openrave / docs / build_doc.py View on Github external
optional_arguments = 0
            final_argument = False
            option_spec = {}
            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')
github rdiankov / openrave / docs / build_doc.py View on Github external
required_arguments = 0
            optional_arguments = 0
            final_argument = False
            option_spec = {}
            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')
github rdiankov / openrave / docs / build_doc.py View on Github external
class ShellCommandDirective(Directive):
            required_arguments = 0
            optional_arguments = 0
            final_argument = False
            option_spec = {}
            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())
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_doc.py View on Github external
final_argument = False
            option_spec = {}
            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'):
github rdiankov / openrave / docs / build_doc.py View on Github external
class ShellCommandDirective(Directive):
            required_arguments = 0
            optional_arguments = 0
            final_argument = False
            option_spec = {}
            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())
github rdiankov / openrave / docs / build_doc.py View on Github external
option_spec = {}
            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'
github rdiankov / openrave / docs / build_doc.py View on Github external
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 \
                    os.path.getmtime(dest) < os.path.getmtime(source):
                print 'building documentation file %s' % dest
github TRIQS / triqs / doc / sphinxext / breathe / breathe / renderer / rst / doxygen / compound.py View on Github external
renderer = self.renderer_factory.create_renderer(self.data_object, entry)
            nodelist.extend(renderer.render())

        term = self.node_factory.literal("","", *nodelist)

        separator = self.node_factory.Text(" - ")

        nodelist = []

        if self.data_object.parameterdescription:
            renderer = self.renderer_factory.create_renderer(self.data_object, self.data_object.parameterdescription)
            nodelist.extend(renderer.render())

        return [self.node_factory.list_item("", term, separator, *nodelist)]

class DocParamNameListSubRenderer(Renderer):
    """ Parameter Name Renderer """

    def render(self):

        nodelist = []
        for entry in self.data_object.parametername:
            renderer = self.renderer_factory.create_renderer(self.data_object, entry)
            nodelist.extend(renderer.render())

        return nodelist

class DocParamNameSubRenderer(Renderer):

    def render(self):

        nodelist = []