diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-05-11 18:01:31 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-05-11 18:01:31 +0100 |
| commit | 61e88321b9e5dc67a0373edc69f8114db8c1d3b7 (patch) | |
| tree | 3f43fd006b6c095f91c2424086b273928881336c /mammoth/documents.py | |
| parent | 7e57058cf120717cc2d2fea3b897b12c3891b28a (diff) | |
Rename existing concept of style names to style IDs to match docx
Diffstat (limited to 'mammoth/documents.py')
| -rw-r--r-- | mammoth/documents.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py index 65a9b84..b8da897 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -2,8 +2,8 @@ import dodge Document = dodge.data_class("Document", ["children"]) -Paragraph = dodge.data_class("Paragraph", ["children", "style_name", "numbering"]) -Run = dodge.data_class("Run", ["children", "style_name", "is_bold", "is_italic"]) +Paragraph = dodge.data_class("Paragraph", ["children", "style_id", "numbering"]) +Run = dodge.data_class("Run", ["children", "style_id", "is_bold", "is_italic"]) Text = dodge.data_class("Text", ["value"]) Hyperlink = dodge.data_class("Hyperlink", ["href", "children"]) @@ -20,11 +20,11 @@ class Image(object): document = Document -def paragraph(children, style_name=None, numbering=None): - return Paragraph(children, style_name, numbering) +def paragraph(children, style_id=None, numbering=None): + return Paragraph(children, style_id, numbering) -def run(children, style_name=None, is_bold=None, is_italic=None): - return Run(children, style_name, bool(is_bold), bool(is_italic)) +def run(children, style_id=None, is_bold=None, is_italic=None): + return Run(children, style_id, bool(is_bold), bool(is_italic)) text = Text |
