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: Optional[Union[Sequence[str], Set[str]]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = 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
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- class lookatme.contrib.file_loader.LineRange(*, only: Optional[Union[Sequence[str], Set[str]]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = 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
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- 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
.