Stringify the app document to a HTML string Args: blocks: The `Blocks` object or a list of Blocks name: Name of the document (optional: uses path if not provided) formatting: Sets the basic app styling
(
blocks: BlocksT,
name: t.Optional[str] = None,
formatting: t.Optional[Formatting] = None,
)
| 102 | |
| 103 | |
| 104 | def stringify_report( |
| 105 | blocks: BlocksT, |
| 106 | name: t.Optional[str] = None, |
| 107 | formatting: t.Optional[Formatting] = None, |
| 108 | ) -> str: |
| 109 | """Stringify the app document to a HTML string |
| 110 | |
| 111 | Args: |
| 112 | blocks: The `Blocks` object or a list of Blocks |
| 113 | name: Name of the document (optional: uses path if not provided) |
| 114 | formatting: Sets the basic app styling |
| 115 | """ |
| 116 | |
| 117 | s = ViewState(blocks=Blocks.wrap_blocks(blocks), file_entry_klass=B64FileEntry) |
| 118 | report_html: str = ( |
| 119 | Pipeline(s) |
| 120 | .pipe(PreProcessView(is_finalised=False)) |
| 121 | .pipe(ConvertXML()) |
| 122 | .pipe(ExportHTMLStringInlineAssets(name=name, formatting=formatting)) |
| 123 | .result |
| 124 | ) |
| 125 | |
| 126 | return report_html |
| 127 | |
| 128 | |
| 129 | def upload_report( |
no test coverage detected