class documentation

class ExportTemplateContext(dict): (source)

View In Hierarchy

Undocumented

Method __init__ Constructor
Method anchor_function Undocumented
Method get_dumper Returns a DumperClass instance for source page page
Method index_function No summary
Method resource_function Undocumented
Method uri_function Undocumented
Instance Variable linker Undocumented
Instance Variable _content Undocumented
Instance Variable _dumper_factory Undocumented
Instance Variable _index_generator Undocumented
Instance Variable _index_page Undocumented
Instance Variable _linker_factory Undocumented
def __init__(self, notebook, linker_factory, dumper_factory, title, content, special=None, home=None, up=None, prevpage=None, nextpage=None, links=None, index_generator=None, index_page=None): (source)

Constructor

When exporting one notebook page per export page ("multi file"), 'content' is a list of one page everytime. Even for exporting special pages, they go into 'content' one at a time. The special pages are linked in 'links' so the template can refer to them.

When exporting multiple notebook pages to a single export page ("single file"), 'content' is a list of all notebook pages a nd 'special' a list.

Parameters
notebookNotebook object
linker_factoryfunction producing ExportLinker objects
dumper_factoryfunction producing DumperClass objects
titlethe export page title
contentlist of notebook pages to be exported
speciallist of special notebook pages to be exported if any
homelink to home page if any
uplink to parent export page if any
prevpagelink to previous export page if any
nextpagelink to next export page if any
linkslist of links to special pages if any, links are given as a 2-tuple of a key and a target (either a Path or a NotebookPathProxy)
index_generatora generator function or that provides Path or Page objects to be used for the the index() function. This method should take a single argument for the root namespace to show. See the definition of Index.walk() or PageSelection.index().
index_pagethe current page to show in the index if any
@ExpressionFunction
def anchor_function(self, page): (source)

Undocumented

def get_dumper(self, page): (source)

Returns a DumperClass instance for source page page

Only template options defined before this method is called are included, so only construct the "dumper" when you are about to use it

@ExpressionFunction
def index_function(self, namespace=None, collapse=True, ignore_empty=True): (source)
Index function for export template
Parameters
namespacethe namespace to include
collapseif True only the branch of the current page is shown, if False the whole index is shown
ignore_emptyif True empty pages (placeholders) are not shown in the index
@ExpressionFunction
def resource_function(self, link): (source)

Undocumented

@ExpressionFunction
def uri_function(self, link): (source)

Undocumented

linker = (source)

Undocumented

_content = (source)

Undocumented

_dumper_factory = (source)

Undocumented

_index_generator = (source)

Undocumented

_index_page = (source)

Undocumented

_linker_factory = (source)

Undocumented