From 6c0c5a0aea77387ea4873bee27e8df88f867002b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 6 Jul 2014 17:29:23 +0100 Subject: Add conversion from document table to HTML table --- mammoth/documents.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mammoth/documents.py') diff --git a/mammoth/documents.py b/mammoth/documents.py index 703e436..7f2750c 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -6,6 +6,9 @@ Paragraph = dodge.data_class("Paragraph", ["children", "style_id", "style_name", Run = dodge.data_class("Run", ["children", "style_id", "style_name", "is_bold", "is_italic"]) Text = dodge.data_class("Text", ["value"]) Hyperlink = dodge.data_class("Hyperlink", ["href", "children"]) +Table = dodge.data_class("Table", ["children"]) +TableRow = dodge.data_class("TableRow", ["children"]) +TableCell = dodge.data_class("TableCell", ["children"]) class Tab(object): pass @@ -36,7 +39,9 @@ def tab(): image = Image hyperlink = Hyperlink - +table = Table +table_row = TableRow +table_cell = TableCell def numbering_level(level_index, is_ordered): return _NumberingLevel(str(level_index), bool(is_ordered)) -- cgit v1.2.3