MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / format_help_text

Method format_help_text

scenedetect/_cli/__init__.py:128–137  ·  view source on GitHub ↗

Writes the help text to the formatter if it exists.

(self, ctx: click.Context, formatter: click.HelpFormatter)

Source from the content-addressed store, hash-verified

126 self.format_epilog(ctx, formatter)
127
128 def format_help_text(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:
129 """Writes the help text to the formatter if it exists."""
130 if self.help:
131 base_command = ctx.parent.info_name if ctx.parent is not None else ctx.info_name
132 formatted_help = self.help.format(
133 scenedetect=base_command, scenedetect_with_video=f"{base_command} -i video.mp4"
134 )
135 text = inspect.cleandoc(formatted_help).partition("\f")[0]
136 formatter.write_paragraph()
137 formatter.write_text(text)
138
139 def format_epilog(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:
140 """Writes the epilog into the formatter if it exists."""

Callers 1

format_helpMethod · 0.95

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected