|
1 | 1 | # termhyo Examples |
2 | 2 |
|
3 | | -This directory contains various examples demonstrating the features of termhyo. |
| 3 | +This directory contains various examples demonstrating the features and flexibility of termhyo. |
4 | 4 |
|
5 | 5 | ## Running Examples |
6 | 6 |
|
7 | | -Each example is in its own directory with a `main.go` file. You can run them in two ways: |
| 7 | +Each example is in its own directory with a `main.go` file. You can run them as follows: |
8 | 8 |
|
9 | 9 | ### Method 1: Direct execution |
| 10 | + |
10 | 11 | ```bash |
11 | 12 | cd basic |
12 | 13 | go run main.go |
13 | 14 | ``` |
14 | 15 |
|
15 | 16 | ### Method 2: Build then run |
| 17 | + |
16 | 18 | ```bash |
17 | 19 | cd basic |
18 | 20 | go build -o basic . |
19 | 21 | ./basic |
20 | 22 | ``` |
21 | 23 |
|
22 | 24 | ### Method 3: Using Makefile (from project root) |
| 25 | + |
23 | 26 | ```bash |
24 | 27 | make examples # Build all examples |
25 | 28 | ``` |
26 | 29 |
|
27 | | -## Available Examples |
| 30 | +## Example List |
28 | 31 |
|
29 | 32 | ### [basic/](basic/) |
30 | | -Basic table creation and rendering. Good starting point. |
31 | 33 |
|
32 | | -**Features:** Column definition, data addition, basic rendering |
| 34 | +Basic table creation and rendering. The best starting point for learning termhyo. |
| 35 | + |
| 36 | +### [autoalign_false/](autoalign_false/) |
| 37 | + |
| 38 | +Demonstrates `AutoAlign(false)` and `VerticalBarStyle`. Disables global auto-alignment and uses only vertical separators for a minimal look. |
33 | 39 |
|
34 | 40 | ### [header_styles/](header_styles/) |
35 | | -Advanced header styling with ANSI escape sequences. |
36 | 41 |
|
37 | | -**Features:** Colors, text formatting, border control, convenience methods |
| 42 | +Advanced header styling with ANSI colors, text decorations, border control, and convenience methods. |
38 | 43 |
|
39 | 44 | ### [header_full_line/](header_full_line/) |
40 | | -Full-line header styling examples. |
41 | 45 |
|
42 | | -**Features:** Complete line styling, background colors, visual distinction |
| 46 | +Applies color and decoration to the entire header line. |
43 | 47 |
|
44 | 48 | ### [streaming/](streaming/) |
45 | | -Streaming mode for large datasets with fixed-width columns. |
46 | 49 |
|
47 | | -**Features:** Memory-efficient rendering, fixed-width columns |
| 50 | +Streaming rendering for large datasets with fixed-width columns. Memory efficient output. |
48 | 51 |
|
49 | 52 | ### [japanese/](japanese/) |
50 | | -Japanese text handling and proper width calculation. |
51 | 53 |
|
52 | | -**Features:** Multi-byte characters, proper alignment, Unicode support |
| 54 | +Proper width calculation and alignment for Japanese (multibyte) text. |
53 | 55 |
|
54 | 56 | ### [unicode/](unicode/) |
55 | | -Unicode character support including emojis and special characters. |
56 | 57 |
|
57 | | -**Features:** Emoji, combining characters, various Unicode blocks |
| 58 | +Display of various Unicode characters, including emoji and special symbols. |
58 | 59 |
|
59 | 60 | ### [combining/](combining/) |
60 | | -Combining character handling and width calculation. |
61 | 61 |
|
62 | | -**Features:** Diacritics, combining marks, proper display width |
| 62 | +Handling and width calculation for combining characters (diacritics, etc). |
63 | 63 |
|
64 | 64 | ### [markdown/](markdown/) |
65 | | -Markdown table format output. |
66 | 65 |
|
67 | | -**Features:** Markdown syntax, alignment indicators, header styling |
| 66 | +Table output in Markdown format. |
68 | 67 |
|
69 | 68 | ### [custom_borders/](custom_borders/) |
70 | | -Custom border configuration and styling. |
71 | 69 |
|
72 | | -**Features:** Border customization, selective border removal |
| 70 | +Custom border configuration. Flexible control, such as only internal separators or no borders at all. |
73 | 71 |
|
74 | 72 | ### [styles/](styles/) |
75 | | -Different border styles demonstration. |
76 | 73 |
|
77 | | -**Features:** Box drawing, ASCII, rounded borders |
| 74 | +Comparison of border styles (BoxDrawing, ASCII, Rounded, Double, Minimal, VerticalBar, etc). |
78 | 75 |
|
79 | 76 | ## Learning Path |
80 | 77 |
|
81 | | -1. **Start with [basic/](basic/)** - Learn fundamental concepts |
82 | | -2. **Try [header_styles/](header_styles/)** - Understand styling options |
83 | | -3. **Explore [unicode/](unicode/) and [japanese/](japanese/)** - Character handling |
84 | | -4. **Check [streaming/](streaming/)** - Performance considerations |
85 | | -5. **Review [markdown/](markdown/)** - Alternative output formats |
86 | | -6. **Experiment with [custom_borders/](custom_borders/)** - Advanced customization |
| 78 | +1. **Start with [basic/](basic/)** - Learn the fundamentals |
| 79 | +1. **Try [styles/](styles/) and [custom_borders/](custom_borders/)** - Explore border styles and customization |
| 80 | +1. **Explore [header_styles/](header_styles/) and [header_full_line/](header_full_line/)** - Learn about header decoration and coloring |
| 81 | +1. **Check [autoalign_false/](autoalign_false/)** - See minimal tables and alignment control |
| 82 | +1. **Review [japanese/](japanese/), [unicode/](unicode/), and [combining/](combining/)** - Understand multilingual and Unicode support |
| 83 | +1. **Experiment with [markdown/](markdown/) and [streaming/](streaming/)** - Use Markdown output and streaming rendering |
| 84 | +1. **Try [header_styles/](header_styles/)** - Understand styling options |
| 85 | +1. **Explore [unicode/](unicode/) and [japanese/](japanese/)** - Character handling |
| 86 | +1. **Check [streaming/](streaming/)** - Performance considerations |
| 87 | +1. **Review [markdown/](markdown/)** - Alternative output formats |
| 88 | +1. **Experiment with [custom_borders/](custom_borders/)** - Advanced customization |
87 | 89 |
|
88 | 90 | ## Building All Examples |
89 | 91 |
|
|
0 commit comments