Update documentation to add an auto-generated list of packages.

This commit is contained in:
Todd Gamblin
2014-10-08 03:07:54 -07:00
parent 319b37af0e
commit 36a87f5bf9
13 changed files with 133 additions and 24 deletions

View File

@@ -109,13 +109,15 @@ def colify(elts, **options):
# elts needs to be an array of strings so we can count the elements
elts = [str(elt) for elt in elts]
if not elts:
return
return (0, ())
if not tty:
if tty is False or not isatty(output):
for elt in elts:
output.write("%s\n" % elt)
return
maxlen = max(len(str(s)) for s in elts)
return (1, (maxlen,))
console_cols = options.get("cols", None)
if not console_cols:
@@ -150,6 +152,8 @@ def colify(elts, **options):
if row == rows_last_col:
cols -= 1
return (config.cols, tuple(config.widths))
def colified(elts, **options):
"""Invokes the colify() function but returns the result as a string