ASCII tables

Go back


ITGlobal CLI provides a handy way to render ASCII tables. There are to ways to define table data:

Table generator is also used internally in command line parser to produce help output.

Output

By default table builders renders table output to standard output. However, there are few helpers to customize output:

Customized rendering

Table rendering is configured via TableRenderer which is passed to TerminalTable.Create<T>()/TerminalTable.CreateFluent() methods.

By default a TableRenderer.Default renderer is used, which is a Grid renderer with Sketch style unless overriden. The following built-in table renderers are available:

Grid table renderer

Grid-style table renderer is enabled by default and is designed to render a table with preudographic characters. It supports two rendering styles:

Pipe table renderer

Pipe-style table renderer is designed to render a table using a markdown-style formatting.

var renderer = TableRenderer.Pipe();

pipe

Plain table renderer

Plain table renderer is designed to render a table using a simpliest formatting possible. This renderer provides most compact output.

var renderer = TableRenderer.Plain();

plain