transferwee
transferwee copied to clipboard
Upload/Download Progress
Hello,
This tool was awesome and I would request to add one more to this tool.
Add the upload/download progress/status and Speed of the transfer.
i dont know python but changed some code. its just for download progress.
get clint from pypi
change this section.
with open(file, "wb") as f:
for chunk in r.iter_content(chunk_size=1024):
f.write(chunk)
to this code.
with open(file, 'wb') as f:
total_length = int(r.headers.get('content-length'))
for chunk in progress.bar(r.iter_content(chunk_size=1024), expected_size=(total_length/1024) + 1):
if chunk:
f.write(chunk)
f.flush()
also dont forget to add top,
from clint.textui import progress