Add --list-thumbnails
This commit is contained in:
parent
1e10802990
commit
cfb56d1af3
7 changed files with 80 additions and 10 deletions
|
@ -1659,3 +1659,11 @@ def determine_protocol(info_dict):
|
|||
return 'f4m'
|
||||
|
||||
return compat_urllib_parse_urlparse(url).scheme
|
||||
|
||||
|
||||
def render_table(header_row, data):
|
||||
""" Render a list of rows, each as a list of values """
|
||||
table = [header_row] + data
|
||||
max_lens = [max(len(compat_str(v)) for v in col) for col in zip(*table)]
|
||||
format_str = ' '.join('%-' + compat_str(ml + 1) + 's' for ml in max_lens[:-1]) + '%s'
|
||||
return '\n'.join(format_str % tuple(row) for row in table)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue