From ac8a3c933a70c2d9aa179216f9ccfd2373c39c1b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 21 Jan 2015 17:44:59 +0000 Subject: Rename modules from footnotes to notes --- mammoth/docx/footnotes_xml.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 mammoth/docx/footnotes_xml.py (limited to 'mammoth/docx/footnotes_xml.py') diff --git a/mammoth/docx/footnotes_xml.py b/mammoth/docx/footnotes_xml.py deleted file mode 100644 index c477553..0000000 --- a/mammoth/docx/footnotes_xml.py +++ /dev/null @@ -1,29 +0,0 @@ -from .. import lists - - -def create_reader(note_type): - def read_notes_xml_element(element): - note_elements = lists.filter( - _is_note_element, - element.find_children("w:" + note_type), - ) - return lists.map(_read_note_element, note_elements) - - - def _is_note_element(element): - return element.attributes.get("w:type") not in ["continuationSeparator", "separator"] - - - def _read_note_element(element): - return NoteElement(note_type, element.attributes["w:id"], element.children) - - return read_notes_xml_element - -class NoteElement(object): - def __init__(self, note_type, id, body): - self.note_type = note_type - self.id = id - self.body = body - - -read_footnotes_xml_element = create_reader("footnote") -- cgit v1.2.3