Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

io7m-com/tabla

Repository files navigation

tabla

Maven Central Maven Central (snapshot) Codecov Java Version

com.io7m.tabla

JVM Platform Status
OpenJDK (Temurin) Current Linux Build (OpenJDK (Temurin) Current, Linux)
OpenJDK (Temurin) LTS Linux Build (OpenJDK (Temurin) LTS, Linux)
OpenJDK (Temurin) Current Windows Build (OpenJDK (Temurin) Current, Windows)
OpenJDK (Temurin) LTS Windows Build (OpenJDK (Temurin) LTS, Windows)

Repository Relocation

Development of this project has moved to an open-source but not open-contribution model.

Source code and commits will remain publicly available perpetually, but issues and/or pull requests will be rejected and/or ignored. Additionally, this project will now only be available via a read-only mirror at:

https://codeberg.org/io7m-com/tabla

tabla

Features

  • Unicode plain text table rendering.
  • Uses a generic constraint solver for table layouts.
  • Written in pure Java 21.
  • OSGi ready.
  • JPMS ready.
  • ISC license.
  • High-coverage automated test suite.

Building

$ mvn clean verify

Usage

var builder =
  Table.builder()
    .declareColumn("Item")
    .declareColumn("Description");

builder.addRow()
  .addCell("ca146625-5b90-4478-8ca3-51bce50f4d07")
  .addCell("Structural documentation.")

...
// Add more rows here.
...

var table =
  builder.build();

var lines =
  Tabla.framedUnicodeRenderer()
    .renderLines(table);

for (var line : lines) {
  System.out.println(line);
}
┌──────────────────────────────────────┬────────────────────────────────────────────┐
│ Item                                 │ Description                                │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ ca146625-5b90-4478-8ca3-51bce50f4d07 │ Structural documentation.                  │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ 8df7d45d-a6cd-4bd9-8e40-daa1f38d2835 │ A small jar containing a pickled beetroot. │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ 6253ab7f-2f0f-4961-9b9d-164b462da266 │ Assorted coat hangers.                     │
├──────────────────────────────────────┼────────────────────────────────────────────┤
│ 577cfd36-7d2d-41db-a9b9-cf4d4ced9160 │ A silver, decorative clock.                │
└──────────────────────────────────────┴────────────────────────────────────────────┘

About

Plain text table rendering.

Topics

Resources

License

Stars

Watchers

Forks

Contributors