Open dimitrieh opened 8 years ago
It may be possible but I doubt it would be accurate. Maybe just a simple spinner could help? I agree converting to gif can sometime take a lot of time.
I am happy taking any PR adding something like indicating when gifify is working.
I think a start would just be to output something to see that it is not stuck :P
I think a start would just be to output something to see that it is not stuck :P
We could but right now the fact that your command line does not returns to the prompt means "It's working"
@vvo or is it?
@vvo or is it?
I did not get what you meant. I am open to any PR adding a funny emoji spinner anything you want :)
Sorry, I was just kidding. gifify <whatever> && say done
works just fine for me.
NP :dancer:
I need it because I don't know whether it's dead looping or just dead lock somewhere. Let me know what's its progress dose help.
I think a start would just be to output something to see that it is not stuck :P
We could but right now the fact that your command line does not returns to the prompt means "It's working"
IMHO an explicit message like "converting, please wait..." would tell the user that this is normal and expected behavior, rather than a possible hang up, as others have said.
An animated spinner, and even an actual progress bar, would be nicer for sure, but I'd say that simply printing a message like the above would go around 80% of the way (if not more) to solve the core issue here.
Open to PRS, should take 2 minutes to add this message
Open to PRS, should take 2 minutes to add this message
For someone who's not familiar with this code (or this sort of code), would you mind giving a pointer or two? According to https://github.com/vvo/gifify/blob/master/bin/gifify#L42, the right place to add such a message would be at encode()
, but what's the method that should be used to print such a message?
As to updating the behaviour and usage, first you could update the usage here: https://github.com/vvo/gifify/blob/8375290c5a8b1d994e261340140ff115dc72991a/bin/gifify#L14
Then I would add a new flag that would mean 'stdout' (not just "-", might be tricky to handle or remember).
Any examples of unix programs having -o and - or any other flag like that? Maybe curl?
I think you your comment was meant for #100, right?
Oh yeah, sorry I misread that.
As far as putting a "loading message" I would give a try here: https://github.com/vvo/gifify/blob/8375290c5a8b1d994e261340140ff115dc72991a/bin/gifify#L72
Which is the place where we already checked parameters etc.
Give it a try locally:
git clone git@github.com:vvo/gifify.git
cd gifify
npm link
# now "gifify" is the binary of the local gifify directory, handy to test!
# do the changes in https://github.com/vvo/gifify/blob/8375290c5a8b1d994e261340140ff115dc72991a/bin/gifify#L72
# try to run gifify and see if it works
Then submit a PR, let me know!
Thanks for the detailed steps. I was still unsure what function to call to write to stdout, but hopefully #101 does the right thing. It certainly seemed to work locally as intended.
Is it or can it be possible to get a progress bar when converting a video to gif?