-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.in
61 lines (47 loc) · 2.71 KB
/
README.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
## tabla
### Features
* Unicode plain text table rendering.
* Uses a generic constraint solver for table layouts.
* Written in pure Java 21.
* [OSGi](https://www.osgi.org/) ready.
* [JPMS](https://en.wikipedia.org/wiki/Java_Platform_Module_System) 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. │
└──────────────────────────────────────┴────────────────────────────────────────────┘
```