aboutsummaryrefslogtreecommitdiff
path: root/mammoth/html_paths.py
blob: 0f2184d4bfdc24c459eb09aaeb3b77f198acaaab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import collections


def path(elements):
    return HtmlPath(elements)


def element(names, class_names=None):
    if class_names is None:
        class_names = []
    return HtmlPathElement(names, class_names)


HtmlPath = collections.namedtuple("HtmlPath", ["elements"])
HtmlPathElement = collections.namedtuple("HtmlPathElement", ["names", "class_names"])