lookatme.contrib.file_loader module¶
This module defines a built-in contrib module that enables external files to be included within the slide. This is extremely useful when having source code displayed in a code block, and then running/doing something with the source data in a terminal on the same slide.
-
class
lookatme.contrib.file_loader.
FileSchema
(*, only: Union[Sequence[str], Set[str], None] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict[KT, VT]] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)[source]¶ Bases:
marshmallow.schema.Schema
-
class
Meta
[source]¶ Bases:
object
-
render_module
¶ alias of
YamlRender
-
-
lang
= <fields.String(default='auto', attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=auto, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
lines
= <fields.Nested(default={'end': None, 'start': 0}, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing={'end': None, 'start': 0}, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>¶
-
opts
= <marshmallow.schema.SchemaOpts object>¶
-
path
= <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
relative
= <fields.Boolean(default=True, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=True, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>¶
-
transform
= <fields.String(default=None, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=None, allow_none=True, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>¶
-
class
-
class
lookatme.contrib.file_loader.
LineRange
(*, only: Union[Sequence[str], Set[str], None] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict[KT, VT]] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)[source]¶ Bases:
marshmallow.schema.Schema
-
end
= <fields.Integer(default=None, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=None, allow_none=True, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid integer.', 'too_large': 'Number too large.'})>¶
-
opts
= <marshmallow.schema.SchemaOpts object>¶
-
start
= <fields.Integer(default=0, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=0, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid integer.', 'too_large': 'Number too large.'})>¶
-
-
lookatme.contrib.file_loader.
render_code
(token, body, stack, loop)[source]¶ Render the code, ignoring all code blocks except ones with the language set to
file
.