@@ -36,22 +36,23 @@ output = table2ascii(
36
36
print (output)
37
37
38
38
"""
39
- ╔═════╦ ═══════════════════════╗
40
- ║ # ║ G H R S ║
41
- ╟─────╫ ───────────────────────╢
42
- ║ 1 ║ 30 40 35 30 ║
43
- ║ 2 ║ 30 40 35 30 ║
44
- ╟─────╫ ───────────────────────╢
45
- ║ SUM ║ 130 140 135 130 ║
46
- ╚═════╩ ═══════════════════════╝
39
+ ╔══════ ═══════════════════════╗
40
+ ║ # G H R S ║
41
+ ╟────── ───────────────────────╢
42
+ ║ 1 30 40 35 30 ║
43
+ ║ 2 30 40 35 30 ║
44
+ ╟────── ───────────────────────╢
45
+ ║ SUM 130 140 135 130 ║
46
+ ╚══════ ═══════════════════════╝
47
47
"""
48
48
```
49
49
50
50
``` py
51
51
from table2ascii import table2ascii
52
52
53
53
output = table2ascii(
54
- body = [[" Assignment" , " 30" , " 40" , " 35" , " 30" ], [" Bonus" , " 10" , " 20" , " 5" , " 10" ]]
54
+ body = [[" Assignment" , " 30" , " 40" , " 35" , " 30" ], [" Bonus" , " 10" , " 20" , " 5" , " 10" ]],
55
+ first_col_heading = True ,
55
56
)
56
57
57
58
print (output)
@@ -68,6 +69,11 @@ print(output)
68
69
69
70
Soon table2ascii will support more options for customization.
70
71
72
+ | Option | Type | Default | Description |
73
+ | :-----------------: | :----: | :-----: | :--------------------------------------------------------------: |
74
+ | ` first_col_heading ` | ` bool ` | ` False ` | Whether to add a heading column seperator after the first column |
75
+ | ` last_col_heading ` | ` bool ` | ` False ` | Whether to add a heading column seperator before the last column |
76
+
71
77
## 👨🎨 Use cases
72
78
73
79
### Discord messages and embeds
0 commit comments