How to use the relatorio.templates.opendocument.get_zip_file function in relatorio

To help you get started, we’ve selected a few relatorio 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 tryton / trytond / trytond / ir / translation.py View on Github external
and node.parentNode.tagName in {
                            'text:placeholder',
                            'text:page-number',
                            'text:page-count',
                            }):
                    return
                if node.nodeValue:
                    txt = node.nodeValue.strip()
                    if txt:
                        yield txt

            for child in [x for x in node.childNodes]:
                for string in extract(child):
                    yield string

        zip_ = get_zip_file(BytesIO(content))
        for content_xml in [
                zip_.read('content.xml'),
                zip_.read('styles.xml'),
                ]:
            document = xml.dom.minidom.parseString(content_xml)
            for string in extract(document.documentElement):
                yield string

relatorio

A templating library able to output odt and pdf files

GPL-3.0
Latest version published 7 days ago

Package Health Score

64 / 100
Full package analysis

Similar packages