directives

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true ]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0 ]; edge [color=lightslategrey, penwidth=1 ]; subgraph "cluster_abjadext.book.directives" { graph [label="abjadext.book.directives"]; node [color=1]; "abjadext.book.directives.AbjadDirective" [URL="../api/abjadext/book/directives.html#abjadext.book.directives.AbjadDirective", color=black, fontcolor=white, label="Abjad\nDirective", target=_top]; "abjadext.book.directives.AbjadDoctestDirective" [URL="../api/abjadext/book/directives.html#abjadext.book.directives.AbjadDoctestDirective", color=black, fontcolor=white, label="Abjad\nDoctest\nDirective", target=_top]; "abjadext.book.directives.ImportDirective" [URL="../api/abjadext/book/directives.html#abjadext.book.directives.ImportDirective", color=black, fontcolor=white, label="Import\nDirective", target=_top]; "abjadext.book.directives.RevealDirective" [URL="../api/abjadext/book/directives.html#abjadext.book.directives.RevealDirective", color=black, fontcolor=white, label="Reveal\nDirective", target=_top]; "abjadext.book.directives.ShellDirective" [URL="../api/abjadext/book/directives.html#abjadext.book.directives.ShellDirective", color=black, fontcolor=white, label="Shell\nDirective", target=_top]; "abjadext.book.directives.ThumbnailDirective" [URL="../api/abjadext/book/directives.html#abjadext.book.directives.ThumbnailDirective", color=black, fontcolor=white, label="Thumbnail\nDirective", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=2]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", color=2, label=object, target=_top]; } subgraph "cluster_docutils.parsers.rst" { graph [label="docutils.parsers.rst"]; node [color=3]; "docutils.parsers.rst.Directive" [URL="http://www.sphinx-doc.org/en/stable/extdev/markupapi.html#docutils.parsers.rst.Directive", color=3, label=Directive, target=_top]; } "builtins.object" -> "docutils.parsers.rst.Directive" [minlen=1]; "docutils.parsers.rst.Directive" -> "abjadext.book.directives.AbjadDirective" [minlen=1]; "docutils.parsers.rst.Directive" -> "abjadext.book.directives.AbjadDoctestDirective" [minlen=2]; "docutils.parsers.rst.Directive" -> "abjadext.book.directives.ImportDirective" [minlen=1]; "docutils.parsers.rst.Directive" -> "abjadext.book.directives.RevealDirective" [minlen=2]; "docutils.parsers.rst.Directive" -> "abjadext.book.directives.ShellDirective" [minlen=1]; "docutils.parsers.rst.Directive" -> "abjadext.book.directives.ThumbnailDirective" [minlen=2]; }


Sphinx Internals

AbjadDirective An abjad-book interpreter directive.
AbjadDoctestDirective An abjad-book doctest directive.
ImportDirective An abjad-book import directive.
RevealDirective An abjad-book reveal directive.
ShellDirective An abjad-book shell directive.
ThumbnailDirective A thumbnail directive.
class abjadext.book.directives.AbjadDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

An abjad-book interpreter directive.

Represents a portion of an interactive session.

Generates an abjad_input_block node.


Attributes Summary

final_argument_whitespace
has_content
option_spec
optional_arguments
required_arguments
run Executes the directive.

Methods

(Directive).add_name(node)

Append self.options[‘name’] to node[‘names’] if it exists.

Also normalize the name string and register it as explicit target.

(Directive).assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn’t have contents.

(Directive).debug(message)
(Directive).directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

Call “raise self.directive_error(level, message)” from within a directive implementation to return one single system message at level level, which automatically gets the directive block and the line number added.

Preferably use the debug, info, warning, error, or severe wrapper methods, e.g. self.error(message) to generate an ERROR-level directive error.

(Directive).error(message)
(Directive).info(message)
run()

Executes the directive.

(Directive).severe(message)
(Directive).warning(message)
class abjadext.book.directives.AbjadDoctestDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

An abjad-book doctest directive.

Contributes no formatting to documents built by Sphinx.


Attributes Summary

final_argument_whitespace
has_content
option_spec
optional_arguments
required_arguments
run Executes the directive.

Methods

(Directive).add_name(node)

Append self.options[‘name’] to node[‘names’] if it exists.

Also normalize the name string and register it as explicit target.

(Directive).assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn’t have contents.

(Directive).debug(message)
(Directive).directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

Call “raise self.directive_error(level, message)” from within a directive implementation to return one single system message at level level, which automatically gets the directive block and the line number added.

Preferably use the debug, info, warning, error, or severe wrapper methods, e.g. self.error(message) to generate an ERROR-level directive error.

(Directive).error(message)
(Directive).info(message)
run()

Executes the directive.

(Directive).severe(message)
(Directive).warning(message)
class abjadext.book.directives.ImportDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

An abjad-book import directive.

Represents a class or function to be imported into an interactive session.

Generates an abjad_import_block node.


Attributes Summary

final_argument_whitespace
has_content
option_spec
optional_arguments
required_arguments
run Executes the directive.

Methods

(Directive).add_name(node)

Append self.options[‘name’] to node[‘names’] if it exists.

Also normalize the name string and register it as explicit target.

(Directive).assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn’t have contents.

(Directive).debug(message)
(Directive).directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

Call “raise self.directive_error(level, message)” from within a directive implementation to return one single system message at level level, which automatically gets the directive block and the line number added.

Preferably use the debug, info, warning, error, or severe wrapper methods, e.g. self.error(message) to generate an ERROR-level directive error.

(Directive).error(message)
(Directive).info(message)
run()

Executes the directive.

(Directive).severe(message)
(Directive).warning(message)
class abjadext.book.directives.RevealDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

An abjad-book reveal directive.

Generates an abjad_reveal_block node.


Attributes Summary

final_argument_whitespace
has_content
option_spec
optional_arguments
required_arguments
run Executes the directive.

Methods

(Directive).add_name(node)

Append self.options[‘name’] to node[‘names’] if it exists.

Also normalize the name string and register it as explicit target.

(Directive).assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn’t have contents.

(Directive).debug(message)
(Directive).directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

Call “raise self.directive_error(level, message)” from within a directive implementation to return one single system message at level level, which automatically gets the directive block and the line number added.

Preferably use the debug, info, warning, error, or severe wrapper methods, e.g. self.error(message) to generate an ERROR-level directive error.

(Directive).error(message)
(Directive).info(message)
run()

Executes the directive.

(Directive).severe(message)
(Directive).warning(message)
class abjadext.book.directives.ShellDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

An abjad-book shell directive.

Represents a shell session.

Generates a docutils literal_block node.


Attributes Summary

final_argument_whitespace
has_content
option_spec
optional_arguments
required_arguments
run Executes the directive.

Methods

(Directive).add_name(node)

Append self.options[‘name’] to node[‘names’] if it exists.

Also normalize the name string and register it as explicit target.

(Directive).assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn’t have contents.

(Directive).debug(message)
(Directive).directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

Call “raise self.directive_error(level, message)” from within a directive implementation to return one single system message at level level, which automatically gets the directive block and the line number added.

Preferably use the debug, info, warning, error, or severe wrapper methods, e.g. self.error(message) to generate an ERROR-level directive error.

(Directive).error(message)
(Directive).info(message)
run()

Executes the directive.

(Directive).severe(message)
(Directive).warning(message)
class abjadext.book.directives.ThumbnailDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

A thumbnail directive.


Attributes Summary

final_argument_whitespace
has_content
option_spec
optional_arguments
required_arguments
run Executes the directive.

Methods

(Directive).add_name(node)

Append self.options[‘name’] to node[‘names’] if it exists.

Also normalize the name string and register it as explicit target.

(Directive).assert_has_content()

Throw an ERROR-level DirectiveError if the directive doesn’t have contents.

(Directive).debug(message)
(Directive).directive_error(level, message)

Return a DirectiveError suitable for being thrown as an exception.

Call “raise self.directive_error(level, message)” from within a directive implementation to return one single system message at level level, which automatically gets the directive block and the line number added.

Preferably use the debug, info, warning, error, or severe wrapper methods, e.g. self.error(message) to generate an ERROR-level directive error.

(Directive).error(message)
(Directive).info(message)
run()

Executes the directive.

(Directive).severe(message)
(Directive).warning(message)