From 61e88321b9e5dc67a0373edc69f8114db8c1d3b7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 11 May 2014 18:01:31 +0100 Subject: Rename existing concept of style names to style IDs to match docx --- mammoth/documents.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mammoth/documents.py') 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 -- cgit v1.2.3