Skip to content

Commit 0d18e28

Browse files
committed
Update README.md
1 parent 1d4d875 commit 0d18e28

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,23 @@ output = table2ascii(
3636
print(output)
3737

3838
"""
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+
╚════════════════════════════╝
4747
"""
4848
```
4949

5050
```py
5151
from table2ascii import table2ascii
5252

5353
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,
5556
)
5657

5758
print(output)
@@ -68,6 +69,11 @@ print(output)
6869

6970
Soon table2ascii will support more options for customization.
7071

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+
7177
## 👨‍🎨 Use cases
7278

7379
### Discord messages and embeds

0 commit comments

Comments
 (0)