GithubHelp home page GithubHelp logo

behnammodi / cli-infinity-progress Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.41 MB

Use infinity progress-bar for command-line/terminal

Home Page: https://npmjs.com/package/cli-infinity-progress

License: MIT License

Shell 1.60% JavaScript 5.27% TypeScript 93.13%
cli command-line command-line-tool cli-app command-line-app command-line-utility nodejs javascript nodejs-library command-line-interface

cli-infinity-progress's Introduction

A infinity progress bar for terminal

cli-infinity-progress

Also customizable

You can add header, footer and change every time cli-infinity-progress-3

Install

npm install cli-infinity-progress

Usage

const CLIInfinityProgress = require('cli-infinity-progress');

const progress = new CLIInfinityProgress();
progress.start();

Methods:

Name Return Desc
.setBarColor(colors.green) this Set bar color const colors = require('cli-infinity-progress/colors');
.setBackgroundColor(colors.white) this Set background color const colors = require('cli-infinity-progress/colors');
.setHeader('Header') this Set header on top of progress. you can update every time
.setFooter('Footer') this Set footer on bottom of progress. you can update every time
.setBarChar('๐Ÿš•') this Set bar char
.setBackgroundChar('-') this Set background char
.setDirectionRightToLeft() this Progress start from right default is left
.setDirectionLeftToRight() this Progress start from left
.setSize(30) this Set progress size default is 60
.setBarSize(5) this Set bar size default is 20
.setRefreshRate(80) this Set refresh rate default is (1000 / 25)ms
.start() this Start progress
.remove() this Remove progress from terminal
.stop() this Stop progress on terminal
.pause() this Pause progress on terminal
.resume() this Resume progress on terminal

You can call all methods as chaining ex:

const CLIInfinityProgress = require('cli-infinity-progress');
const colors = require('cli-infinity-progress/colors');

progress
  .setBackgroundColor(colors.yellow)
  .setHeader('Loading ...')
  .setFooter('\nPlease be patient.')
  .setBarChar('๐Ÿš•')
  .setBackgroundChar('_')
  .setDirectionRightToLeft()
  .setSize(32)
  .setBarSize(1)
  .setRefreshRate(100)
  .start();

setTimeout(() => progress.setFooter('\nWoo, Cab is coming.'), 3000);

Result:

cli-infinity-progress-5


Build Status

Roadmap

cli-infinity-progress's People

Contributors

behnammodi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cli-infinity-progress's Issues

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.