TextView is a Ruby library that leverages the Curses library to create and manage terminal-based windows with features like color pairings, message dispatching, and debug logging. It supports a modular approach allowing additional feature inclusion.
Add this line to your application's Gemfile:
gem'text_view'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install text_view
To create a new window:
require'text_view'window=TextView::Window.newTo include additional features:
require'text_view'TextView::Window.include_feature(MyFeatureModule)For more information, see the Examples section.
- Color Pairings: Easily manage color pairings for text and background.
- Message Dispatching: Register and dispatch messages between parent and child windows.
- Debug Logging: Enable debug logging via environment variables to assist in development.
- Modular Approach: Include additional features easily using Ruby's module inclusion.
You can find example usage in the examples directory.
basic_usage.rb: Demonstrates the basic usage of creating a new window.three_windows.rb: Demonstrates how to create and manage multiple windows.
Run the test suite using:
$ rspec spec- Fork the repo on GitHub.
- Clone the project to your own machine.
- Commit changes to your own branch.
- Push your work back up to your fork.
- Submit a Pull Request so that we can review your changes.
This project is licensed under the MIT License. See the LICENSE.md file for details.