directives¶
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
).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.
-
run
()¶ Executes the directive.
-
-
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
).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.
-
run
()¶ Executes the directive.
-
-
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
).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.
-
run
()¶ Executes the directive.
-
-
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
).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.
-
run
()¶ Executes the directive.
-
-
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
).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.
-
run
()¶ Executes the directive.
-
-
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
).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.
-
run
()¶ Executes the directive.
-