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

Function save_otio_command

scenedetect/_cli/__init__.py:1799–1821  ·  view source on GitHub ↗
(
    ctx: click.Context,
    filename: str | None,
    name: str | None,
    output: str | None,
    audio: bool,
    no_audio: bool,
)

Source from the content-addressed store, hash-verified

1797)
1798@click.pass_context
1799def save_otio_command(
1800 ctx: click.Context,
1801 filename: str | None,
1802 name: str | None,
1803 output: str | None,
1804 audio: bool,
1805 no_audio: bool,
1806):
1807 ctx = ctx.obj
1808 assert isinstance(ctx, CliContext)
1809
1810 if audio and no_audio:
1811 raise click.BadArgumentUsage("Only one of --audio or --no-audio can be specified.")
1812
1813 save_otio_args = {
1814 "filename": ctx.config.get_value("save-otio", "filename", filename),
1815 "name": ctx.config.get_value("save-otio", "name", name),
1816 "output": ctx.config.get_value("save-otio", "output", output),
1817 "audio": ctx.config.get_value(
1818 "save-otio", "audio", True if audio else False if no_audio else None
1819 ),
1820 }
1821 ctx.add_command(cli_commands.save_otio, save_otio_args)
1822
1823
1824# ----------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

get_valueMethod · 0.80
add_commandMethod · 0.80

Tested by

no test coverage detected