Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,21 @@ Use a preset style
+----------+----------+----------+----------+
"""

output = table2ascii(
header=["First", "Second", "Third", "Fourth"],
body=[["10", "30", "40", "35"], ["20", "10", "20", "5"]],
style=PresetStyle.plain,
cell_padding=0,
alignments=[Alignment.LEFT] * 4,
)

print(output)

"""
First Second Third Fourth
10 30 40 35
20 10 20 5
"""
output = table2ascii(
header=["First", "Second", "Third", "Fourth"],
body=[["10", "30", "40", "35"], ["20", "10", "20", "5"]],
style=PresetStyle.plain,
cell_padding=0,
alignments=[Alignment.LEFT] * 4,
)

print(output)

"""
First Second Third Fourth
10 30 40 35
20 10 20 5
"""

Define a custom style
~~~~~~~~~~~~~~~~~~~~~
Expand Down