add total % to cave-stat
This commit is contained in:
parent
b17dcc5260
commit
98e4270b26
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ def cave_stat():
|
|||
|
||||
if "--x-of-y" in cmdline:
|
||||
position = [c for c in cmdline if " of " in c][0]
|
||||
pos_x, pos_y = [int(a) for a in position.split(" of ")]
|
||||
|
||||
if "--destination" in cmdline:
|
||||
action = "Installing"
|
||||
|
@ -19,7 +20,7 @@ def cave_stat():
|
|||
action = "Downloading"
|
||||
atom = [c for c in cmdline if "::" in c and c[0] == "="][0]
|
||||
|
||||
yield "%s %s (%s)" %(action, atom, position)
|
||||
yield "%s %s (%s, %.01f %%)" %(action, atom, position, 100 * pos_x / pos_y)
|
||||
|
||||
if __name__ == "__main__":
|
||||
for state in cave_stat():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue