Okomikeruko / terminal-progress

Terminal Progress is a progress bar manager for Ruby applications. It provides a simple way to display progress updates in the terminal, making it ideal for tasks like seed data generation, file processing, or any operation where progress tracking is ideal.
MIT License
0 stars 0 forks source link

Terminal Progress

Gem (including prereleases) GitHub Packages License

Terminal Progress is a versatile and customizable progress bar manager for Ruby applications. It provides an elegant and interactive way to display progress updates in the terminal, making it ideal for tasks like seed data generation, file processing, or any operation where progress tracking is crucial.

Features

Installation

Add this line to your application's Gemfile:

gem 'terminal-progress', '~> 0.1.0'

And then execute

bundle install

Or install it globally with:

gem install terminal-progress

Usage

Here's a quick example of how to use Terminal Progress in your Ruby application:

require 'terminal-progress'

# Create a new progress bar with a maximum value
progress_bar = TerminalProgress.new(100)

# Update and display the progress bar
(0..100).each do |i|
  progress_bar.print_progress("Processing item #{i}")
  sleep(0.1)
end

# Complete the progress and clean up
progress_bar.print_complete

Contributing

Bug reports and pull requests are welcome on GitHub at our Terminal Progress Repository.

License

Terminal Progress is available as open-source software under the MIT License.