MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / save_html_command

Function save_html_command

scenedetect/_cli/__init__.py:1072–1097  ·  view source on GitHub ↗
(
    ctx: click.Context,
    filename: str | None,
    no_images: bool,
    image_width: int | None,
    image_height: int | None,
    show: bool,
)

Source from the content-addressed store, hash-verified

1070)
1071@click.pass_context
1072def 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
1100LIST_SCENES_HELP = """Create scene list CSV file (will be named $VIDEO_NAME-Scenes.csv by default).

Callers

nothing calls this directly

Calls 3

get_valueMethod · 0.80
callbackMethod · 0.80
add_commandMethod · 0.80

Tested by

no test coverage detected