axel-download-accelerator / axel

Lightweight CLI download accelerator
GNU General Public License v2.0
2.84k stars 258 forks source link

option to only show progress bar #417

Open Vosjedev opened 6 months ago

Vosjedev commented 6 months ago

I would like an option that only displays the progress bar with the info on the left and right, so the output of axel only takes up one line.

So it would be like this:

$ axel --progress-only https://example.com/large-file
[ 34%] [.....0           ......1           ......2           ......3           ] [   8,5MB/s] [00:58]

I would use it in a script that downloads a lot of files, to not have that much output on every file, just the progress on the current file and the progress bar on the previous ones. I already tried this by redirecting the output to a while read -r line loop printing only the lines of the progress bar, but it seems like axel uses a default width when redirected (of which I can understand why).

ismaell commented 6 months ago

--percentage already presents something... but you probably want more...

I've not seen any machine-readable format for this... is there any out there? we should start by defining one if not...

Vosjedev commented 6 months ago

As I said, I once wrote this which parses the output. I would rather have an option in axel itself to display only the bar. The problem with my script is that it removes the ability to view the progress of the individual connections. If a machine-parsable format allows that, I'm oke with that. I suggest ouputting one line at a time, containing multiple fields seperated by tab character (so it's eazily usable with cut). The fields could be like this (I used comma as seperator here for clarity): total percent, speed, estimated time left, a percentage field for each connection