diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-07-06 17:29:23 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-07-06 17:29:23 +0100 |
| commit | 6c0c5a0aea77387ea4873bee27e8df88f867002b (patch) | |
| tree | a960b20643ede28e7c38556c8fc8bd265398a704 /mammoth/documents.py | |
| parent | 9bfd191c00cf0d6f96eaf4e452cecadab711239e (diff) | |
Add conversion from document table to HTML table
Diffstat (limited to 'mammoth/documents.py')
| -rw-r--r-- | mammoth/documents.py | 7 |
1 files changed, 6 insertions, 1 deletions
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)) |
