Loading...
Searching...
No Matches
odf.opendocument Namespace Reference

## Classes

class | OpaqueObject
| just a record to bear a filename, a mediatype and a bytes content More...
class | OpenDocument

## Functions

| OpenDocumentChart ()
| Creates a chart document.
| OpenDocumentDrawing ()
| Creates a drawing document.
| OpenDocumentImage ()
| Creates an image document.
| OpenDocumentPresentation ()
| Creates a presentation document.
| OpenDocumentSpreadsheet ()
| Creates a spreadsheet document.
| OpenDocumentText ()
| Creates a text document.
| OpenDocumentTextMaster ()
| Creates a text master document.
| load (odffile)
| Load an ODF file into memory.

## Variables

| unicode = str
str | _XMLPROLOGUE
int | UNIXPERMS = 2175008768
| file permission as an integer value.
int | IS_FILENAME = 0
int | IS_IMAGE = 1
dict | odmimetypes
| mime-types => file extensions

## Function Documentation

## load()

odf.opendocument.load | ( |  | odffile | ) |

Load an ODF file into memory.

Parameters

  odffile | unicode string: name of a file, or as an alternative, an open readable stream

Returns
  a reference to the structure (an OpenDocument instance)

Definition at line 1008 of file opendocument.py.

## OpenDocumentChart()

odf.opendocument.OpenDocumentChart | ( |  | ) |

Creates a chart document.

Returns
  an OpenDocument instance with chart mimetype

Definition at line 827 of file opendocument.py.

Here is the call graph for this function:

## OpenDocumentDrawing()

odf.opendocument.OpenDocumentDrawing | ( |  | ) |

Creates a drawing document.

Returns
  an OpenDocument instance with drawing mimetype

Definition at line 837 of file opendocument.py.

Here is the call graph for this function:

## OpenDocumentImage()

odf.opendocument.OpenDocumentImage | ( |  | ) |

Creates an image document.

Returns
  an OpenDocument instance with image mimetype

Definition at line 847 of file opendocument.py.

Here is the call graph for this function:

## OpenDocumentPresentation()

odf.opendocument.OpenDocumentPresentation | ( |  | ) |

Creates a presentation document.

Returns
  an OpenDocument instance with presentation mimetype

Definition at line 857 of file opendocument.py.

Here is the call graph for this function:

## OpenDocumentSpreadsheet()

odf.opendocument.OpenDocumentSpreadsheet | ( |  | ) |

Creates a spreadsheet document.

Returns
  an OpenDocument instance with spreadsheet mimetype

Definition at line 867 of file opendocument.py.

Here is the call graph for this function:

## OpenDocumentText()

odf.opendocument.OpenDocumentText | ( |  | ) |

Creates a text document.

Returns
  an OpenDocument instance with text mimetype

Definition at line 877 of file opendocument.py.

Here is the call graph for this function:

## OpenDocumentTextMaster()

odf.opendocument.OpenDocumentTextMaster | ( |  | ) |

Creates a text master document.

Returns
  an OpenDocument instance with master mimetype

Definition at line 887 of file opendocument.py.

Here is the call graph for this function:

## Variable Documentation

## _XMLPROLOGUE

odf.opendocument._XMLPROLOGUE

protected

Definition at line 55 of file opendocument.py.

## IS_FILENAME

int odf.opendocument.IS_FILENAME = 0

Definition at line 67 of file opendocument.py.

## IS_IMAGE

int odf.opendocument.IS_IMAGE = 1

Definition at line 68 of file opendocument.py.

## odmimetypes

dict odf.opendocument.odmimetypes

Initial value:
= {
u'application/vnd.oasis.opendocument.text': u'.odt',
u'application/vnd.oasis.opendocument.text-template': u'.ott',
u'application/vnd.oasis.opendocument.graphics': u'.odg',
u'application/vnd.oasis.opendocument.graphics-template': u'.otg',
u'application/vnd.oasis.opendocument.presentation': u'.odp',
u'application/vnd.oasis.opendocument.presentation-template': u'.otp',
u'application/vnd.oasis.opendocument.spreadsheet': u'.ods',
u'application/vnd.oasis.opendocument.spreadsheet-template': u'.ots',
u'application/vnd.oasis.opendocument.chart': u'.odc',
u'application/vnd.oasis.opendocument.chart-template': u'.otc',
u'application/vnd.oasis.opendocument.image': u'.odi',
u'application/vnd.oasis.opendocument.image-template': u'.oti',
u'application/vnd.oasis.opendocument.formula': u'.odf',
u'application/vnd.oasis.opendocument.formula-template': u'.otf',
u'application/vnd.oasis.opendocument.text-master': u'.odm',
u'application/vnd.oasis.opendocument.text-web': u'.oth',
}

mime-types => file extensions

Definition at line 79 of file opendocument.py.

## unicode

odf.opendocument.unicode = str

Definition at line 48 of file opendocument.py.

## UNIXPERMS

int odf.opendocument.UNIXPERMS = 2175008768

file permission as an integer value.

The following syntax would be invalid for Python3: UNIXPERMS = 0100644 << 16L # -rw-r–r–

So it has been precomputed: 2175008768 is the same value as 0100644 << 16L == -rw-r–r–

Definition at line 65 of file opendocument.py.