falun / golang-progress Goto Github PK
View Code? Open in Web Editor NEWIt's a progress indicator for your terminal. In go.
License: MIT License
It's a progress indicator for your terminal. In go.
License: MIT License
Instead of manually running it we should be generating the whole frames.go file.
(While we're at it we should also add a package-level variable for each so that animation selection can be verified as a valid choice at compile time)
Spinners are great and all but progress bars are where it's really at. I'd like to be able to specify different animations in a similar fashion to the spinner. The interface might look something like:
type ProgressBar interface {
Start(s string)
UpdateFrames(fs BarFrames)
SetValue(float)
Stop()
Stopln()
}
shrug
I mean this in the visual, not byte, sense.
Basically if the render width of a character is large enough it will force the displayed text to the right by one block. This impacts the steadiness of the text and also can result in insufficiently clearing the text on a redraw.
This is why we have the extra space at https://github.com/falun/golang-progress/blob/master/demo/spinner.go#L9
Ideally we'd walk the frames and compute a max width then pad by the appropriate amount per frame.
You can see it in the demo.
We end up with a block cursor that has a grey background. Not sure what a good cross platform solution is.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.