Hieroglyph Builders

In Sphinx parlance, a “builder” is an output target. Sphinx includes several of its own, including ones for HTML pages, ePub documents, and PDF.

Hieroglyph adds additional builders for generating slides. The builder’s “name” must be given to the -b command-line option of sphinx-build to select a builder.

You may want to add one (or more) of the Hieroglyph builders to your Makefile to make it easier to run the Sphinx builder.

For example, to add the slides builder to your Makefile, add the following target:

slides:
        $(SPHINXBUILD) -b slides $(ALLSPHINXOPTS) $(BUILDDIR)/slides
        @echo "Build finished. The HTML slides are in $(BUILDDIR)/slides."

(Remember, makefiles are indented using tabs, not spaces.)

Available slide building classes.

class hieroglyph.builder.SlideBuilder(app)[source]

This is the standard Slide HTML builder.

Its output is a directory with HTML, along with the needed style sheets, slide table, and presenter’s console JavaScript.

Its name is slides.

class hieroglyph.builder.DirectorySlideBuilder(app)[source]

This is the standard Directory Slide HTML builder.

Its output is a directory with HTML files, where each file is called index.html and placed in a subdirectory named like its page name. For example, the document markup/rest.rst will not result in an output file markup/rest.html, but markup/rest/index.html. When generating links between pages, the index.html is omitted, so that the URL would look like markup/rest/.

The output directry will include any needed style sheets, slide table, and presenter’s console JavaScript.

Its name is dirslides.

class hieroglyph.builder.SingleFileSlideBuilder(app)[source]

This is the single file Slide HTML builder.

Its output is a directory with a single HTML file, along with the needed style sheets and JavaScript.

Its name is singlefile-slides.

class hieroglyph.builder.InlineSlideBuilder(*args, **kwargs)[source]

This is the Inline Slide HTML builder.

The inline slide builder add support for the slide directive to Sphinx’s StandaloneHTMLBuilder, and adds an additional stylesheet to the output for basic inline display.

When using an inline builder autoslides is disabled.

Its name is inlineslides.

New in version 0.5.

class hieroglyph.builder.DirectoryInlineSlideBuilder(*args, **kwargs)[source]

This is the Inline Slide Directory HTML builder.

The inline slide builder add support for the slide directive to Sphinx’s DirectoryHTMLBuilder, and adds an additional stylesheet to the output for basic inline display.

When using an inline builder autoslides is disabled.

Its name is dirinlineslides.

New in version 0.5.

Abstract Builders

Hieroglyph also defines two abstract builders. These classes are not capable of building slides on their own, but encapsulate most of the slide-specific functionality.

class hieroglyph.builder.AbstractSlideBuilder[source]
apply_theme(themename, themeoptions)[source]

Apply a new theme to the document.

This will store the existing theme configuration and apply a new one.

get_theme_config()[source]

Return the configured theme name and options.

get_theme_options()[source]

Return a dict of theme options, combining defaults and overrides.

init_translator_class()[source]

Compatibility shim to support versions of Sphinx prior to 1.6.

pop_theme()[source]

Disable the most recent theme, and restore its predecessor.

post_process_images(doctree)[source]

Pick the best candidate for all image URIs.

class hieroglyph.builder.AbstractInlineSlideBuilder(*args, **kwargs)[source]