{"_id":"ascii-progress","_rev":"448219","name":"ascii-progress","description":"Ascii progress-bar(s) in the terminal.","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"bubkoo","email":""}],"time":{"modified":"2021-08-05T06:53:11.000Z","created":"2016-04-19T16:09:13.719Z","1.0.5":"2016-11-01T02:37:10.231Z","1.0.4":"2016-10-19T06:14:08.900Z","1.0.3":"2016-09-14T13:27:46.920Z","1.0.2":"2016-06-03T16:03:20.725Z","1.0.1":"2016-04-20T07:42:44.284Z","1.0.0":"2016-04-19T16:09:13.719Z"},"users":{},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/ascii-progress.git"},"versions":{"1.0.5":{"name":"ascii-progress","version":"1.0.5","description":"Ascii progress-bar(s) in the terminal.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/ascii-progress.git"},"keywords":["progress","bar","meter","ascii","status","console","terminal","ansi.js"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/ascii-progress/issues"},"homepage":"https://github.com/bubkoo/ascii-progress","dependencies":{"ansi.js":"0.0.5","end-with":"^1.0.2","get-cursor-position":"1.0.3","on-new-line":"1.0.0","start-with":"^1.0.2"},"gitHead":"a0a689c0580e120e30a88f429e8660ef4a206c0c","_id":"ascii-progress@1.0.5","_shasum":"9610aa127ab794af561e893613c36c906f78d9ee","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"9610aa127ab794af561e893613c36c906f78d9ee","size":6571,"noattachment":false,"key":"/ascii-progress/-/ascii-progress-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/ascii-progress/download/ascii-progress-1.0.5.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ascii-progress-1.0.5.tgz_1477967829643_0.10936662158928812"},"directories":{},"publish_time":1477967830231,"_cnpm_publish_time":1477967830231,"_hasShrinkwrap":false},"1.0.4":{"name":"ascii-progress","version":"1.0.4","description":"Ascii progress-bar(s) in the terminal.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/ascii-progress.git"},"keywords":["progress","bar","meter","ascii","status","console","terminal","ansi.js"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/ascii-progress/issues"},"homepage":"https://github.com/bubkoo/ascii-progress","dependencies":{"ansi.js":"0.0.5","end-with":"^1.0.2","get-cursor-position":"1.0.2","on-new-line":"1.0.0","start-with":"^1.0.2"},"gitHead":"3d8219d597ae0039e59387783f873da54b47bfe7","_id":"ascii-progress@1.0.4","_shasum":"6a1253968ffa6756667d1cbb1eb058246e0b89fa","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"6a1253968ffa6756667d1cbb1eb058246e0b89fa","size":6563,"noattachment":false,"key":"/ascii-progress/-/ascii-progress-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/ascii-progress/download/ascii-progress-1.0.4.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ascii-progress-1.0.4.tgz_1476857648102_0.7364485540892929"},"directories":{},"publish_time":1476857648900,"_cnpm_publish_time":1476857648900,"_hasShrinkwrap":false},"1.0.3":{"name":"ascii-progress","version":"1.0.3","description":"Ascii progress-bar(s) in the terminal.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/ascii-progress.git"},"keywords":["progress","bar","meter","ascii","status","console","terminal","ansi.js"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/ascii-progress/issues"},"homepage":"https://github.com/bubkoo/ascii-progress","dependencies":{"ansi.js":"0.0.5","end-with":"^1.0.2","get-cursor-position":"1.0.2","on-new-line":"1.0.0","start-with":"^1.0.2"},"gitHead":"d00ab69ae56c983f3a20e4d2469f71cefa8f20fd","_id":"ascii-progress@1.0.3","_shasum":"2b38aa236b0062173199b2e2c3e4410d95d254c1","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"2b38aa236b0062173199b2e2c3e4410d95d254c1","size":4934,"noattachment":false,"key":"/ascii-progress/-/ascii-progress-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/ascii-progress/download/ascii-progress-1.0.3.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ascii-progress-1.0.3.tgz_1473859665130_0.7482219287194312"},"directories":{},"publish_time":1473859666920,"_cnpm_publish_time":1473859666920,"_hasShrinkwrap":false},"1.0.2":{"name":"ascii-progress","version":"1.0.2","description":"Ascii progress-bar(s) in the terminal.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/ascii-progress.git"},"keywords":["progress","bar","meter","ascii","status","console","terminal","ansi.js"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/ascii-progress/issues"},"homepage":"https://github.com/bubkoo/ascii-progress","dependencies":{"ansi.js":"0.0.5","end-with":"^1.0.2","get-cursor-position":"1.0.1","on-new-line":"1.0.0","start-with":"^1.0.2"},"gitHead":"bee09fcc689a3cfa1805eb193d54be19ee094ffd","_id":"ascii-progress@1.0.2","_shasum":"26119ca297d354e2372561b78946e4b2916aaaef","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"26119ca297d354e2372561b78946e4b2916aaaef","size":6429,"noattachment":false,"key":"/ascii-progress/-/ascii-progress-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ascii-progress/download/ascii-progress-1.0.2.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ascii-progress-1.0.2.tgz_1464969800268_0.20868021110072732"},"directories":{},"publish_time":1464969800725,"_cnpm_publish_time":1464969800725,"_hasShrinkwrap":false},"1.0.1":{"name":"ascii-progress","version":"1.0.1","description":"Ascii progress-bar(s) in the terminal.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/ascii-progress.git"},"keywords":["progress","bar","meter","ascii","status","console","terminal","ansi.js"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/ascii-progress/issues"},"homepage":"https://github.com/bubkoo/ascii-progress","dependencies":{"ansi.js":"0.0.5","end-with":"^1.0.2","get-cursor-position":"1.0.0","on-new-line":"1.0.0","start-with":"^1.0.2"},"gitHead":"fe05b609e72fe5f94cfd2c33b2b5e05ec58c49a1","_id":"ascii-progress@1.0.1","_shasum":"3115f2e8fef74634cb7b4291fde7cd3eb79e332f","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"3115f2e8fef74634cb7b4291fde7cd3eb79e332f","size":6421,"noattachment":false,"key":"/ascii-progress/-/ascii-progress-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ascii-progress/download/ascii-progress-1.0.1.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ascii-progress-1.0.1.tgz_1461138163427_0.6319739888422191"},"directories":{},"publish_time":1461138164284,"_cnpm_publish_time":1461138164284,"_hasShrinkwrap":false},"1.0.0":{"name":"ascii-progress","version":"1.0.0","description":"Ascii progress-bar(s) in the terminal.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/ascii-progress.git"},"keywords":["progress","bar","meter","ascii","status","console","terminal","ansi.js"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/ascii-progress/issues"},"homepage":"https://github.com/bubkoo/ascii-progress","dependencies":{"ansi.js":"0.0.5","end-with":"^1.0.2","get-cursor-position":"1.0.0","on-new-line":"1.0.0","start-with":"^1.0.2"},"gitHead":"4ca5bed44c9a349593ec80519ec0a63dc8090597","_id":"ascii-progress@1.0.0","_shasum":"80a47b753be005554c7669d815d9c742afc04cf5","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"80a47b753be005554c7669d815d9c742afc04cf5","size":6426,"noattachment":false,"key":"/ascii-progress/-/ascii-progress-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ascii-progress/download/ascii-progress-1.0.0.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ascii-progress-1.0.0.tgz_1461082151541_0.8830593111924827"},"directories":{},"publish_time":1461082153719,"_cnpm_publish_time":1461082153719,"_hasShrinkwrap":false}},"readme":"# ascii-progress\n\n> Ascii progress-bar(s) in the terminal.\n\n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/bubkoo/ascii-progress/blob/master/LICENSE)\n[![Package Quality](http://npm.packagequality.com/shield/ascii-progress.svg)](http://packagequality.com/#?package=ascii-progress)\n\n\n**Feature**:\n\n- Support multi progress-bars\n- Relative and absolute with\n- Colorful bar and text\n- Highly customizable\n\n\n![snapshot](https://raw.githubusercontent.com/bubkoo/ascii-progress/master/snapshot.gif)\n\n\n## Install\n\n```\n$ npm install ascii-progress\n```\n\n## Usage\n\n> For more usage see the [examples](https://github.com/bubkoo/ascii-progress/blob/master/examples)\n\n```javascript\nvar ProgressBar = require('ascii-progress');\n\nvar bar = new ProgressBar({ \n    schema: ':bar',\n    total : 10 \n});\n\nvar iv = setInterval(function () {\n  bar.tick();\n  if (bar.completed) {\n    clearInterval(iv);\n  }\n}, 100);\n```\n\n\n### Options\n\nThese are keys in the options object you can pass to the progress bar along with\n`total` as seen in the example above.\n\n\n- `schema` - template string of the progress bar. Default `\" [:bar] :current/:total :percent :elapseds :etas'\"`.\n- `total` - total number of ticks to complete. Default `100`.\n- `current`- number of completed ticks. Default `0`.\n- `width` - display width, percentage or less than `1` is relative the terminal's width. Default `options.total`.\n- `filled`- completion character. Default `\"▇\"`.\n- `blank` - blank character. Default `\"-\"`.\n- `clear` - clear the progress bar on completion. Default `false`.\n- `callback` -  optional function to call when the progress bar completes.\n\n\n### Properties\n \n - `schema`\n - `total`\n - `current`\n - `completed`\n\n### Methods\n\n#### `setSchema(schema, refresh/tokens)`\n\nUpdate the schema of the progress bar. If `refresh` or `tokens` is truely the progress bar will be refreshed.\n\n#### `tick(delta, tokens)` \n\nUpdate ticks of the progress bar by `delta`, then render the progress bar with optional `tokens`.\n\n#### `update(ratio, tokens)` \n\nUpdate the progress bar to `ratio` by percentage, then render the progress bar with optional `tokens`.\n\n#### `clear()` \n\nClean the progress bar in the terminal.\n\n\n## Schema\n\nThe schema defines appearance the progress bar. Few inner tokens and many \nformatting methods can be used to customer you progress bar.  \n\n### Tokens\n\nThese are tokens you can use in the format of your progress bar.\n\n- `:filled` Completed part of the progress bar.\n- `:blank` Blank part of  the progress bar.\n- `:bar` Whole progress bar, equal to `:completed:blank`.\n- `:current` Current tick number.\n- `:total` Total ticks.\n- `:percent` Completion percentage.\n- `:elapsed` Time elapsed in seconds.\n- `:eta` Estimated completion time in seconds.\n\n### Custom Tokens\n\nYou can define custom tokens by adding a `{name: value}` object parameter to your method (`tick()`, `update()`, etc.) calls.\n\n```javascript\nvar bar = new ProgressBar({\n    schema: ':current: :token1 :token2',\n    total : 3 \n});\nbar.tick({\n  'token1': \"Hello\",\n  'token2': \"World!\"\n})\nbar.tick(2, {\n  'token1': \"Goodbye\",\n  'token2': \"World!\"\n})\n```\n\nThe above example would result in the output below.\n\n```\n1: Hello World!\n3: Goodbye World!\n```\n\n### Colors\n\nColor names can be use in schema:\n\n```\n:bar.red :percent.green\n```\n\nThen the progress bar will be red, and the percentage will be green.\n\nAll available color names:\n\n- red\n- cyan\n- blue\n- grey\n- white\n- black\n- green\n- yellow\n- magenta\n- brightRed\n- brightBlue\n- brightCyan\n- brightWhite\n- brightBlack\n- brightGreen\n- brightYellow\n- brightMagenta\n\nAnd with the `bg` prefix, such as `bgRed`, the color will be applied to the background.\n\n```\n:bar.red.bgBlue\n```\n\nThe above progress bar has blue background and red foreground.\n\n### Gradient\n\n```\n:bar.gradient(red,blue)\n```\n\nThe arguments can be color names or hex color:\n\n- red\n- cyan\n- blue\n- grey\n- white\n- black\n- green\n- yellow\n- magenta\n- \\#xxxxxx\n\n\n### Font style\n\nSame as color names, font style can also be assigned by name:\n\n- bold\n- italic\n- inverse\n- underline\n\n```\n:bar.red :percent.green.bold\n```\n\nThe percentage is green and bold.\n\n\n## Contributing\n\nPull requests and stars are highly welcome.\n\nFor bugs and feature requests, please [create an issue](https://github.com/bubkoo/ascii-progress/issues/new).\n\n","_attachments":{},"homepage":"https://github.com/bubkoo/ascii-progress","bugs":{"url":"https://github.com/bubkoo/ascii-progress/issues"},"license":"MIT"}