aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-08-08 09:53:25 +0200
committerIsmael Mejia <iemejia@gmail.com>2013-08-08 09:53:25 +0200
commit505c28aac90fbee46f0d54945b27e115f90785f2 (patch)
tree81fc9823ccfd778faa3efdfb08a9797802fab125 /youtube_dl
parent8377574c9cb8740e24d45e9b3d30921fd6ec846c (diff)
Separated subtitle options in their own group
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/__init__.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index c4d595e1c..8c6abddd9 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -119,6 +119,7 @@ def parseOpts(overrideArguments=None):
selection = optparse.OptionGroup(parser, 'Video Selection')
authentication = optparse.OptionGroup(parser, 'Authentication Options')
video_format = optparse.OptionGroup(parser, 'Video Format Options')
+ subtitles = optparse.OptionGroup(parser, 'Subtitle Options')
downloader = optparse.OptionGroup(parser, 'Download Options')
postproc = optparse.OptionGroup(parser, 'Post-processing Options')
filesystem = optparse.OptionGroup(parser, 'Filesystem Options')
@@ -185,25 +186,26 @@ def parseOpts(overrideArguments=None):
action='store', dest='format_limit', metavar='FORMAT', help='highest quality format to download')
video_format.add_option('-F', '--list-formats',
action='store_true', dest='listformats', help='list all available formats (currently youtube only)')
- video_format.add_option('--write-sub', '--write-srt',
+
+ subtitles.add_option('--write-sub', '--write-srt',
action='store_true', dest='writesubtitles',
help='write subtitle file', default=False)
- video_format.add_option('--write-auto-sub', '--write-automatic-sub',
+ subtitles.add_option('--write-auto-sub', '--write-automatic-sub',
action='store_true', dest='writeautomaticsub',
help='write automatic subtitle file (youtube only)', default=False)
- video_format.add_option('--only-sub',
+ subtitles.add_option('--only-sub',
action='store_true', dest='skip_download',
help='[deprecated] alias of --skip-download', default=False)
- video_format.add_option('--all-subs',
+ subtitles.add_option('--all-subs',
action='store_true', dest='allsubtitles',
help='downloads all the available subtitles of the video', default=False)
- video_format.add_option('--list-subs',
+ subtitles.add_option('--list-subs',
action='store_true', dest='listsubtitles',
help='lists all available subtitles for the video', default=False)
- video_format.add_option('--sub-format',
+ subtitles.add_option('--sub-format',
action='store', dest='subtitlesformat', metavar='FORMAT',
help='subtitle format (default=srt) ([sbv/vtt] youtube only)', default='srt')
- video_format.add_option('--sub-lang', '--srt-lang',
+ subtitles.add_option('--sub-lang', '--srt-lang',
action='store', dest='subtitleslang', metavar='LANG',
help='language of the subtitles to download (optional) use IETF language tags like \'en\'')
@@ -328,6 +330,7 @@ def parseOpts(overrideArguments=None):
parser.add_option_group(filesystem)
parser.add_option_group(verbosity)
parser.add_option_group(video_format)
+ parser.add_option_group(subtitles)
parser.add_option_group(authentication)
parser.add_option_group(postproc)