aboutsummaryrefslogtreecommitdiff
path: root/mammoth/documents.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-01 21:21:14 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-01 21:21:14 +0000
commit9b479955a7c5b0547db8b274d2dfd6d0d6152194 (patch)
tree9e625825b2749853d9db63c42fbaa45772331eb4 /mammoth/documents.py
parent4d26fc0b174beccd0129220de74fe0b44c6c7edf (diff)
Read inline images
Diffstat (limited to 'mammoth/documents.py')
-rw-r--r--mammoth/documents.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py
index c8082d3..851755e 100644
--- a/mammoth/documents.py
+++ b/mammoth/documents.py
@@ -4,10 +4,19 @@ Document = collections.namedtuple("Document", ["children"])
Paragraph = collections.namedtuple("Paragraph", ["children", "style_name", "numbering"])
Run = collections.namedtuple("Run", ["children", "style_name", "is_bold", "is_italic"])
Text = collections.namedtuple("Text", ["value"])
+
+
class Tab(object):
pass
+class Image(object):
+ def __init__(self, alt_text, content_type, open):
+ self.alt_text = alt_text
+ self.content_type = content_type
+ self.open = open
+
+
document = Document
def paragraph(children, style_name=None, numbering=None):
@@ -17,6 +26,11 @@ def run(children, style_name=None, is_bold=None, is_italic=None):
return Run(children, style_name, bool(is_bold), bool(is_italic))
text = Text
+
_tab = Tab()
+
def tab():
return _tab
+
+
+image = Image