From e2a87dbda6d32200b5fa68ba2f5e48aa526499f2 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 12 Dec 2013 21:37:50 +0000 Subject: Add reading of single-element HTML paths --- mammoth/html_paths.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 mammoth/html_paths.py (limited to 'mammoth/html_paths.py') diff --git a/mammoth/html_paths.py b/mammoth/html_paths.py new file mode 100644 index 0000000..bc4eba1 --- /dev/null +++ b/mammoth/html_paths.py @@ -0,0 +1,13 @@ +import collections + + +def path(elements): + return HtmlPath(elements) + + +def element(name): + return HtmlPathElement(name) + + +HtmlPath = collections.namedtuple("HtmlPath", ["elements"]) +HtmlPathElement = collections.namedtuple("HtmlPathElement", ["name"]) -- cgit v1.2.3