How to use the justext.core.PathInfo function in jusText

To help you get started, we’ve selected a few jusText examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github miso-belica / jusText / tests / test_classify_paragraphs.py View on Github external
def _paragraph(self, **kwargs):
        path = PathInfo().append("body").append("p")
        paragraph = Paragraph(path)

        for n, v in kwargs.items():
            if n == "text":
                paragraph.append_text(v)
            else:
                setattr(paragraph, n, v)

        return paragraph
github miso-belica / jusText / justext / core.py View on Github external
def __init__(self):
        self.path = PathInfo()
        self.paragraphs = []
        self.paragraph = None
        self.link = False
        self.br = False
        self._start_new_pragraph()