Skip to content

Commit 66f4f82

Browse files
committed
[docs] Regenerate CLI docs
1 parent 95202c3 commit 66f4f82

2 files changed

Lines changed: 40 additions & 10 deletions

File tree

docs/cli.rst

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ Options
178178

179179
Default: ``15.0``
180180

181-
182-
183181
.. option:: -f VAL, --frame-window VAL
184182

185183
Size of window to detect deviations from mean. Represents how many frames before/after the current one to use for mean.
@@ -552,6 +550,38 @@ Options
552550
Output directory to save EDL file to. Overrides global option :option:`-o/--output <scenedetect -o>`.
553551

554552

553+
.. _command-save-fcp:
554+
555+
.. program:: scenedetect save-fcp
556+
557+
558+
``save-fcp``
559+
========================================================================
560+
561+
Save cuts in Final Cut Pro XML format (FCP7 xmeml or FCPX).
562+
563+
564+
Options
565+
------------------------------------------------------------------------
566+
567+
568+
.. option:: -f NAME, --filename NAME
569+
570+
Filename format to use.
571+
572+
Default: ``$VIDEO_NAME.xml``
573+
574+
.. option:: --format TYPE
575+
576+
Format to export. TYPE must be one of: fcpx, fcp7.
577+
578+
Default: ``FcpFormat.FCPX``
579+
580+
.. option:: -o DIR, --output DIR
581+
582+
Output directory to save XML file to. Overrides global option :option:`-o/--output <scenedetect -o>`.
583+
584+
555585
.. _command-save-html:
556586

557587
.. program:: scenedetect save-html
@@ -658,11 +688,11 @@ Options
658688

659689
Default: ``3``
660690

661-
.. option:: -m N, --frame-margin N
691+
.. option:: -m DURATION, --frame-margin DURATION
662692

663-
Number of frames to ignore at beginning/end of scenes when saving images. Controls temporal padding on scene boundaries.
693+
Padding around the beginning/end of each scene used when selecting which frames to extract. DURATION can be specified in frames (-m 1), in seconds with `s` suffix (-m 0.1s), or timecode (-m 00:00:00.100).
664694

665-
Default: ``3``
695+
Default: ``1``
666696

667697
.. option:: -s S, --scale S
668698

docs/generate_cli_docs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def add_backquotes_with_refs(refs: ty.Set[str]) -> ty.Callable[[str], str]:
116116

117117
def _add_backquotes(s: re.Match) -> str:
118118
to_add: str = s.string[s.start() : s.end()]
119-
flag = re.search("-+[\w-]+[^\.\=\s\/]*", to_add)
119+
flag = re.search(r"-+[\w-]+[^\.\=\s\/]*", to_add)
120120
if flag is not None and flag.string[flag.start() : flag.end()] in refs:
121121
# add cross reference
122122
cross_ref = flag.string[flag.start() : flag.end()]
@@ -129,7 +129,7 @@ def _add_backquotes(s: re.Match) -> str:
129129

130130

131131
def extract_default_value(s: str) -> ty.Tuple[str, ty.Optional[str]]:
132-
default = re.search("\[default: .*\]", s)
132+
default = re.search(r"\[default: .*\]", s)
133133
if default is not None:
134134
span = default.span()
135135
assert span[1] == len(s)
@@ -145,11 +145,11 @@ def transform_add_option_refs(s: str, refs: ty.List[str]) -> str:
145145
# TODO: Match prefix of `global option` and add ref to parent `scenedetect` command option.
146146
# Replace patch to complete this.
147147
# -c/--command
148-
s = re.sub("-\w/--\w[\w-]*", transform, s)
148+
s = re.sub(r"-\w/--\w[\w-]*", transform, s)
149149
# --arg=value, --arg=1.2.3, --arg=1,2,3
150-
s = re.sub('-+[\w-]+=[^"\s\)]+(?<![\.\,])', transform, s)
150+
s = re.sub(r'-+[\w-]+=[^"\s\)]+(?<![\.\,])', transform, s)
151151
# --args=" command with spaces"
152-
s = re.sub('--[\w-]+[=]+".*?"', transform, s)
152+
s = re.sub(r'--[\w-]+[=]+".*?"', transform, s)
153153
return s
154154

155155

0 commit comments

Comments
 (0)