All Projects → apoorvam → goterminal

apoorvam / goterminal

Licence: MIT license
A cross-platform Go-library for updating progress in terminal.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to goterminal

Swiftuix
Extensions and additions to the standard SwiftUI library.
Stars: ✭ 4,087 (+7198.21%)
Mutual labels:  color, progressbar
theme-ui-native
Build consistent, themeable React Native apps based on constraint-based design principles
Stars: ✭ 67 (+19.64%)
Mutual labels:  color
ProgressBar
Beautiful progress bar for android
Stars: ✭ 62 (+10.71%)
Mutual labels:  progressbar
TitlebarZ
A simple titlebar customizer for Windows 10.
Stars: ✭ 21 (-62.5%)
Mutual labels:  color
sh
Collection Of My Sh Scripts.
Stars: ✭ 109 (+94.64%)
Mutual labels:  color
standard-components
A specification for functional UI components
Stars: ✭ 52 (-7.14%)
Mutual labels:  color
strapless
Strapless is a color-changing CSS boilerplate for HTML elements, and a powerful LessCSS library for colors and patterns.
Stars: ✭ 27 (-51.79%)
Mutual labels:  color
odak
🔬 Scientific computing library for optics 🔭, computer graphics 💻 and visual perception 👀
Stars: ✭ 99 (+76.79%)
Mutual labels:  color
color-alpha
Change alpha of a color string
Stars: ✭ 19 (-66.07%)
Mutual labels:  color
colors
A gorgeous, accessible color system.
Stars: ✭ 748 (+1235.71%)
Mutual labels:  color
dehex
🎨👀 R package: learn to assess a colour hex code by eye
Stars: ✭ 29 (-48.21%)
Mutual labels:  color
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-75%)
Mutual labels:  color
vue-progressbar-component
[CSS GPU Animation] Simple progressbar for vuejs
Stars: ✭ 13 (-76.79%)
Mutual labels:  progressbar
ColorClockSaver
A screensaver for macOS
Stars: ✭ 57 (+1.79%)
Mutual labels:  color
react-native-image-color-picker
Image color picker based on image source provided and return image different color palettes or average color palette
Stars: ✭ 25 (-55.36%)
Mutual labels:  color
UIImageColorRatio
A tool to calculate the color ratio of UIImage in iOS.
Stars: ✭ 34 (-39.29%)
Mutual labels:  color
Write-ProgressEx
Write-ProgressEx is a powershell advanced function that extends the Write-Progress cmdlet.
Stars: ✭ 28 (-50%)
Mutual labels:  progressbar
color-parse
Color string parser
Stars: ✭ 44 (-21.43%)
Mutual labels:  color
nord-atom-syntax
An arctic, north-bluish clean and elegant Atom syntax theme.
Stars: ✭ 72 (+28.57%)
Mutual labels:  color
rgb-tui
Create and get colors code from the terminal using a nice interface.
Stars: ✭ 57 (+1.79%)
Mutual labels:  color

goterminal GoDoc

A cross-platform Go-library for updating progress in terminal.

Installation

  go get -u github.com/apoorvam/goterminal

Usage

    func main() {
    	// get an instance of writer
    	writer := goterminal.New()

    	for i := 0; i < 100; i = i + 10 {
    		// add your text to writer's buffer
    		fmt.Fprintf(writer, "Downloading (%d/100) bytes...\n", i)
    		// write to terminal
    		writer.Print()
    		time.Sleep(time.Millisecond * 200)

    		// clear the text written by previous write, so that it can be re-written.
    		writer.Clear()
    	}

    	// reset the writer
    	writer.Reset()
    	fmt.Println("Download finished!")
    }

Example

output

Another example which uses the go-colortext library to re-write text along with using colors. Here is output of example:

output

Examples can be found here.

More on usage

  • Create a Writer instance.
  • Add your text to writer's buffer and call Print() to print text on Terminal. This can be called any number of times.
  • Call Clear() to move the cursor to position where first Print() started so that it can be over-written.
  • Reset() writer, so it clears its state for next Write.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].