mini-table

A lightweight, non-dependent Java ASCII TABLE generation library.

License

License

GroupId

GroupId

com.blinkfox
ArtifactId

ArtifactId

mini-table
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

mini-table
A lightweight, non-dependent Java ASCII TABLE generation library.
Project URL

Project URL

https://github.com/blinkfox/mini-table
Source Code Management

Source Code Management

https://github.com/blinkfox/mini-table

Download mini-table

How to add to project

<!-- https://jarcasting.com/artifacts/com.blinkfox/mini-table/ -->
<dependency>
    <groupId>com.blinkfox</groupId>
    <artifactId>mini-table</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.blinkfox/mini-table/
implementation 'com.blinkfox:mini-table:1.0.0'
// https://jarcasting.com/artifacts/com.blinkfox/mini-table/
implementation ("com.blinkfox:mini-table:1.0.0")
'com.blinkfox:mini-table:jar:1.0.0'
<dependency org="com.blinkfox" name="mini-table" rev="1.0.0">
  <artifact name="mini-table" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.blinkfox', module='mini-table', version='1.0.0')
)
libraryDependencies += "com.blinkfox" % "mini-table" % "1.0.0"
[com.blinkfox/mini-table "1.0.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

mini-table

HitCount Build Status Javadocs GitHub license codecov Maven Central Java Version

中文文档

A lightweight, zero-dependency Java ASCII TABLE generation library.

Features

  • Lightweight, no dependencies (jar package only 9kb)
  • API is easy to use
  • Easy to integrate or customize modifications, only one Java file, and code specification

How to use

Maven

<dependency>
    <groupId>com.blinkfox</groupId>
    <artifactId>mini-table</artifactId>
    <version>1.0.0</version>
</dependency>

API

Demo1 (No Title)

String table = new MiniTable()
        .addHeaders("header1", "header2")
        .addDatas("col11", "col12")
        .addDatas("col21", "col22")
        .render();
System.out.println(table);

Output Result:

+---------+---------+
| header1 | header2 |
+---------+---------+
|  col11  |  col12  |
|  col21  |  col22  |
+---------+---------+

Demo2(Titled)

String table = new MiniTable("The Title")
        .addHeaders("Name", "Sex", "Age", "Email", "Phone")
        .addDatas("LiLei", "male", 25, "[email protected]", "13809345219")
        .addDatas("hanMeiMei", "female", 23, "[email protected]", "13515343853")
        .addDatas("ZhangSan", "female", 32, "[email protected]", "13920199836")
        .render();
System.out.println(table);

Output Result:

+-------------------------------------------------------------+
|                          The Title                          |
+-----------+--------+-----+--------------------+-------------+
|   Name    |  Sex   | Age |       Email        |    Phone    |
+-----------+--------+-----+--------------------+-------------+
|   LiLei   |  male  | 25  |  [email protected]   | 13809345219 |
| hanMeiMei | female | 23  |    [email protected]     | 13515343853 |
| ZhangSan  | female | 32  | [email protected] | 13920199836 |
+-----------+--------+-----+--------------------+-------------+

License

This mini-table library is open sourced under the Apache License 2.0.

Versions

Version
1.0.0