(
ctx: click.Context,
filename: str | None,
no_images: bool,
image_width: int | None,
image_height: int | None,
show: bool,
)
| 1070 | ) |
| 1071 | @click.pass_context |
| 1072 | def save_html_command( |
| 1073 | ctx: click.Context, |
| 1074 | filename: str | None, |
| 1075 | no_images: bool, |
| 1076 | image_width: int | None, |
| 1077 | image_height: int | None, |
| 1078 | show: bool, |
| 1079 | ): |
| 1080 | if ctx.info_name == "export-html": |
| 1081 | logger.warning("WARNING: export-html is deprecated, use save-html instead.") |
| 1082 | ctx = ctx.obj |
| 1083 | assert isinstance(ctx, CliContext) |
| 1084 | # Make sure a save-images command is in the pipeline for us to use the results from if we need |
| 1085 | # to include images. |
| 1086 | include_images = not ctx.config.get_value("save-html", "no-images", no_images) |
| 1087 | if include_images and not ctx.save_images: |
| 1088 | assert save_images_command.callback is not None |
| 1089 | save_images_command.callback() |
| 1090 | save_html_args = { |
| 1091 | "filename": ctx.config.get_value("save-html", "filename", filename), |
| 1092 | "image_width": ctx.config.get_value("save-html", "image-width", image_width), |
| 1093 | "image_height": ctx.config.get_value("save-html", "image-height", image_height), |
| 1094 | "no_images": ctx.config.get_value("save-html", "no-images", no_images), |
| 1095 | "show": ctx.config.get_value("save-html", "show", show), |
| 1096 | } |
| 1097 | ctx.add_command(cli_commands.save_html, save_html_args) |
| 1098 | |
| 1099 | |
| 1100 | LIST_SCENES_HELP = """Create scene list CSV file (will be named $VIDEO_NAME-Scenes.csv by default). |
nothing calls this directly
no test coverage detected