rsalmei / alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
MIT License
5.53k stars 206 forks source link

[Question] Git clone progress bar #182

Closed Kruziikrel13 closed 2 years ago

Kruziikrel13 commented 2 years ago

Is it possible to use this for actions such as a git clone? If so any pointers on how to do so?

TheTechRobo commented 2 years ago

I think you might have to parse git's progress output, but not 100% sure on that.

rsalmei commented 2 years ago

Please explain it better @MichaelPetersen22, I'm not sure what you're talking about.

Kruziikrel13 commented 2 years ago

When git cloning, it does not immediately copy a repo the the computer, (i.e. it takes time to clone) I was wondering if it would be possible to have a load bar for this process.

rsalmei commented 2 years ago

No, I don't think so. This is a Python library, intended for use in Python programs. The git tool is a binary program, I can't see a way to integrate them.

TheTechRobo commented 2 years ago

Again, you might be able to parse the output Git puts onto the CLI, but that's not a guarantee (it might notice it's not a TTY)

rsalmei commented 2 years ago

Well, if you are writing a Python program, and all you want is a cool animated progress bar while you run git clone on the background, there's nothing preventing you from that. It is not hard. In the extreme case, if you were really creating a new frontend for git clone, I guess you could parse its output from the background process, this is way harder, but possible too. Anyway, you can do anything with alive-progress, as long as it's in a Python program 👍