Beispiel #1
0
def odf_new_document(path_or_file):
    """Return an "odf_document" instance using the given template or the
    template found at the given path.

    Examples::

        >>> document = odf_new_document(template)

        >>> path = 'models/invoice.ott'
        >>> document = odf_new_document(path)

    if "path" is one of 'text', 'spreadsheet', 'presentation', 'drawing' or
    'graphics', then the lpOD default template is used.

    Examples::

        >>> document = odf_new_document('text')

        >>> document = odf_new_document('spreadsheet')
    """
    container = odf_new_container(path_or_file)
    return odf_document(container)
Beispiel #2
0
def odf_new_document(path_or_file):
    """Return an "odf_document" instance using the given template or the
    template found at the given path.

    Examples::

        >>> document = odf_new_document(template)

        >>> path = 'models/invoice.ott'
        >>> document = odf_new_document(path)

    if "path" is one of 'text', 'spreadsheet', 'presentation', 'drawing' or
    'graphics', then the lpOD default template is used.

    Examples::

        >>> document = odf_new_document('text')

        >>> document = odf_new_document('spreadsheet')
    """
    container = odf_new_container(path_or_file)
    return odf_document(container)