maildir-zero: adapt formatting to long maildir names
This commit is contained in:
parent
f7ab634d8b
commit
a3b4f18612
1 changed files with 3 additions and 1 deletions
|
@ -61,5 +61,7 @@ else:
|
|||
key = lambda i: i[0]
|
||||
reverse = False
|
||||
|
||||
length_name = max(len(name) for name in counts.keys())
|
||||
length_count = max(len(str(count)) for count in counts.values())
|
||||
for name, count in sorted(counts.items(), key=key, reverse=reverse):
|
||||
print('{:30} {:5d}'.format(name, count))
|
||||
print('{0:{1}}\t{2:{3}d}'.format(name, length_name, count, length_count))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue