lpod.meta

class lpod.meta.odf_meta(part_name, container)

Bases: lpod.xmlpart.odf_xmlpart

get_comments()

Get the description of the document. Also known as comments.

Return: unicode (or None if inexistant)

get_creation_date()

Get the creation date of the document.

Return: datetime (or None if inexistant)

get_creator()

Get the creator of the document.

Return: unicode (or None if inexistant)

Example:

>>> document.get_creator()
Unknown
get_description()

Get the description of the document. Also known as comments.

Return: unicode (or None if inexistant)

get_editing_cycles()

Get the number of times the document was edited, as reported by the generator.

Return: int (or None if inexistant)

get_editing_duration()

Get the time the document was edited, as reported by the generator.

Return: timedelta (or None if inexistant)

get_generator()

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_initial_creator()

Get the first creator of the document.

Return: unicode (or None if inexistant)

Example:

>>> document.get_initial_creator()
Unknown
get_keywords()

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_language()

Get the language code of the document.

Return: str (or None if inexistant)

Example:

>>> document.get_language()
fr-FR
get_meta_body()
get_modification_date()

Get the last modified date of the document.

Return: datetime (or None if inexistant)

get_statistic()

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_subject()

Get the subject of the document.

Return: unicode (or None if inexistant)

get_title()

Get the title of the document.

This is not the first heading but the title metadata.

Return: unicode (or None if inexistant)

get_user_defined_metadata()

Return a dict of unicode/value mapping.

Value types can be: Decimal, date, time, boolean or unicode.

set_comments(description)

Set the description of the document. Also known as comments.

Arguments:

description – unicode
set_creation_date(date)

Set the creation date of the document.

Arguments:

date – datetime
set_creator(creator)

Set the creator of the document.

Arguments:

creator – unicode

Example:

>>> document.set_creator(u"Plato")
set_description(description)

Set the description of the document. Also known as comments.

Arguments:

description – unicode
set_editing_cycles(cycles)

Set the number of times the document was edited.

Arguments:

cycles – int
set_editing_duration(duration)

Set the time the document was edited.

Arguments:

duration – timedelta
set_generator(generator)

Set the signature of the software that generated this document.

Arguments:

generator – unicode

Example:

>>> document.set_generator(u"lpOD Project")
set_initial_creator(creator)

Set the first creator of the document.

Arguments:

creator – unicode

Example:

>>> document.set_initial_creator(u"Plato")
set_keywords(keywords)

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_language(language)

Set the language code of the document.

Arguments:

language – str

Example:

>>> document.set_language('fr-FR')
set_modification_date(date)

Set the last modified date of the document.

Arguments:

date – datetime
set_statistic(statistic)

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_subject(subject)

Set the subject of the document.

Arguments:

subject – unicode
set_title(title)

Set the title of the document.

This is not the first heading but the title metadata.

Arguments:

title – unicode
set_user_defined_metadata(name, value)

Previous topic

lpod.manifest

Next topic

lpod.note

This Page