node-progress icon indicating copy to clipboard operation
node-progress copied to clipboard

Feature proposal - indeterminable progress bar (unknown total)

Open lbeschastny opened this issue 8 years ago • 7 comments

In some situations you may not know the total number of ticks, but want some progress reporting nonetheless.

Right now I have two particular use-cases in mind, but I'm sure there are more:

  1. HTTP downloading with unset content-length header.
  2. Parsing data feed of some unknown length.

Here is how I solved this problem in my clj-progress module (node-progress port to Clojure):

(with-progress-bar " [:wheel][:bar] :done/:total :elapseds :percent :etas"
  (init -1) ; non-positive total
  (...); some code calling (tick)
  (done))

progress

It will be very nice to have something like that in node-progress as well.

If you'll approve my proposal, then I could try to implement it myself based on my previous Clojure implementation, and send you a PR. Though I'm not sure when I'll manage to find some time to do it.

lbeschastny avatar Feb 18 '16 10:02 lbeschastny

Happy to review a PR!

thebigredgeek avatar May 20 '16 22:05 thebigredgeek

Attached my PR with proposed implementation and usage example.

lbeschastny avatar May 22 '16 13:05 lbeschastny

Code is out of date. Needs to be updated before considered @lbeschastny

thebigredgeek avatar Dec 18 '16 06:12 thebigredgeek

@thebigredgeek rebased my branch onto the latest master.

lbeschastny avatar Dec 18 '16 10:12 lbeschastny

Hi! Thank you for your job! This feature is great. I would be glad to use this in my project.

mctep avatar Apr 09 '17 15:04 mctep

This is a very helpful feature and wondering if this could actually be made available officially via this package.

jainanshul avatar Aug 28 '17 17:08 jainanshul

Any update on this? Any help required?

jwhitmarsh avatar Oct 11 '17 16:10 jwhitmarsh