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

Function create_help

docs/generate_cli_docs.py:253–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

251
252
253def create_help() -> tuple[str, list[str]]:
254 ctx = click.Context(scenedetect, info_name=scenedetect.name)
255
256 commands: list[str] = ctx.command.list_commands(ctx)
257 commands = list(
258 filter(lambda command: not ctx.command.get_command(ctx, command).hidden, commands)
259 )
260 # ctx.to_info_dict lacks metavar so we have to use the context directly.
261 actions = [
262 generate_title("``scenedetect`` \N{CLAPPER BOARD} Command", level=0),
263 generate_command_help(ctx, ctx.command),
264 generate_subcommands(ctx, commands),
265 ]
266 lines = []
267 for action in actions:
268 lines.extend(action)
269 return "".join(lines), commands
270
271
272def main():

Callers 1

mainFunction · 0.85

Calls 3

generate_titleFunction · 0.85
generate_command_helpFunction · 0.85
generate_subcommandsFunction · 0.85

Tested by

no test coverage detected