Bases: lpod.xmlpart.odf_xmlpart
Get the description of the document. Also known as comments.
Return: unicode (or None if inexistant)
Get the creation date of the document.
Return: datetime (or None if inexistant)
Get the creator of the document.
Return: unicode (or None if inexistant)
Example:
>>> document.get_creator()
Unknown
Get the description of the document. Also known as comments.
Return: unicode (or None if inexistant)
Get the number of times the document was edited, as reported by the generator.
Return: int (or None if inexistant)
Get the time the document was edited, as reported by the generator.
Return: timedelta (or None if inexistant)
Get the signature of the software that generated this document.
Return: unicode (or None if inexistant)
Example:
>>> document.get_generator()
KOffice/2.0.0
Get the first creator of the document.
Return: unicode (or None if inexistant)
Example:
>>> document.get_initial_creator()
Unknown
Get the keywords of the document. Return the field as-is, without any assumption on the keyword separator.
Return: unicode (or None if inexistant)
Get the language code of the document.
Return: str (or None if inexistant)
Example:
>>> document.get_language()
fr-FR
Get the last modified date of the document.
Return: datetime (or None if inexistant)
Get the statistic from the software that generated this document.
Return: dict (or None if inexistant)
Example:
>>> document.get_statistic():
{'meta:table-count': 1,
'meta:image-count': 2,
'meta:object-count': 3,
'meta:page-count': 4,
'meta:paragraph-count': 5,
'meta:word-count': 6,
'meta:character-count': 7}
Get the subject of the document.
Return: unicode (or None if inexistant)
Get the title of the document.
This is not the first heading but the title metadata.
Return: unicode (or None if inexistant)
Return a dict of unicode/value mapping.
Value types can be: Decimal, date, time, boolean or unicode.
Set the description of the document. Also known as comments.
Arguments:
description – unicode
Set the creation date of the document.
Arguments:
date – datetime
Set the creator of the document.
Arguments:
creator – unicode
Example:
>>> document.set_creator(u"Plato")
Set the description of the document. Also known as comments.
Arguments:
description – unicode
Set the number of times the document was edited.
Arguments:
cycles – int
Set the time the document was edited.
Arguments:
duration – timedelta
Set the signature of the software that generated this document.
Arguments:
generator – unicode
Example:
>>> document.set_generator(u"lpOD Project")
Set the first creator of the document.
Arguments:
creator – unicode
Example:
>>> document.set_initial_creator(u"Plato")
Set the keywords of the document. Although the name is plural, a unicode string is required, so join your list first.
Arguments:
keywords – unicode
Set the language code of the document.
Arguments:
language – str
Example:
>>> document.set_language('fr-FR')
Set the last modified date of the document.
Arguments:
date – datetime
Set the statistic for the documents: number of words, paragraphs, etc.
Arguments:
statistic – dict
Example:
>>> statistic = {'meta:table-count': 1,
'meta:image-count': 2,
'meta:object-count': 3,
'meta:page-count': 4,
'meta:paragraph-count': 5,
'meta:word-count': 6,
'meta:character-count': 7}
>>> document.set_statistic(statistic)
Set the subject of the document.
Arguments:
subject – unicode
Set the title of the document.
This is not the first heading but the title metadata.
Arguments:
title – unicode