scistag.vislog.visual_log_renderer_html.VisualLogHtmlRenderer¶
- class VisualLogHtmlRenderer(title='SciStag VisualLog')[source]¶
Bases:
VisualLogRendererVisualLog plugin for creating HTML files
- Parameters
title (
str) – The log’s title
Methods
Assembles the sub logs and uses the body pieces to combine it to a delivarable files
Slices the new html template into pieces which can be quickly assembled to the full page using pre-encoded binary data.
Combines the head's header, body and footer to a full html page
Changes the current body template
Sets a new footer template
Sets a new header template
Sets the new list of sub logs to be integrated
Attributes
__dict____doc____module____weakref__list of weak references to the object (if defined)
- build_body(sub_log_data)¶
Assembles the sub logs and uses the body pieces to combine it to a delivarable files
- build_body_pieces()¶
Slices the new html template into pieces which can be quickly assembled to the full page using pre-encoded binary data.
- build_page(body)¶
Combines the head’s header, body and footer to a full html page
- Parameters
body – The page’s body
- Return type
- Returns
The full, deliverable page
- set_body_template(template, **params)¶
Changes the current body template
- Parameters
template (
str) – The new Jinja templatesub_logs – The names of the sub logs to be inserted
params – Optional creation parameters
Sets a new footer template
- Parameters
template (
str) – The template’s string dataparams – Parameters of content to be inserted
- set_header_template(template, **params)[source]¶
Sets a new header template
- Parameters
template (
str) – The template’s string dataparams – Parameters of content to be inserted
- set_sub_logs(sub_logs)¶
Sets the new list of sub logs to be integrated
- Parameters
sub_logs – The name of the sub logs to be integrated into the final page.
- body_template¶
The original body template to be parsed by Jinja
- body_template_rendered¶
The rendered template with only place holders for content remaining
The encoded and rendered footer
The template for the foot of the page
- sub_log_names¶
The names of the single sub logs to be inserted into the body template
- title¶
The pages title