Comments (6)
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.
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:
from gh.
@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.
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.
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.
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)
- No precompiled binaries for 2.1.0 :-( HOT 4
- Unknown revision or path not in the working tree HOT 3
- "access denied or repository not exported" error after gh fork HOT 1
- Add multi-upstream set-upstream support HOT 1
- pull-request for GitHub Enterprise over http doesn't work HOT 2
- gh fork Enhancements HOT 4
- feature: git am -3 <url> (apply mail) HOT 2
- Crash when calling `git cherry-pick` without an argument HOT 1
- gh compare (feature-branch) HOT 2
- Debian repository? HOT 3
- Save pull request message file when pull request fails HOT 1
- Don't require GitHub repo to be `origin` remote HOT 12
- Crash report - Index -1 is out of bound HOT 1
- gh pull-request default message based on local version of base branch, not remote HOT 8
- Can't force SSH for GitHub Enterprise HOT 1
- How do I build GH on Windows? or is there a windows prebuilt for 2.1.0? HOT 9
- Certificate Errors from gh HOT 2
- Cannot find packages when testing or building HOT 2
- Is this deprecated in favor of hub? HOT 3
- Editor doesn't work when using git on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gh.