Project

tabulate

0.0
No commit activity in last 3 years
No release in over 3 years
Create fancy command line tables with ease.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 3.6.5
 Project Readme

tabulate

Create fancy command line tables with ease.

Builtin styles:

"simple", "plain", "fancy", "sqlite", "plain2", "plain_alt", "legacy".

PLEASE BE AWARE this is my first gem :) .

Features

  • Builtin styles
  • Colored data input support
  • Double width east Asian character support with ruby 1.9

Examples

source = [["\e[31maht\e[m",3],[4,"\e[33msomething\e[m"],['s',['abc','de']]]
labels = ["a",'b']
puts tabulate(labels, source, :indent => 4, :style => 'legacy')

will produce a table like the following, with "aht" colored in red and "something" in yellow.

+-----+-----------+
| a   | b         |
+=====+===========+
| aht | 3         |
| 4   | something |
| s   | abc       |
|     | de        |
+-----+-----------+

Requirements

Nil. East Asian character support requires ruby 1.9 and above.

Install

gem install tabulate

License

MIT