GithubHelp home page GithubHelp logo

Comments (6)

calavera avatar calavera commented on August 15, 2024

yeah, I saw it before. A solution that comes to my mind is to combine all the uploads in one bar and update it according to the bytes sent.

from gh.

calavera avatar calavera commented on August 15, 2024

I've been playing with pb tonight and I got some interesting results. Unfortunately, I had to change octokit, and since it was just an experiment I haven't committed anything yet.

This is the progress indicator uploading a release, it shows the bytes uploaded and the total to update, I kinda miss the number of files to upload and uploaded:

gh-release-progress

from gh.

owenthereal avatar owenthereal commented on August 15, 2024

@calavera Yeah, I assume we need to change octokit's UploadService.UploadAsset to pass an io.ReadCloser instead of os.File, since Request.Body takes it. But this change is actually a good one IMO and it makes the method more generic by taking any io.ReadCloser.

I agree it'd be more informative to see the progress of each file. Would displaying a progress bar for each file make sense? I mean it shows the file and the number of the bytes. If not, I think showing number of files would be sufficient for now.

from gh.

owenthereal avatar owenthereal commented on August 15, 2024

I think I may not explain clearly, to use pb, I was thinking to use it as a io.Reader (it implements this interface), which we may end up concatenating the input file with the pb reader by using io.MultiReader.

from gh.

calavera avatar calavera commented on August 15, 2024

I don't really think we can print a bar per file. If you print any new line character (\n) you stop having that "progress bar" effect to have a bunch of lines that don't make sense. The trick to print the bar is to start the buffer always in the same position.

Yep, it was clear, that's what I did, I modified octokit to accept an io.ReadCloser instead of an os.File.

from gh.

owenthereal avatar owenthereal commented on August 15, 2024

I don't really think we can print a bar per file. If you print any new line character (\n) you stop having that "progress bar" effect to have a bunch of lines that don't make sense. The trick to print the bar is to start the buffer always in the same position.

Ah...right...

I agree with you that it's more informative to see the numbers of each file than the progress of the overall bytes. I'm closing this issue for now and let's revisit it later if necessary. Thanks for trying pb out! I played with it a bit too and it seems like a neat lib :).

from gh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.