From e45665c912d0a200f1fc27acf482367840b69622 Mon Sep 17 00:00:00 2001 From: cousteau Date: Tue, 11 Aug 2015 03:55:28 +0200 Subject: [PATCH] New output format string version --- youtube_dl/options.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/youtube_dl/options.py b/youtube_dl/options.py index 9016e3498..9004e352f 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -575,22 +575,24 @@ def parseOpts(overrideArguments=None): filesystem.add_option( '-o', '--output', dest='outtmpl', metavar='TEMPLATE', - help=('Output filename template. Use %(title)s to get the title, ' - '%(uploader)s for the uploader name, %(uploader_id)s for the uploader nickname if different, ' - '%(autonumber)s to get an automatically incremented number, ' - '%(ext)s for the filename extension, ' - '%(format)s for the format description (like "22 - 1280x720" or "HD"), ' - '%(format_id)s for the unique id of the format (like YouTube\'s itags: "137"), ' - '%(upload_date)s for the upload date (YYYYMMDD), ' - '%(extractor)s for the provider (youtube, metacafe, etc), ' - '%(id)s for the video id, ' - '%(playlist_title)s, %(playlist_id)s, or %(playlist)s (=title if present, ID otherwise) for the playlist the video is in, ' - '%(playlist_index)s for the position in the playlist. ' - '%(height)s and %(width)s for the width and height of the video format. ' - '%(resolution)s for a textual description of the resolution of the video format. ' - '%% for a literal percent. ' + help=('Output filename template. Use {title} to get the title, ' + '{uploader} for the uploader name, {uploader_id} for the uploader nickname if different, ' + '{autonumber} to get an automatically incremented number, ' + '{ext} for the filename extension, ' + '{format} for the format description (like "22 - 1280x720" or "HD"), ' + '{format_id} for the unique id of the format (like YouTube\'s itags: "137"), ' + '{upload_date} for the upload date (YYYYMMDD), ' + '{extractor} for the provider (youtube, metacafe, etc), ' + '{id} for the video id, ' + '{playlist_title}, {playlist_id}, or {playlist} (=title if present, ID otherwise) for the playlist the video is in, ' + '{playlist_index} for the position in the playlist, ' + '{height} and {width} for the width and height of the video format, ' + '{resolution} for a textual description of the resolution of the video format, ' + '{{ }} %% for literal braces and percent. ' + 'The legacy form %(title)s is also supported with the same meaning as {title}, ' + 'but this may change in a future. ' 'Use - to output to stdout. Can also be used to download to a different directory, ' - 'for example with -o \'/my/downloads/%(uploader)s/%(title)s-%(id)s.%(ext)s\' .')) + 'for example with -o \'/my/downloads/{uploader}/{title}-{id}.{ext}\' .')) filesystem.add_option( '--autonumber-size', dest='autonumber_size', metavar='NUMBER',