plbuilder package

Document building framework built on Pyexlatex.

Subpackages

Submodules

plbuilder.autoreloader module

class plbuilder.autoreloader.AutoBuildEventHandler[source]

Bases: watchdog.events.FileSystemEventHandler

on_modified(event)[source]

Called when a file or directory is modified.

Parameters

event (DirModifiedEvent or FileModifiedEvent) – Event representing file/directory modification.

plbuilder.autoreloader.autobuild()[source]

Starts a process which watches for file system events on sources in the current pl-builder project, and automatically builds sources in response to changes.

plbuilder.autoreloader.autobuild_at_path(watch_path)[source]
plbuilder.autoreloader.run_command(command)[source]

plbuilder.builder module

class plbuilder.builder.BuildConfig(**data)[source]

Bases: pydantic.main.BaseModel

class Config[source]

Bases: object

arbitrary_types_allowed = True
model: pyexlatex.models.document.DocumentBase
options: plbuilder.builder.BuildOptions
class plbuilder.builder.BuildOptions(**data)[source]

Bases: pydantic.main.BaseModel

file_name: str
handouts_folder: Optional[pathlib.Path]
output_folder: pathlib.Path
output_format: pyexlatex.logic.output.api.formats.OutputFormats
plbuilder.builder.build_all(desired_output_format=None)[source]
plbuilder.builder.build_by_file_path(file_path, desired_output_format=None)[source]
plbuilder.builder.get_all_source_files()[source]
Return type

List[str]

plbuilder.cli module

plbuilder.cli.build(file_path=None, output_format=None)[source]

Create slides and handout PDFs from plbuilder pyexlatex templates. Passing no arguments will build all templates.

Parameters
  • file_path (Optional[str]) – path of template from which to build PDFs

  • output_format (Optional[OutputFormats]) – the file type of the output, currently ‘pdf’ and ‘html’ are supported. If not passed, will fall back to the setting of DEFAULT_OUTPUT_FORMAT in the file. If that is not passed, will default to ‘pdf’

Returns

None

plbuilder.cli.create(doc_type, name)[source]

Creates a slide template using the passed name

Parameters
  • doc_type (str) – ‘presentation’, ‘document’, or the name of a custom template

  • name (str) – Display name, will be standardized to snakecase and lowercase for use in the file name

Returns

plbuilder.cli.init()[source]

Creates a plbuilder project in the current directory

Returns

plbuilder.cli.main()[source]

plbuilder.config module

plbuilder.creator module

plbuilder.creator.create_template(template_name, title)[source]

plbuilder.init module

exception plbuilder.init.ProjectExistsException[source]

Bases: Exception

plbuilder.init.initialize_project(in_directory=None)[source]

plbuilder.paths module

plbuilder.paths.path_func(root_path)[source]
Return type

Callable

plbuilder.templater module

class plbuilder.templater.TemplateData(_typename, _fields=None, /, **kwargs)[source]

Bases: dict

title: str
plbuilder.templater.get_environment(local_path=None)[source]
Return type

Environment

plbuilder.templater.output_template(name, data, path)[source]
plbuilder.templater.render_template(name, data)[source]
Return type

str