aboutsummaryrefslogtreecommitdiff
path: root/mammoth/documents.py
blob: 215df8e93439c53d5b74560a999c207d3316f111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import collections

Document = collections.namedtuple("Document", ["children"])
Paragraph = collections.namedtuple("Paragraph", ["children", "style_name", "numbering"])
Run = collections.namedtuple("Run", ["children", "style_name"])
Text = collections.namedtuple("Text", ["value"])


document = Document

def paragraph(children, style_name=None, numbering=None):
    return Paragraph(children, style_name, numbering)

def run(children, style_name=None):
    return Run(children, style_name)

text = Text