def packagetree_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """ A custom restructuredtext directive which can be used to graphically display a package hierarchy. If one or more arguments are given, then those packages and all their submodules will be displayed. If no arguments are given, and the directive is in a package's docstring, then that package and all its submodules will be displayed. It is an error to use this directive with no arguments in a non-package docstring. Options: - C{:dir:} -- Specifies the orientation of the graph. One of C{down}, C{right} (default), C{left}, C{up}. """ return [dotgraph(_construct_packagetree, arguments, options)]
def digraph_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """ A custom restructuredtext directive which can be used to display Graphviz dot graphs. This directive takes a single argument, which is used as the graph's name. The contents of the directive are used as the body of the graph. Any href attributes whose value has the form <name> will be replaced by the URL of the object with that name. Here's a simple example:: .. digraph:: example_digraph a -> b -> c c -> a [dir=\"none\"] """ if arguments: title = arguments[0] else: title = '' return dotgraph(_construct_digraph, title, options.get('caption'), '\n'.join(content))
def digraph_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """ A custom restructuredtext directive which can be used to display Graphviz dot graphs. This directive takes a single argument, which is used as the graph's name. The contents of the directive are used as the body of the graph. Any href attributes whose value has the form <name> will be replaced by the URL of the object with that name. Here's a simple example:: .. digraph:: example_digraph a -> b -> c c -> a [dir=\"none\"] """ if arguments: title = arguments[0] else: title = '' return [ dotgraph(_construct_digraph, title, options.get('caption'), '\n'.join(content)) ]
def importgraph_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): return [dotgraph(_construct_importgraph, arguments, options)]
def callgraph_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): return [ dotgraph(_construct_callgraph, arguments, options) ]