https://github.com/kevinstuffandthings/termichunk
Organize chunks of text within terminals
https://github.com/kevinstuffandthings/termichunk
ruby rubygems terminal
Last synced: about 2 months ago
JSON representation
Organize chunks of text within terminals
- Host: GitHub
- URL: https://github.com/kevinstuffandthings/termichunk
- Owner: kevinstuffandthings
- License: mit
- Created: 2020-08-15T13:06:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T16:44:26.000Z (about 3 years ago)
- Last Synced: 2025-12-05T12:58:15.011Z (5 months ago)
- Topics: ruby, rubygems, terminal
- Language: Ruby
- Homepage:
- Size: 14.6 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# TermiChunk  [](https://badge.fury.io/rb/termichunk)
Take large chunks of text that might otherwise run together, and organize them neatly within your terminal output.
Originally developed for [Simulmedia](https://simulmedia.com).
## Installation
Add this line to your application's Gemfile:
```ruby
# update with the version of your choice
gem 'termichunk'
```
And then execute:
```bash
$ bundle install
```
Or install it yourself as:
```bash
$ gem install termichunk
```
## Usage
Create reports. Nest them within each other. Bring sanity to your outputs.
```ruby
report = TermiChunk::Report.new(title: 'My Report')
report << 'Line one goes in here'
report << 'Another line here!'
puts report
┌─[ My Report ]──────────
│ Line one goes in here
│ Another line here!
└─[ My Report ]──────────
puts(TermiChunk::Report.new(title: 'AMAZING', padding: 1) do |parent|
parent << 'I can write some stuff here'
parent << report
end)
┌─[ AMAZING ]────────────────────
│
│ I can write some stuff here
│
│ ┌─[ My Report ]──────────
│ │ Line one goes in here
│ │ Another line here!
│ └─[ My Report ]──────────
│
│
└─[ AMAZING ]────────────────────
```
# Problems?
Please submit an [issue](https://github.com/kevinstuffandthings/termichunk/issues).
We'll figure out how to get you up and running with TermiChunk as smoothly as possible.