{"id":13747618,"url":"https://github.com/busyloop/powerbar","last_synced_at":"2025-06-20T10:13:43.464Z","repository":{"id":1996674,"uuid":"2929726","full_name":"busyloop/powerbar","owner":"busyloop","description":"The last progressbar-library you'll ever need","archived":false,"fork":false,"pushed_at":"2018-04-13T23:30:01.000Z","size":2148,"stargazers_count":102,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T03:05:38.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/busyloop.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-07T02:23:43.000Z","updated_at":"2024-02-15T17:29:36.000Z","dependencies_parsed_at":"2022-09-20T22:11:12.268Z","dependency_job_id":null,"html_url":"https://github.com/busyloop/powerbar","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fpowerbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fpowerbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fpowerbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fpowerbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busyloop","download_url":"https://codeload.github.com/busyloop/powerbar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fpowerbar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258420176,"owners_count":22698226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T06:01:35.345Z","updated_at":"2025-06-20T10:13:38.447Z","avatar_url":"https://github.com/busyloop.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# PowerBar [![Gem Version](https://badge.fury.io/rb/powerbar.svg)](https://badge.fury.io/rb/powerbar)\n\nThis is PowerBar - The last progressbar-library you'll ever need.\n\n## Features\n\n* Detects when stdout is not a terminal and automatically falls back to logging\n  * Does not clutter your log-files with ansi-codes!\n  * If your CLI-app can run interactively and non-interactively (e.g. cronjob)\n    you will automatically get reasonable progress-output in both modes.\n  * By default prints to stderr but can call any output-method\n    of your choice (e.g. your favorite Logger).\n\n* Fully customizable; all output is template-driven.\n\n* All output is optional. You may set PowerBar to silently collect progress\n  information (percentage-done, throughput, ETA, etc.) and then use the\n  computed values elsewhere in your app.\n\n* All state can be updated at any time. For example: If you're monitoring a\n  multi-part operation then you can change the status-message of a running\n  PowerBar to reflect the current state.\n\n## Demo\n\n![screencast](https://github.com/busyloop/powerbar/raw/master/ass/screencast.gif?raw=true)\n\n## Installation\n\n`gem install powerbar`\n\n## Getting Started\n\nWatch the demo that was installed along with the gem:\n\n`powerbar-demo`\n\nThen look at the [source-code](https://github.com/busyloop/powerbar/blob/master/bin/powerbar-demo) of the demo. Pretty much all use-cases are covered in there, including templates and how to hook in your own logger.\n\n\n## Example (for the impatient)\n\n```\n#!/usr/bin/env ruby\n\nrequire 'powerbar'\n\ntotal = 100000\nstep = 1000\n\np = PowerBar.new\n\n# Override some defaults to demonstrate how the settings work\np.settings.tty.finite.template.barchar = '*'\np.settings.tty.finite.template.padchar = '.'\n\n# Dummy loop to simulate some progress\n(0..total).step(step).each do |i|\n  p.show(:msg =\u003e 'DEMO 1 - Ten seconds of progress', :done =\u003e i, :total =\u003e total)\n  sleep 0.1\nend\np.close\n```\n\n## Documentation?\n\nUse the [source](https://github.com/busyloop/powerbar/blob/master/lib/powerbar.rb), Luke!\n\n## License (MIT)\n\nCopyright (C) 2011 by moe@busyloop.net\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fpowerbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusyloop%2Fpowerbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fpowerbar/lists"}