Академический Документы
Профессиональный Документы
Культура Документы
API Documentation
June 4, 2009
Contents
Contents 1
1 Package odf 2
1.1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Module odf.anim 3
2.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Module odf.attrconverters 4
3.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3 Class AttrConverters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4 Module odf.chart 7
4.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 Module odf.config 9
5.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6 Module odf.dc 10
6.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7 Module odf.dr3d 11
7.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8 Module odf.draw 12
8.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
9 Module odf.easyliststyle 15
9.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1
CONTENTS CONTENTS
9.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10 Module odf.element 16
10.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
10.2 Class IllegalChild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
10.2.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
10.2.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
10.3 Class IllegalText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10.3.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10.4 Class Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10.4.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10.4.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10.4.3 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10.5 Class Childless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10.5.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.5.2 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.6 Class Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.6.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.6.2 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
10.7 Class CDATASection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
10.7.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10.7.2 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10.8 Class Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10.8.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
10.8.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
10.8.3 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
11 Module odf.elementtypes 24
11.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
12 Module odf.form 25
12.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
12.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
13 Module odf.grammar 27
13.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
14 Module odf.load 28
14.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
14.2 Class LoadParser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
14.2.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
14.2.2 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
15 Module odf.manifest 30
15.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
15.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
16 Module odf.math 31
16.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
16.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
17 Module odf.meta 32
2
CONTENTS CONTENTS
17.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
17.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
18 Module odf.namespaces 33
18.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
19 Module odf.number 35
19.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
19.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
20 Module odf.odf2moinmoin 37
20.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
20.2 Class TextProps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
20.2.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
20.3 Class ParagraphProps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
20.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
20.4 Class ListProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
20.4.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
20.5 Class ODF2MoinMoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
20.5.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
20.5.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
21 Module odf.odf2xhtml 41
21.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
21.2 Class StyleToCSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
21.2.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
21.3 Class TagStack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
21.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
21.4 Class ODF2XHTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
21.4.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
21.4.2 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
22 Module odf.odfmanifest 52
22.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
22.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
22.3 Class ODFManifestHandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
22.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
23 Module odf.office 54
23.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
23.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
24 Module odf.opendocument 56
24.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
24.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
24.3 Class OpaqueObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
24.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
24.4 Class OpenDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
24.4.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
24.4.2 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
25 Module odf.presentation 60
25.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3
CONTENTS CONTENTS
25.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
26 Module odf.script 62
26.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
26.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
27 Module odf.style 63
27.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
27.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
28 Module odf.svg 66
28.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
28.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
29 Module odf.table 67
29.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
29.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
30 Module odf.teletype 72
30.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
30.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
30.3 Class WhitespaceText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
30.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
30.3.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
31 Module odf.text 74
31.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
31.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
32 Module odf.thumbnail 84
32.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
32.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
33 Module odf.userfield 85
33.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
33.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
33.3 Class UserFields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
33.3.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
33.3.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
33.3.3 Class Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
33.4 Class ODFContentParser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
33.4.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
34 Module odf.xforms 89
34.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
34.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4
Variables Package odf
1 Package odf
1.1 Modules
• anim (Section 2, p. 3)
• attrconverters (Section 3, p. 4)
• chart (Section 4, p. 7)
• config (Section 5, p. 9)
• dc (Section 6, p. 10)
• dr3d (Section 7, p. 11)
• draw (Section 8, p. 12)
• easyliststyle (Section 9, p. 15)
• element (Section 10, p. 16)
• elementtypes (Section 11, p. 24)
• form (Section 12, p. 25)
• grammar: In principle the OpenDocument schema converted to python structures.
(Section 13, p. 27)
• load (Section 14, p. 28)
• manifest (Section 15, p. 30)
• math (Section 16, p. 31)
• meta (Section 17, p. 32)
• namespaces (Section 18, p. 33)
• number (Section 19, p. 35)
• odf2moinmoin (Section 20, p. 37)
• odf2xhtml (Section 21, p. 41)
• odfmanifest (Section 22, p. 52)
• office (Section 23, p. 54)
• opendocument: Use OpenDocument to generate your documents.
(Section 24, p. 56)
• presentation (Section 25, p. 60)
• script (Section 26, p. 62)
• style (Section 27, p. 63)
• svg (Section 28, p. 66)
• table (Section 29, p. 67)
• teletype: Class for handling whitespace properly in OpenDocument.
(Section 30, p. 72)
• text (Section 31, p. 74)
• thumbnail (Section 32, p. 84)
• userfield: Class to show and manipulate user fields in odf documents.
(Section 33, p. 85)
• xforms (Section 34, p. 89)
1.2 Variables
Name Description
package Value: None
5
Variables Module odf.anim
2 Module odf.anim
2.1 Functions
Animate(**args)
Animatecolor(**args)
Animatemotion(**args)
Animatetransform(**args)
Audio(**args)
Command(**args)
Iterate(**args)
Par(**args)
Param(**args)
Seq(**args)
Set(**args)
Transitionfilter(**args)
2.2 Variables
Name Description
package Value: ’odf’
6
Module odf.attrconverters
3 Module odf.attrconverters
3.1 Functions
make NCName(arg)
7
Variables Module odf.attrconverters
3.2 Variables
Name Description
pattern color Value: re.compile(r’#[0-9a-fA-F]{6}’)
pattern vector3D Value: re.compile(r’\(
*-?([0-9]+(\.[0-9]*)?|\.[0-9]+)( +-?([0-9...
pattern length Value:
re.compile(r’-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in...
pattern namespacedToken Value:
re.compile(r’[0-9a-zA-Z ]+:[0-9a-zA-Z\. -]+’)
pattern percent Value:
re.compile(r’-?([0-9]+(\.[0-9]*)?|\.[0-9]+)%’)
pattern points Value: re.compile(r’-?[0-9]+,-?[0-9]+(
+-?[0-9]+,-?[0-9]+)*’)
continued on next page
8
Class AttrConverters Module odf.attrconverters
Name Description
pattern viewbox Value: re.compile(r’-?[0-9]+( +-?[0-9]+){3}$’)
attrconverters Value: {((u’http://www.w3.org/1999/xlink’,
u’actuate’), None): <...
package Value: ’odf’
3.3.1 Methods
9
Module odf.chart
4 Module odf.chart
4.1 Functions
Axis(**args)
Categories(**args)
Chart(**args)
DataPoint(**args)
Domain(**args)
ErrorIndicator(**args)
Floor(**args)
Footer(**args)
Grid(**args)
Legend(**args)
MeanValue(**args)
PlotArea(**args)
RegressionCurve(**args)
Series(**args)
StockGainMarker(**args)
StockLossMarker(**args)
StockRangeLine(**args)
Subtitle(**args)
SymbolImage(**args)
10
Variables Module odf.chart
Title(**args)
Wall(**args)
4.2 Variables
Name Description
package Value: ’odf’
11
Variables Module odf.config
5 Module odf.config
5.1 Functions
ConfigItem(**args)
ConfigItemMapEntry(**args)
ConfigItemMapIndexed(**args)
ConfigItemMapNamed(**args)
ConfigItemSet(**args)
5.2 Variables
Name Description
package Value: ’odf’
12
Variables Module odf.dc
6 Module odf.dc
6.1 Functions
Creator(**args)
Date(**args)
Description(**args)
Language(**args)
Subject(**args)
Title(**args)
6.2 Variables
Name Description
package Value: ’odf’
13
Variables Module odf.dr3d
7 Module odf.dr3d
7.1 Functions
Cube(**args)
Extrude(**args)
Light(Element)
Rotate(**args)
Scene(**args)
Sphere(**args)
7.2 Variables
Name Description
package Value: ’odf’
14
Module odf.draw
8 Module odf.draw
8.1 Functions
DrawElement(name=None, **args)
A(**args)
Applet(**args)
AreaCircle(**args)
AreaPolygon(**args)
AreaRectangle(**args)
Caption(**args)
Circle(**args)
Connector(**args)
ContourPath(**args)
ContourPolygon(**args)
Control(**args)
CustomShape(**args)
Ellipse(**args)
EnhancedGeometry(**args)
Equation(**args)
FillImage(**args)
FloatingFrame(**args)
15
Functions Module odf.draw
Frame(**args)
G(**args)
GluePoint(**args)
Gradient(**args)
Handle(**args)
Hatch(**args)
Image(**args)
ImageMap(**args)
Layer(**args)
LayerSet(**args)
Line(**args)
Marker(**args)
Measure(**args)
Object(**args)
ObjectOle(**args)
Opacity(**args)
Page(**args)
PageThumbnail(**args)
Param(**args)
Path(**args)
Plugin(**args)
16
Variables Module odf.draw
Polygon(**args)
Polyline(**args)
Rect(**args)
RegularPolygon(**args)
StrokeDash(**args)
TextBox(**args)
8.2 Variables
Name Description
package Value: ’odf’
17
Variables Module odf.easyliststyle
9 Module odf.easyliststyle
9.1 Functions
9.2 Variables
Name Description
SHOW ALL LEVELS Value: True
SHOW ONE LEVEL Value: False
package Value: ’odf’
18
Class IllegalChild Module odf.element
10 Module odf.element
10.1 Variables
Name Description
package Value: ’odf’
object
exceptions.BaseException
exceptions.Exception
exceptions.StandardError
odf.element.IllegalChild
10.2.1 Methods
10.2.2 Properties
Name Description
Inherited from exceptions.BaseException
args, message
Inherited from object
class
19
Class Node Module odf.element
object
exceptions.BaseException
exceptions.Exception
exceptions.StandardError
odf.element.IllegalText
Complains if you add text or cdata to an element where it is not allowed
10.3.1 Methods
10.3.2 Properties
Name Description
Inherited from exceptions.BaseException
args, message
Inherited from object
class
xml.dom.Node
odf.element.Node
Known Subclasses: odf.element.Text, odf.element.Element
20
Class Childless Module odf.element
10.4.1 Methods
hasChildNodes(self )
Tells whether this element has any children; text nodes, subelements,
whatever.
appendChild(self, node)
removeChild(self, oldChild )
10.4.2 Properties
Name Description
firstChild First child node, or None.
lastChild Last child node, or None.
Name Description
parentNode Value: None
nextSibling Value: None
previousSibling Value: None
Inherited from xml.dom.Node
ATTRIBUTE NODE, CDATA SECTION NODE, COMMENT NODE,
DOCUMENT FRAGMENT NODE, DOCUMENT NODE,
DOCUMENT TYPE NODE, ELEMENT NODE, ENTITY NODE,
ENTITY REFERENCE NODE, NOTATION NODE,
PROCESSING INSTRUCTION NODE, TEXT NODE
21
Class Text Module odf.element
10.5.1 Methods
appendChild(self, node)
hasChildNodes(self )
removeChild(self, oldChild )
Name Description
attributes Value: None
childNodes Value: ()
firstChild Value: None
lastChild Value: None
odf.element.Childless
xml.dom.Node
odf.element.Node
odf.element.Text
Known Subclasses: odf.element.CDATASection
10.6.1 Methods
str (self )
22
Class CDATASection Module odf.element
toXml(self, level, f )
Write XML in UTF-8
Inherited from odf.element.Childless(Section 10.5)
appendChild(), hasChildNodes(), insertBefore(), removeChild(), replaceChild()
Name Description
nodeType Value: 3
tagName Value: ’Text’
Inherited from odf.element.Childless (Section 10.5)
attributes, childNodes, firstChild, lastChild
Inherited from odf.element.Node (Section 10.4)
nextSibling, parentNode, previousSibling
Inherited from xml.dom.Node
ATTRIBUTE NODE, CDATA SECTION NODE, COMMENT NODE,
DOCUMENT FRAGMENT NODE, DOCUMENT NODE,
DOCUMENT TYPE NODE, ELEMENT NODE, ENTITY NODE,
ENTITY REFERENCE NODE, NOTATION NODE,
PROCESSING INSTRUCTION NODE, TEXT NODE
odf.element.Childless
odf.element.Childless
xml.dom.Node
odf.element.Node
odf.element.Text
odf.element.CDATASection
23
Class Element Module odf.element
10.7.1 Methods
toXml(self, level, f )
Name Description
nodeType Value: 4
Inherited from odf.element.Childless (Section 10.5)
attributes, childNodes, firstChild, lastChild
Inherited from odf.element.Text (Section 10.6)
tagName
Inherited from odf.element.Node (Section 10.4)
nextSibling, parentNode, previousSibling
Inherited from xml.dom.Node
ATTRIBUTE NODE, CDATA SECTION NODE, COMMENT NODE,
DOCUMENT FRAGMENT NODE, DOCUMENT NODE,
DOCUMENT TYPE NODE, ELEMENT NODE, ENTITY NODE,
ENTITY REFERENCE NODE, NOTATION NODE,
PROCESSING INSTRUCTION NODE, TEXT NODE
xml.dom.Node
odf.element.Node
odf.element.Element
Creates a arbitrary element and is intended to be subclassed not used on its own. This ele-
ment is the base of every element it defines a class which resembles a xml-element. The main
advantage of this kind of implementation is that you don’t have to create a toXML method
24
Class Element Module odf.element
for every different object. Every element consists of an attribute, optional subelements,
optional text and optional cdata.
10.8.1 Methods
allowed attributes(self )
Element.addElement(Element)
25
Class Element Module odf.element
getAttribute(self, attr )
toXml(self, level, f )
Generate XML stream out of the tree structure
getElementsByType(self, element)
10.8.2 Properties
Name Description
Inherited from odf.element.Node (Section 10.4)
firstChild, lastChild
Name Description
nodeType Value: 1
namespaces Value: {}
Inherited from odf.element.Node (Section 10.4)
nextSibling, parentNode, previousSibling
Inherited from xml.dom.Node
ATTRIBUTE NODE, CDATA SECTION NODE, COMMENT NODE,
DOCUMENT FRAGMENT NODE, DOCUMENT NODE,
DOCUMENT TYPE NODE, ELEMENT NODE, ENTITY NODE,
ENTITY REFERENCE NODE, NOTATION NODE,
PROCESSING INSTRUCTION NODE, TEXT NODE
26
Variables Module odf.elementtypes
11 Module odf.elementtypes
11.1 Variables
Name Description
inline elements Value:
((u’urn:oasis:names:tc:opendocument:xmlns:text:1.0’,
u’a’...
block elements Value:
((u’urn:oasis:names:tc:opendocument:xmlns:text:1.0’,
u’h’...
declarative elements Value:
((u’urn:oasis:names:tc:opendocument:xmlns:office:1.0’,
u’...
empty elements Value:
((u’urn:oasis:names:tc:opendocument:xmlns:animation:1.0’,..
package Value: ’odf’
27
Module odf.form
12 Module odf.form
12.1 Functions
Button(**args)
Checkbox(**args)
Column(**args)
Combobox(**args)
ConnectionResource(**args)
Date(**args)
File(**args)
FixedText(**args)
Form(**args)
FormattedText(**args)
Frame(**args)
GenericControl(**args)
Grid(**args)
Hidden(**args)
Image(**args)
ImageFrame(**args)
Item(**args)
ListProperty(**args)
28
Variables Module odf.form
ListValue(**args)
Listbox(**args)
Number(**args)
Option(**args)
Password(**args)
Properties(**args)
Property(**args)
Radio(**args)
Text(**args)
Textarea(**args)
Time(**args)
ValueRange(**args)
12.2 Variables
Name Description
package Value: ’odf’
29
Variables Module odf.grammar
13 Module odf.grammar
13.1 Variables
Name Description
doc Value: """ In principle the OpenDocument
schema converted to pyt...
allowed children Value:
{(u’http://purl.org/dc/elements/1.1/’,
u’creator’): (), (...
allows text Value:
((u’urn:oasis:names:tc:opendocument:xmlns:config:1.0’,
u’...
required attributes Value:
{(u’urn:oasis:names:tc:opendocument:xmlns:animation:1.0’,..
allowed attributes Value:
{(u’http://purl.org/dc/elements/1.1/’,
u’creator’): (), (...
package Value: ’odf’
30
Class LoadParser Module odf.load
14 Module odf.load
14.1 Variables
Name Description
package Value: ’odf’
xml.sax.handler.ContentHandler
odf.load.LoadParser
Extract headings from content.xml of an ODT file
14.2.1 Methods
characters(self, data)
The Parser will call this method to report each chunk of character data. SAX
parsers may return all contiguous character data in a single chunk, or they
may split it into several chunks; however, all of the characters in any single
event must come from the same external entity so that the Locator provides
useful information.
Overrides: xml.sax.handler.ContentHandler.characters extit(inherited
documentation)
31
Class LoadParser Module odf.load
The name parameter contains the name of the element type as a (uri,
localname) tuple, the qname parameter the raw XML 1.0 name used in the
source document, and the attrs parameter holds an instance of the Attributes
class containing the attributes of the element.
The uri part of the name tuple is None for elements which have no namespace.
Overrides: xml.sax.handler.ContentHandler.startElementNS extit(inherited
documentation)
The name parameter contains the name of the element type, just as with the
startElementNS event.
Overrides: xml.sax.handler.ContentHandler.endElementNS extit(inherited
documentation)
Name Description
triggers Value:
((u’urn:oasis:names:tc:opendocument:xmlns:office:1.0’,
’a...
32
Variables Module odf.manifest
15 Module odf.manifest
15.1 Functions
Manifest(**args)
FileEntry(**args)
EncryptionData(**args)
Algorithm(**args)
KeyDerivation(**args)
15.2 Variables
Name Description
package Value: ’odf’
33
Variables Module odf.math
16 Module odf.math
16.1 Functions
Math(**args)
16.2 Variables
Name Description
package Value: ’odf’
34
Variables Module odf.meta
17 Module odf.meta
17.1 Functions
AutoReload(**args)
CreationDate(**args)
DateString(**args)
DocumentStatistic(**args)
EditingCycles(**args)
EditingDuration(**args)
Generator(**args)
HyperlinkBehaviour(**args)
InitialCreator(**args)
Keyword(**args)
PrintDate(**args)
PrintedBy(**args)
Template(**args)
UserDefined(**args)
17.2 Variables
Name Description
package Value: ’odf’
35
Module odf.namespaces
18 Module odf.namespaces
18.1 Variables
Name Description
TOOLSVERSION Value: u’ODFPY/0.9.1dev’
ANIMNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:animation:1.0’
DBNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:database:1.0’
CHARTNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:chart:1.0’
CONFIGNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:config:1.0’
DCNS Value:
u’http://purl.org/dc/elements/1.1/’
DOMNS Value:
u’http://www.w3.org/2001/xml-events’
DR3DNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0’
DRAWNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:drawing:1.0’
FONS Value:
u’urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible..
FORMNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:form:1.0’
KOFFICENS Value: u’http://www.koffice.org/2005/’
MANIFESTNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:manifest:1.0’
MATHNS Value:
u’http://www.w3.org/1998/Math/MathML’
METANS Value:
u’urn:oasis:names:tc:opendocument:xmlns:meta:1.0’
NUMBERNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0’
OFFICENS Value:
u’urn:oasis:names:tc:opendocument:xmlns:office:1.0’
OOONS Value:
u’http://openoffice.org/2004/office’
OOOWNS Value:
u’http://openoffice.org/2004/writer’
OOOCNS Value:
u’http://openoffice.org/2004/calc’
continued on next page
36
Variables Module odf.namespaces
Name Description
PRESENTATIONNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:presentation:1.0’
RDFANS Value:
u’http://docs.oasis-open.org/opendocument/meta/rdfa#’
SCRIPTNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:script:1.0’
SMILNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0
STYLENS Value:
u’urn:oasis:names:tc:opendocument:xmlns:style:1.0’
SVGNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0’
TABLENS Value:
u’urn:oasis:names:tc:opendocument:xmlns:table:1.0’
TEXTNS Value:
u’urn:oasis:names:tc:opendocument:xmlns:text:1.0’
XFORMSNS Value: u’http://www.w3.org/2002/xforms’
XLINKNS Value: u’http://www.w3.org/1999/xlink’
XMLNS Value:
u’http://www.w3.org/XML/1998/namespace’
nsdict Value:
{u’http://docs.oasis-open.org/opendocument/meta/rdfa#’:
u...
package Value: None
37
Module odf.number
19 Module odf.number
19.1 Functions
AmPm(**args)
Boolean(**args)
BooleanStyle(**args)
CurrencyStyle(**args)
CurrencySymbol(**args)
DateStyle(**args)
Day(**args)
DayOfWeek(**args)
EmbeddedText(**args)
Era(**args)
Fraction(**args)
Hours(**args)
Minutes(**args)
Month(**args)
Number(**args)
NumberStyle(**args)
PercentageStyle(**args)
Quarter(**args)
38
Variables Module odf.number
ScientificNumber(**args)
Seconds(**args)
Text(**args)
TextContent(**args)
TextStyle(**args)
TimeStyle(**args)
WeekOfYear(**args)
Year(**args)
19.2 Variables
Name Description
package Value: ’odf’
39
Class TextProps Module odf.odf2moinmoin
20 Module odf.odf2moinmoin
20.1 Variables
Name Description
IGNORED TAGS Value: [’draw:adraw:g’, ’draw:line’,
’draw:object-ole’, ’office:...
INLINE TAGS Value: [u’text:a’,
u’text:author-initials’,
u’text:author-name’,...
package Value: ’odf’
item Value:
(u’urn:oasis:names:tc:opendocument:xmlns:text:1.0’,
u’wor...
20.2.1 Methods
init (self )
setItalic(self, value)
setBold(self, value)
setFixed(self, value)
setUnderlined(self, value)
setStrikethrough(self, value)
setPosition(self, value)
str (self )
40
Class ParagraphProps Module odf.odf2moinmoin
20.3.1 Methods
init (self )
setIndented(self, value)
setHeading(self, level )
setTitle(self, value)
setCode(self, value)
str (self )
20.4.1 Methods
init (self )
setOrdered(self, value)
object
odf.odf2moinmoin.ODF2MoinMoin
41
Class ODF2MoinMoin Module odf.odf2moinmoin
20.5.1 Methods
processFontDeclarations(self, fontDecl )
Extracts necessary font information from a font-declaration element.
processStyles(self, styleElements)
Runs through ”style” elements extracting necessary information.
processListStyles(self, listStyleElements)
load(self, filepath)
Loads an ODT file.
compressCodeBlocks(self, text)
Removes extra blank lines from code blocks.
do nothing(self, node)
42
Class ODF2MoinMoin Module odf.odf2moinmoin
tableToString(self, tableElement)
MoinMoin uses || to delimit table cells
toString(self )
Converts the document to a string. FIXME: Result from second call differs
from first call
textToString(self, element)
20.5.2 Properties
Name Description
Inherited from object
class
43
Class StyleToCSS Module odf.odf2xhtml
21 Module odf.odf2xhtml
21.1 Variables
Name Description
special styles Value: {’P-Addressee’: ’address’,
’P-Heading 20 1’: ’h1’, ’P-Hea...
package Value: ’odf’
The purpose of the StyleToCSS class is to contain the rules to convert ODF styles to CSS2.
Since it needs the generic fonts, it would probably make sense to also contain the Styles in
a dict as well..
21.2.1 Methods
init (self )
44
Class StyleToCSS Module odf.odf2xhtml
The first value must be present and specifies the vertical text position as a
percentage that relates to the current font height or it takes one of the values
sub or super. Negative percentages or the sub value place the text below the
baseline. Positive percentages or the super value place the text above the
baseline. If sub or super is specified, the application can choose an appropriate
text position.
The second value is optional and specifies the font height as a percentage that
relates to the current font-height. If this value is not specified, an appropriate
font height is used. Although this value may change the font height that is
displayed, it never changes the current font height that is used for additional
calculations.
45
Class TagStack Module odf.odf2xhtml
21.3.1 Methods
init (self )
pop(self )
stackparent(self )
rfindattr(self, attr )
Find a tag with the given attribute
xml.sax.handler.ContentHandler
odf.odf2xhtml.ODF2XHTML
The ODF2XHTML parses an ODF file and produces XHTML
46
Class ODF2XHTML Module odf.odf2xhtml
21.4.1 Methods
writeout(self, s)
writedata(self )
characters(self, data)
The Parser will call this method to report each chunk of character data. SAX
parsers may return all contiguous character data in a single chunk, or they
may split it into several chunks; however, all of the characters in any single
event must come from the same external entity so that the Locator provides
useful information.
Overrides: xml.sax.handler.ContentHandler.characters extit(inherited
documentation)
47
Class ODF2XHTML Module odf.odf2xhtml
The name parameter contains the name of the element type as a (uri,
localname) tuple, the qname parameter the raw XML 1.0 name used in the
source document, and the attrs parameter holds an instance of the Attributes
class containing the attributes of the element.
The uri part of the name tuple is None for elements which have no namespace.
Overrides: xml.sax.handler.ContentHandler.startElementNS extit(inherited
documentation)
The name parameter contains the name of the element type, just as with the
startElementNS event.
Overrides: xml.sax.handler.ContentHandler.endElementNS extit(inherited
documentation)
classname(self, attrs)
Generate a class name from a style name
purgedata(self )
48
Class ODF2XHTML Module odf.odf2xhtml
rewritelink(self, imghref )
Intended to be overloaded if you don’t store your pictures in a Pictures
subfolder
49
Class ODF2XHTML Module odf.odf2xhtml
generate stylesheet(self )
generate footnotes(self )
50
Class ODF2XHTML Module odf.odf2xhtml
51
Class ODF2XHTML Module odf.odf2xhtml
52
Class ODF2XHTML Module odf.odf2xhtml
collectnote(self, s)
53
Class ODF2XHTML Module odf.odf2xhtml
load(self, odffile)
parseodf (self )
odf2xhtml(self, odffile)
Load a file and return XHTML
xhtml(self )
css(self )
Name Description
familymap Value: {’frame’: ’frame’, ’graphic’:
’graphic’, ’paragraph’: ’p’...
familyshort Value: {’drawing-page’: ’DP’,
’graphic’: ’G’, ’paragraph’: ’P’, ...
54
Class ODFManifestHandler Module odf.odfmanifest
22 Module odf.odfmanifest
22.1 Functions
manifestlist(manifestxml )
odfmanifest(odtfile)
22.2 Variables
Name Description
MANIFESTNS Value:
’urn:oasis:names:tc:opendocument:xmlns:manifest:1.0’
package Value: ’odf’
xml.sax.handler.ContentHandler
odf.odfmanifest.ODFManifestHandler
The ODFManifestHandler parses a manifest file and produces a list of content
22.3.1 Methods
init (self )
Overrides: xml.sax.handler.ContentHandler. init
55
Class ODFManifestHandler Module odf.odfmanifest
The name parameter contains the name of the element type as a (uri,
localname) tuple, the qname parameter the raw XML 1.0 name used in the
source document, and the attrs parameter holds an instance of the Attributes
class containing the attributes of the element.
The uri part of the name tuple is None for elements which have no namespace.
Overrides: xml.sax.handler.ContentHandler.startElementNS extit(inherited
documentation)
The name parameter contains the name of the element type, just as with the
startElementNS event.
Overrides: xml.sax.handler.ContentHandler.endElementNS extit(inherited
documentation)
56
Module odf.office
23 Module odf.office
23.1 Functions
Annotation(**args)
AutomaticStyles(**args)
BinaryData(**args)
Body(**args)
ChangeInfo(**args)
Chart(**args)
DdeSource(**args)
Document(version=’1.1’, **args)
DocumentContent(version=’1.1’, **args)
DocumentMeta(version=’1.1’, **args)
DocumentSettings(version=’1.1’, **args)
DocumentStyles(version=’1.1’, **args)
Drawing(**args)
EventListeners(**args)
FontFaceDecls(**args)
Forms(**args)
Image(**args)
MasterStyles(**args)
57
Variables Module odf.office
Meta(**args)
Presentation(**args)
Script(**args)
Scripts(**args)
Settings(**args)
Spreadsheet(**args)
Styles(**args)
Text(**args)
23.2 Variables
Name Description
package Value: ’odf’
58
Variables Module odf.opendocument
24 Module odf.opendocument
24.1 Functions
OpenDocumentChart()
OpenDocumentDrawing()
OpenDocumentImage()
OpenDocumentPresentation()
OpenDocumentSpreadsheet()
OpenDocumentText()
load(odffile)
24.2 Variables
Name Description
doc Value: """Use OpenDocument to generate
your documents."""
UNIXPERMS Value: 2175008768
IS FILENAME Value: 0
IS IMAGE Value: 1
odmimetypes Value:
{’application/vnd.oasis.opendocument.chart’:
’.odc’, ’app...
package Value: ’odf’
59
Class OpaqueObject Module odf.opendocument
24.3.1 Methods
A class to hold the content of an OpenDocument document Use the xml method to write
the XML source to the screen or to a file d = OpenDocument(mimetype) fd.write(d.xml())
24.4.1 Methods
clear caches(self )
toXml(self, filename=’’)
xml(self )
Generates the full document as an XML file Always written as a bytestream in
UTF-8 encoding
contentxml(self )
Generates the content.xml file Always written as a bytestream in UTF-8
encoding
manifestxml(self )
Generates the manifest.xml file
metaxml(self )
Generates the meta.xml file
60
Class OpenDocument Module odf.opendocument
settingsxml(self )
Generates the settings.xml file
stylesxml(self )
Generates the styles.xml file
addThumbnail(self, filecontent=None)
Add a fixed thumbnail The thumbnail in the library is big, so this is pretty
useless.
write(self, outputfp)
createElement(self, element)
Inconvenient interface to create an element, but follows XML-DOM. Does not
allow attributes as argument, therefore can’t check grammar.
61
Class OpenDocument Module odf.opendocument
createTextNode(self, data)
Method to create a text node
createCDATASection(self, data)
getMediaType(self )
Returns the media type
getStyleByName(self, name)
getElementsByType(self, element)
Name Description
thumbnail Value: None
62
Module odf.presentation
25 Module odf.presentation
25.1 Functions
AnimationGroup(**args)
Animations(**args)
DateTime(**args)
DateTimeDecl(**args)
Dim(**args)
EventListener(**args)
Footer(**args)
FooterDecl(**args)
Header(**args)
HeaderDecl(**args)
HideShape(**args)
HideText(**args)
Notes(**args)
Placeholder(**args)
Play(**args)
Settings(**args)
Show(**args)
ShowShape(**args)
63
Variables Module odf.presentation
ShowText(**args)
Sound(**args)
25.2 Variables
Name Description
package Value: ’odf’
64
Variables Module odf.script
26 Module odf.script
26.1 Functions
EventListener(**args)
26.2 Variables
Name Description
package Value: ’odf’
65
Module odf.style
27 Module odf.style
27.1 Functions
StyleElement(**args)
BackgroundImage(**args)
ChartProperties(**args)
Column(**args)
ColumnSep(**args)
Columns(**args)
DefaultStyle(**args)
DrawingPageProperties(**args)
DropCap(**args)
FontFace(**args)
Footer(**args)
FooterLeft(**args)
FooterStyle(**args)
FootnoteSep(**args)
GraphicProperties(**args)
HandoutMaster(**args)
Header(**args)
HeaderFooterProperties(**args)
66
Functions Module odf.style
HeaderLeft(**args)
HeaderStyle(**args)
ListLevelProperties(**args)
Map(**args)
MasterPage(**args)
PageLayout(**args)
PageLayoutProperties(**args)
ParagraphProperties(**args)
PresentationPageLayout(**args)
RegionCenter(**args)
RegionLeft(**args)
RegionRight(**args)
RubyProperties(**args)
SectionProperties(**args)
Style(**args)
TabStop(**args)
TabStops(**args)
TableCellProperties(**args)
TableColumnProperties(**args)
TableProperties(**args)
67
Variables Module odf.style
TableRowProperties(**args)
TextProperties(**args)
27.2 Variables
Name Description
package Value: ’odf’
68
Variables Module odf.svg
28 Module odf.svg
28.1 Functions
DefinitionSrc(**args)
Desc(**args)
FontFaceFormat(**args)
FontFaceName(**args)
FontFaceSrc(**args)
FontFaceUri(**args)
Lineargradient(**args)
Radialgradient(**args)
Stop(**args)
28.2 Variables
Name Description
package Value: ’odf’
69
Module odf.table
29 Module odf.table
29.1 Functions
Body(**args)
CalculationSettings(**args)
CellAddress(**args)
CellContentChange(**args)
CellContentDeletion(**args)
CellRangeSource(**args)
ChangeDeletion(**args)
ChangeTrackTableCell(**args)
Consolidation(**args)
ContentValidation(**args)
ContentValidations(**args)
CoveredTableCell(**args)
CutOffs(**args)
DataPilotDisplayInfo(**args)
DataPilotField(**args)
DataPilotFieldReference(**args)
DataPilotGroup(**args)
DataPilotGroupMember(**args)
70
Functions Module odf.table
DataPilotGroups(**args)
DataPilotLayoutInfo(**args)
DataPilotLevel(**args)
DataPilotMember(**args)
DataPilotMembers(**args)
DataPilotSortInfo(**args)
DataPilotSubtotal(**args)
DataPilotSubtotals(**args)
DataPilotTable(**args)
DataPilotTables(**args)
DatabaseRange(**args)
DatabaseRanges(**args)
DatabaseSourceQuery(**args)
DatabaseSourceSql(**args)
DatabaseSourceTable(**args)
DdeLink(**args)
DdeLinks(**args)
Deletion(**args)
Deletions(**args)
Dependencies(**args)
71
Functions Module odf.table
Dependency(**args)
Detective(**args)
ErrorMacro(**args)
ErrorMessage(**args)
EvenColumns(**args)
EvenRows(**args)
Filter(**args)
FilterAnd(**args)
FilterCondition(**args)
FilterOr(**args)
FirstColumn(**args)
FirstRow(**args)
HelpMessage(**args)
HighlightedRange(**args)
Insertion(**args)
InsertionCutOff (**args)
Iteration(**args)
LabelRange(**args)
LabelRanges(**args)
LastColumn(**args)
72
Functions Module odf.table
LastRow(**args)
Movement(**args)
MovementCutOff (**args)
NamedExpression(**args)
NamedExpressions(**args)
NamedRange(**args)
NullDate(**args)
OddColumns(**args)
OddRows(**args)
Operation(**args)
Previous(**args)
Scenario(**args)
Shapes(**args)
Sort(**args)
SortBy(**args)
SortGroups(**args)
SourceCellRange(**args)
SourceRangeAddress(**args)
SourceService(**args)
SubtotalField(**args)
73
Variables Module odf.table
SubtotalRule(**args)
SubtotalRules(**args)
Table(**args)
TableCell(**args)
TableColumn(**args)
TableColumnGroup(**args)
TableColumns(**args)
TableHeaderColumns(**args)
TableHeaderRows(**args)
TableRow(**args)
TableRowGroup(**args)
TableRows(**args)
TableSource(**args)
TableTemplate(**args)
TargetRangeAddress(**args)
TrackedChanges(**args)
29.2 Variables
Name Description
package Value: ’odf’
74
Class WhitespaceText Module odf.teletype
30 Module odf.teletype
30.1 Functions
addTextToElement(odfElement, s)
extractText(odfElement)
Extract text content from an Element, with whitespace represented properly.
Returns the text, with tabs, spaces, and newlines correctly evaluated. This
method recursively descends through the children of the given element,
accumulating text and ”unwrapping” <text:s>, <text:tab>, and
<text:line-break> elements along the way.
30.2 Variables
Name Description
package Value: ’odf’
object
odf.teletype.WhitespaceText
30.3.1 Methods
init (self )
75
Class WhitespaceText Module odf.teletype
addTextToElement(self, odfElement, s)
30.3.2 Properties
Name Description
Inherited from object
class
76
Module odf.text
31 Module odf.text
31.1 Functions
A(**args)
AlphabeticalIndex(**args)
AlphabeticalIndexAutoMarkFile(**args)
AlphabeticalIndexEntryTemplate(**args)
AlphabeticalIndexMark(**args)
AlphabeticalIndexMarkEnd(**args)
AlphabeticalIndexMarkStart(**args)
AlphabeticalIndexSource(**args)
AuthorInitials(**args)
AuthorName(**args)
Bibliography(**args)
BibliographyConfiguration(**args)
BibliographyEntryTemplate(**args)
BibliographyMark(**args)
BibliographySource(**args)
Bookmark(**args)
BookmarkEnd(**args)
BookmarkRef (**args)
77
Functions Module odf.text
BookmarkStart(**args)
Change(**args)
ChangeEnd(**args)
ChangeStart(**args)
ChangedRegion(**args)
Chapter(**args)
CharacterCount(**args)
ConditionalText(**args)
CreationDate(**args)
CreationTime(**args)
Creator(**args)
DatabaseDisplay(**args)
DatabaseName(**args)
DatabaseNext(**args)
DatabaseRowNumber(**args)
DatabaseRowSelect(**args)
Date(**args)
DdeConnection(**args)
DdeConnectionDecl(**args)
DdeConnectionDecls(**args)
78
Functions Module odf.text
Deletion(**args)
Description(**args)
EditingCycles(**args)
EditingDuration(**args)
ExecuteMacro(**args)
Expression(**args)
FileName(**args)
FormatChange(**args)
H(**args)
HiddenParagraph(**args)
HiddenText(**args)
IllustrationIndex(**args)
IllustrationIndexEntryTemplate(**args)
IllustrationIndexSource(**args)
ImageCount(**args)
IndexBody(**args)
IndexEntryBibliography(**args)
IndexEntryChapter(**args)
IndexEntryLinkEnd(**args)
IndexEntryLinkStart(**args)
79
Functions Module odf.text
IndexEntryPageNumber(**args)
IndexEntrySpan(**args)
IndexEntryTabStop(**args)
IndexEntryText(**args)
IndexSourceStyle(**args)
IndexSourceStyles(**args)
IndexTitle(**args)
IndexTitleTemplate(**args)
InitialCreator(**args)
Insertion(**args)
Keywords(**args)
LineBreak(**args)
LinenumberingConfiguration(**args)
LinenumberingSeparator(**args)
List(**args)
ListHeader(**args)
ListItem(**args)
ListLevelStyleBullet(**args)
ListLevelStyleImage(**args)
ListLevelStyleNumber(**args)
80
Functions Module odf.text
ListStyle(**args)
Measure(**args)
ModificationDate(**args)
ModificationTime(**args)
Note(**args)
NoteBody(**args)
NoteCitation(**args)
NoteContinuationNoticeBackward(**args)
NoteContinuationNoticeForward(**args)
NoteRef (**args)
NotesConfiguration(**args)
Number(**args)
NumberedParagraph(**args)
ObjectCount(**args)
ObjectIndex(**args)
ObjectIndexEntryTemplate(**args)
ObjectIndexSource(**args)
OutlineLevelStyle(**args)
OutlineStyle(**args)
P(**args)
81
Functions Module odf.text
Page(**args)
PageContinuation(**args)
PageCount(**args)
PageNumber(**args)
PageSequence(**args)
PageVariableGet(**args)
PageVariableSet(**args)
ParagraphCount(**args)
Placeholder(**args)
PrintDate(**args)
PrintTime(**args)
PrintedBy(**args)
ReferenceMark(**args)
ReferenceMarkEnd(**args)
ReferenceMarkStart(**args)
ReferenceRef (**args)
Ruby(**args)
RubyBase(**args)
RubyText(**args)
S(**args)
82
Functions Module odf.text
Script(**args)
Section(**args)
SectionSource(**args)
SenderCity(**args)
SenderCompany(**args)
SenderCountry(**args)
SenderEmail(**args)
SenderFax(**args)
SenderFirstname(**args)
SenderInitials(**args)
SenderLastname(**args)
SenderPhonePrivate(**args)
SenderPhoneWork(**args)
SenderPosition(**args)
SenderPostalCode(**args)
SenderStateOrProvince(**args)
SenderStreet(**args)
SenderTitle(**args)
Sequence(**args)
SequenceDecl(**args)
83
Functions Module odf.text
SequenceDecls(**args)
SequenceRef (**args)
SheetName(**args)
SortKey(**args)
Span(**args)
Subject(**args)
Tab(**args)
TableCount(**args)
TableFormula(**args)
TableIndex(**args)
TableIndexEntryTemplate(**args)
TableIndexSource(**args)
TableOfContent(**args)
TableOfContentEntryTemplate(**args)
TableOfContentSource(**args)
TemplateName(**args)
TextInput(**args)
Time(**args)
Title(**args)
TocMark(**args)
84
Functions Module odf.text
TocMarkEnd(**args)
TocMarkStart(**args)
TrackedChanges(**args)
UserDefined(**args)
UserFieldDecl(**args)
UserFieldDecls(**args)
UserFieldGet(**args)
UserFieldInput(**args)
UserIndex(**args)
UserIndexEntryTemplate(**args)
UserIndexMark(**args)
UserIndexMarkEnd(**args)
UserIndexMarkStart(**args)
UserIndexSource(**args)
VariableDecl(**args)
VariableDecls(**args)
VariableGet(**args)
VariableInput(**args)
VariableSet(**args)
WordCount(**args)
85
Variables Module odf.text
31.2 Variables
Name Description
package Value: ’odf’
86
Variables Module odf.thumbnail
32 Module odf.thumbnail
32.1 Functions
thumbnail()
32.2 Variables
Name Description
iconstr Value:
’iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAAG0OVFdAAAABGdBTUEA..
package Value: ’odf’
87
Class UserFields Module odf.userfield
33 Module odf.userfield
33.1 Functions
writeattr(stream, text)
33.2 Variables
Name Description
OUTENCODING Value: ’utf-8’
VALUE TYPES Value: {’boolean’:
(u’urn:oasis:names:tc:opendocument:xmlns:offi...
ATTR ENTITIES Value: {’\n’: ’
’}
package Value: ’odf’
object
odf.userfield.UserFields
List, view and manipulate user fields.
33.3.1 Methods
src ... source document name, file like object or None for stdin dest ...
destination document name, file like object or None for stdout
Overrides: object. init
88
Class UserFields Module odf.userfield
list fields(self )
List (extract) all known user-fields.
field names ... list of field names to show or None for all.
update(self, data)
Set the value of user fields. The field types will be the same.
data ... dict, with field name as key, field value as value
Returns None
Inherited from object
delattr (), format (), getattribute (), hash (), new (), reduce (), reduce ex (),
repr (), setattr (), sizeof (), str (), subclasshook ()
33.3.2 Properties
89
Class ODFContentParser Module odf.userfield
Name Description
Inherited from object
class
Name Description
src file Value: None
dest file Value: None
xml.sax.handler.ContentHandler
xml.sax.saxutils.XMLGenerator
odf.userfield.ODFContentParser
33.4.1 Methods
Constructor.
callback func ... function called for each field found in odf document
signature: field name ... name of current field
value type ... type of current field
value ... value of current field
attrs ... tuple of attrs of current field
returns: tuple or dict of attrs
out ... file like object for output
encoding ... encoding for output
Overrides: xml.sax.handler.ContentHandler. init
90
Class ODFContentParser Module odf.userfield
The name parameter contains the name of the element type as a (uri,
localname) tuple, the qname parameter the raw XML 1.0 name used in the
source document, and the attrs parameter holds an instance of the Attributes
class containing the attributes of the element.
The uri part of the name tuple is None for elements which have no namespace.
Overrides: xml.sax.handler.ContentHandler.startElementNS extit(inherited
documentation)
content(self )
91
Variables Module odf.xforms
34 Module odf.xforms
34.1 Functions
Model(**args)
Instance(**args)
Bind(**args)
34.2 Variables
Name Description
package Value: ’odf’
92
Index
odf (package), 2 odf.attrconverters.cnv integer (function),
odf.anim (module), 3 4
odf.anim.Animate (function), 3 odf.attrconverters.cnv legend position (func-
odf.anim.Animatecolor (function), 3 tion), 4
odf.anim.Animatemotion (function), 3 odf.attrconverters.cnv length (function),
odf.anim.Animatetransform (function), 4
3 odf.attrconverters.cnv lengthorpercent (func-
odf.anim.Audio (function), 3 tion), 4
odf.anim.Command (function), 3 odf.attrconverters.cnv major minor (func-
odf.anim.Iterate (function), 3 tion), 4
odf.anim.Par (function), 3 odf.attrconverters.cnv metavaluetype (func-
odf.anim.Param (function), 3 tion), 4
odf.anim.Seq (function), 3 odf.attrconverters.cnv namespacedToken
odf.anim.Set (function), 3 (function), 4
odf.anim.Transitionfilter (function), 3 odf.attrconverters.cnv NCName (func-
odf.attrconverters (module), 4–6 tion), 5
odf.attrconverters.AttrConverters (class), odf.attrconverters.cnv NCNames (func-
6 tion), 5
odf.attrconverters.cnv anyURI (function), odf.attrconverters.cnv nonNegativeInteger
4 (function), 5
odf.attrconverters.cnv boolean (function), odf.attrconverters.cnv percent (function),
4 5
odf.attrconverters.cnv color (function), odf.attrconverters.cnv points (function),
4 5
odf.attrconverters.cnv configtype (func- odf.attrconverters.cnv positiveInteger (func-
tion), 4 tion), 5
odf.attrconverters.cnv data source has labels odf.attrconverters.cnv string (function),
(function), 4 5
odf.attrconverters.cnv date (function), 4 odf.attrconverters.cnv StyleNameRef (func-
odf.attrconverters.cnv dateTime (func- tion), 5
tion), 4 odf.attrconverters.cnv textnoteclass (func-
odf.attrconverters.cnv double (function), tion), 5
4 odf.attrconverters.cnv time (function),
odf.attrconverters.cnv DrawNameRef (func- 5
tion), 5 odf.attrconverters.cnv token (function),
odf.attrconverters.cnv duration (function), 5
4 odf.attrconverters.cnv viewbox (function),
odf.attrconverters.cnv family (function), 5
4 odf.attrconverters.cnv xlinkshow (func-
odf.attrconverters.cnv ID (function), 4 tion), 5
odf.attrconverters.cnv IDREF (function), odf.attrconverters.make NCName (func-
4 tion), 4
93
INDEX INDEX
94
INDEX INDEX
95
INDEX INDEX
96
INDEX INDEX
60 odf.style.HeaderStyle (function), 64
odf.presentation.Footer (function), 60 odf.style.ListLevelProperties (function),
odf.presentation.FooterDecl (function), 64
60 odf.style.Map (function), 64
odf.presentation.Header (function), 60 odf.style.MasterPage (function), 64
odf.presentation.HeaderDecl (function), odf.style.PageLayout (function), 64
60 odf.style.PageLayoutProperties (function),
odf.presentation.HideShape (function), 64
60 odf.style.ParagraphProperties (function),
odf.presentation.HideText (function), 60 64
odf.presentation.Notes (function), 60 odf.style.PresentationPageLayout (func-
odf.presentation.Placeholder (function), tion), 64
60 odf.style.RegionCenter (function), 64
odf.presentation.Play (function), 60 odf.style.RegionLeft (function), 64
odf.presentation.Settings (function), 60 odf.style.RegionRight (function), 64
odf.presentation.Show (function), 60 odf.style.RubyProperties (function), 64
odf.presentation.ShowShape (function), odf.style.SectionProperties (function), 64
60 odf.style.Style (function), 64
odf.presentation.ShowText (function), 60 odf.style.StyleElement (function), 63
odf.presentation.Sound (function), 61 odf.style.TableCellProperties (function),
odf.script (module), 62 64
odf.script.EventListener (function), 62 odf.style.TableColumnProperties (func-
odf.style (module), 63–65 tion), 64
odf.style.BackgroundImage (function), 63 odf.style.TableProperties (function), 64
odf.style.ChartProperties (function), 63 odf.style.TableRowProperties (function),
odf.style.Column (function), 63 64
odf.style.Columns (function), 63 odf.style.TabStop (function), 64
odf.style.ColumnSep (function), 63 odf.style.TabStops (function), 64
odf.style.DefaultStyle (function), 63 odf.style.TextProperties (function), 65
odf.style.DrawingPageProperties (func- odf.svg (module), 66
tion), 63 odf.svg.DefinitionSrc (function), 66
odf.style.DropCap (function), 63 odf.svg.Desc (function), 66
odf.style.FontFace (function), 63 odf.svg.FontFaceFormat (function), 66
odf.style.Footer (function), 63 odf.svg.FontFaceName (function), 66
odf.style.FooterLeft (function), 63 odf.svg.FontFaceSrc (function), 66
odf.style.FooterStyle (function), 63 odf.svg.FontFaceUri (function), 66
odf.style.FootnoteSep (function), 63 odf.svg.Lineargradient (function), 66
odf.style.GraphicProperties (function), odf.svg.Radialgradient (function), 66
63 odf.svg.Stop (function), 66
odf.style.HandoutMaster (function), 63 odf.table (module), 67–71
odf.style.Header (function), 63 odf.table.Body (function), 67
odf.style.HeaderFooterProperties (func- odf.table.CalculationSettings (function),
tion), 63 67
odf.style.HeaderLeft (function), 63 odf.table.CellAddress (function), 67
97
INDEX INDEX
odf.table.CellContentChange (function), 68
67 odf.table.DataPilotTable (function), 68
odf.table.CellContentDeletion (function), odf.table.DataPilotTables (function), 68
67 odf.table.DdeLink (function), 68
odf.table.CellRangeSource (function), 67 odf.table.DdeLinks (function), 68
odf.table.ChangeDeletion (function), 67 odf.table.Deletion (function), 68
odf.table.ChangeTrackTableCell (func- odf.table.Deletions (function), 68
tion), 67 odf.table.Dependencies (function), 68
odf.table.Consolidation (function), 67 odf.table.Dependency (function), 68
odf.table.ContentValidation (function), odf.table.Detective (function), 69
67 odf.table.ErrorMacro (function), 69
odf.table.ContentValidations (function), odf.table.ErrorMessage (function), 69
67 odf.table.EvenColumns (function), 69
odf.table.CoveredTableCell (function), 67 odf.table.EvenRows (function), 69
odf.table.CutOffs (function), 67 odf.table.Filter (function), 69
odf.table.DatabaseRange (function), 68 odf.table.FilterAnd (function), 69
odf.table.DatabaseRanges (function), 68 odf.table.FilterCondition (function), 69
odf.table.DatabaseSourceQuery (function), odf.table.FilterOr (function), 69
68 odf.table.FirstColumn (function), 69
odf.table.DatabaseSourceSql (function), odf.table.FirstRow (function), 69
68 odf.table.HelpMessage (function), 69
odf.table.DatabaseSourceTable (function), odf.table.HighlightedRange (function),
68 69
odf.table.DataPilotDisplayInfo (function), odf.table.Insertion (function), 69
67 odf.table.InsertionCutOff (function), 69
odf.table.DataPilotField (function), 67 odf.table.Iteration (function), 69
odf.table.DataPilotFieldReference (func- odf.table.LabelRange (function), 69
tion), 67 odf.table.LabelRanges (function), 69
odf.table.DataPilotGroup (function), 67 odf.table.LastColumn (function), 69
odf.table.DataPilotGroupMember (func- odf.table.LastRow (function), 69
tion), 67 odf.table.Movement (function), 70
odf.table.DataPilotGroups (function), 67 odf.table.MovementCutOff (function), 70
odf.table.DataPilotLayoutInfo (function), odf.table.NamedExpression (function),
68 70
odf.table.DataPilotLevel (function), 68 odf.table.NamedExpressions (function),
odf.table.DataPilotMember (function), 70
68 odf.table.NamedRange (function), 70
odf.table.DataPilotMembers (function), odf.table.NullDate (function), 70
68 odf.table.OddColumns (function), 70
odf.table.DataPilotSortInfo (function), odf.table.OddRows (function), 70
68 odf.table.Operation (function), 70
odf.table.DataPilotSubtotal (function), odf.table.Previous (function), 70
68 odf.table.Scenario (function), 70
odf.table.DataPilotSubtotals (function), odf.table.Shapes (function), 70
98
INDEX INDEX
99
INDEX INDEX
100
INDEX INDEX
101
INDEX INDEX
102