Bash-Visual
Bash visualisation library
Description
BashVisual simplifies Unix-console operation (sh, bash, csh etc). It uses tput and standard Unix-terminal facilities. It is also thread-safe.
BashVisual allows:
- control position, colors and text's form
- draw graphical primitives (rectangle, window)
- create dynamic scrolling objects
- get window parameters (weight, height)
Installation
Add this line to your application's Gemfile:
gem 'bash-visual'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bash-visual
Usage
require 'bash-visual'
include Bash_Visual
border_font = Font.new(:std, :blue)
main_color = Font.new(:bold, :green)
console = Console.new(main_color)
console.clear
console.draw_window(2, 2, 20, 5, 'Example', border_font, Console::BORDER_UTF_DOUBLE)
console.write_to_position(5, 3, 'Hello World!')
console.position = [0, 8]
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request