diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-12 21:37:50 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-12 21:37:50 +0000 |
| commit | e2a87dbda6d32200b5fa68ba2f5e48aa526499f2 (patch) | |
| tree | afd880e9d168c3d6585dc67dc470f7ef17be5a45 /mammoth/html_paths.py | |
| parent | 5e1685645c6b0ed81bc27f3cedfeb0608f79f495 (diff) | |
Add reading of single-element HTML paths
Diffstat (limited to 'mammoth/html_paths.py')
| -rw-r--r-- | mammoth/html_paths.py | 13 |
1 files changed, 13 insertions, 0 deletions
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"]) |
