Writes the given list of scenes to an output file handle in html format. Arguments: output_html_filename: filename of output html file scene_list: List of pairs of FrameTimecodes denoting each scene's start/end FrameTimecode. cut_list: Optional list of FrameTimecode obje
(
output_html_filename: str,
scene_list: SceneList,
cut_list: CutList | None = None,
css: str | None = None,
css_class: str = "mytable",
image_filenames: dict[int, list[str]] | None = None,
image_width: int | None = None,
image_height: int | None = None,
)
| 119 | |
| 120 | |
| 121 | def write_scene_list_html( |
| 122 | output_html_filename: str, |
| 123 | scene_list: SceneList, |
| 124 | cut_list: CutList | None = None, |
| 125 | css: str | None = None, |
| 126 | css_class: str = "mytable", |
| 127 | image_filenames: dict[int, list[str]] | None = None, |
| 128 | image_width: int | None = None, |
| 129 | image_height: int | None = None, |
| 130 | ): |
| 131 | """Writes the given list of scenes to an output file handle in html format. |
| 132 | |
| 133 | Arguments: |
| 134 | output_html_filename: filename of output html file |
| 135 | scene_list: List of pairs of FrameTimecodes denoting each scene's start/end FrameTimecode. |
| 136 | cut_list: Optional list of FrameTimecode objects denoting the cut list (i.e. the frames |
| 137 | in the video that need to be split to generate individual scenes). If not passed, |
| 138 | the start times of each scene (besides the 0th scene) is used instead. |
| 139 | css: String containing all the css information for the resulting html page. |
| 140 | css_class: String containing the named css class |
| 141 | image_filenames: dict where key i contains a list with n elements (filenames of |
| 142 | the n saved images from that scene) |
| 143 | image_width: Optional desired width of images in table in pixels |
| 144 | image_height: Optional desired height of images in table in pixels |
| 145 | """ |
| 146 | logger.info("Exporting scenes to html:\n %s:", output_html_filename) |
| 147 | if not css: |
| 148 | css = """ |
| 149 | table.mytable { |
| 150 | font-family: times; |
| 151 | font-size:12px; |
| 152 | color:#000000; |
| 153 | border-width: 1px; |
| 154 | border-color: #eeeeee; |
| 155 | border-collapse: collapse; |
| 156 | background-color: #ffffff; |
| 157 | width=100%; |
| 158 | max-width:550px; |
| 159 | table-layout:fixed; |
| 160 | } |
| 161 | table.mytable th { |
| 162 | border-width: 1px; |
| 163 | padding: 8px; |
| 164 | border-style: solid; |
| 165 | border-color: #eeeeee; |
| 166 | background-color: #e6eed6; |
| 167 | color:#000000; |
| 168 | } |
| 169 | table.mytable td { |
| 170 | border-width: 1px; |
| 171 | padding: 8px; |
| 172 | border-style: solid; |
| 173 | border-color: #eeeeee; |
| 174 | } |
| 175 | #code { |
| 176 | display:inline; |
| 177 | font-family: courier; |
| 178 | color: #3d9400; |
no test coverage detected