Open bernd-wechner opened 3 years ago
This has been partly implemented in: https://github.com/bernd-wechner/Degoo/commit/bb014b1c869a1bff20899d12ff1635b76f235595
Remaining todo are to add an ETA and add the filename/path as an option to progress bar.
It's awesome that we now have progress bars on download and upload but they have distinct styles and it would be nice to bring them into conformance. The differences are presently as follows:
Style:
Get: 100% [########################################################################] 82M / 82M
Put: [########## ] 80044032/234490033 - 00:00:58
Get is nicer. But Put has an ETA which is awesome.
Both are lacking the filename.
They apply file by file when doing directory puts and gets but don't show the current filename. This should be fixed.
History:
Get shows the history in that every new file starts a new line and you see a load of 100% progress bars above the current one running. Put overwrites each progress bar and is only ever displaying the currently running one so no history is kept on screen.
The two use different packages to achieve their result, and eitehr one may be more or less configurable.
The get progress bar is delivered by the wget package:
https://github.com/bernd-wechner/python3-wget/blob/e38979ffdf462a5cec05c5a92ff35a7630c6435b/wget.py#L286
and the put progress bar is delivered by the clint package:
https://github.com/kennethreitz-archive/clint/blob/9d3693d644b8587d985972b6075d970096f6439e/clint/textui/progress.py#L33
I suspect the best approach is to:
wget.download(bar= ...)
and theMultipartEncoderMonitor(callback=...)
We'd then have consistent bars and behaviour and the best look (I am thinking the wget adaptive bar plus an ETA added and a filename).