aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/options.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-10-18 16:03:05 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-10-18 16:06:51 +0530
commit2d9ec70423121dbf280475769690f19b0034ee8b (patch)
treef2474bc75c9f51e21232d9714d90906985bd3905 /yt_dlp/options.py
parente820fbaa6ff41625b6f4d8453253883b86bf9ca4 (diff)
[ModifyChapters] Allow removing sections by timestamp
Eg: --remove-chapters "*10:15-15:00". The `*` prefix is used so as to avoid any conflicts with other valid regex
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r--yt_dlp/options.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index d2dc7687b..1c99e7e7c 100644
--- a/yt_dlp/options.py
+++ b/yt_dlp/options.py
@@ -1378,7 +1378,11 @@ def parseOpts(overrideArguments=None):
postproc.add_option(
'--remove-chapters',
metavar='REGEX', dest='remove_chapters', action='append',
- help='Remove chapters whose title matches the given regular expression. This option can be used multiple times')
+ help=(
+ 'Remove chapters whose title matches the given regular expression. '
+ 'Time ranges prefixed by a "*" can also be used in place of chapters to remove the specified range. '
+ 'Eg: --remove-chapters "*10:15-15:00" --remove-chapters "intro". '
+ 'This option can be used multiple times'))
postproc.add_option(
'--no-remove-chapters', dest='remove_chapters', action='store_const', const=None,
help='Do not remove any chapters from the file (default)')