Generate#

class sunpy.util.sphinx.generate.Generate(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]#

Bases: Directive

Custom directive to include raw output generated using supplied Python code

This directive is similar to the raw directive, except that the raw content is generated instead of statically provided. As with the raw directive, the required argument specifies the format of the output (e.g., html or latex).

The optional flag html_border surrounds HTML output with a black border for visual separation.

Attributes Summary

has_content

May the directive have content?

option_spec

Mapping of option names to validator functions.

optional_arguments

Number of optional arguments after the required arguments.

required_arguments

Number of required directive arguments.

Methods Summary

run()

Attributes Documentation

has_content = True#

May the directive have content?

option_spec = {'html_border': <function flag>}#

Mapping of option names to validator functions.

optional_arguments = 0#

Number of optional arguments after the required arguments.

required_arguments = 1#

Number of required directive arguments.

Methods Documentation

run()[source]#