Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit 518bcba

Browse files
author
PokestarFan
committedOct 16, 2017
fixes
1 parent d5d4443 commit 518bcba

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
 

‎markdowntable/presets.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from markdowntable import Table as table
2+
3+
def twoxtwo(col1, col2, row1, row2):
4+
twoxtwotable = table(str(col1))
5+
twoxtwotable.add_column(str(col2))
6+
twoxtwotable.finalize_cols()
7+
twoxtwotable.add_row([str(row1), str(row2)])
8+
return twoxtwotable.get_table()
9+
10+
11+
def threexthree(col1,col2,col3,row1_1,row1_2,row1_3, row2_1,row2_2, row2_3):
12+
threexthreetable = table(str(col1))
13+
threexthreetable.add_column(str(col2))
14+
threexthreetable.add_column(str(col3))
15+
threexthreetable.finalize_cols()
16+
threexthreetable.add_row([str(row1_1),str(row1_2),str(row1_3)])
17+
threexthreetable.add_row([str(row2_1),str(row2_2),str(row2_3)])
18+
return threexthreetable.get_table()
19+
20+
21+
def 4x4(col1,col2,col3,col4,row1_1,row1_2,row1_3,row1_4,row2_1,row2_2, row2_3,row2_4,row3_1,row3_2,row3_3,row3_4):
22+
4x4table = table(str(col1))
23+
fourxfourtable.add_column(str(col2))
24+
fourxfourtable.add_column(str(col3))
25+
fourxfourtable.add_column(str(col4))
26+
fourxfourtable.finalize_cols()
27+
fourxfourtable.add_row([str(row1_1),str(row1_2),str(row1_3),str(row1_4)])
28+
fourxfourtable.add_row([str(row2_1),str(row2_2),str(row2_3),str(row2_4)])
29+
fourxfourtable.add_row([str(row3_1),str(row3_2),str(row3_3),str(row3_4)])
30+
return fourxfourtable.get_table()

0 commit comments

Comments
 (0)
This repository has been archived.