ODFPY 1.2.0
 
Loading...
Searching...
No Matches
odf.odf2moinmoin.ODF2MoinMoin Class Reference
Collaboration diagram for odf.odf2moinmoin.ODF2MoinMoin:

Public Member Functions

 __init__ (self, filepath)
 
 processFontDeclarations (self, fontDecl)
 Extracts necessary font information from a font-declaration element.
 
 extractTextProperties (self, style, parent=None)
 Extracts text properties from a style element.
 
 extractParagraphProperties (self, style, parent=None)
 Extracts paragraph properties from a style 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)
 
 draw_image (self, node)
 
 text_a (self, node)
 
 text_line_break (self, node)
 
 text_note (self, node)
 
 text_s (self, node)
 
 text_tab (self, node)
 
 inline_markup (self, node)
 
 listToString (self, listElement, indent=0)
 
 tableToString (self, tableElement)
 MoinMoin uses || to delimit table cells.
 
 toString (self)
 Converts the document to a string.
 
 textToString (self, element)
 
 paragraphToString (self, paragraph, indent=0)
 
 wrapParagraph (self, text, indent=0, blockquote=False)
 

Public Attributes

list footnotes = []
 
int footnoteCounter = 0
 
dict textStyles = {"Standard": TextProps()}
 
dict paragraphStyles = {"Standard": ParagraphProps()}
 
dict listStyles = {}
 
list fixedFonts = []
 
int hasTitle = 0
 
 lastsegment = None
 
dict elements
 
 content = xml.dom.minidom.parseString(zip.read("content.xml"))
 
list lastsegment = []
 
str lastsegment = "table:table-header-rows":
 
level+ hasTitle = 1:
 

Detailed Description

Definition at line 145 of file odf2moinmoin.py.

Constructor & Destructor Documentation

◆ __init__()

odf.odf2moinmoin.ODF2MoinMoin.__init__ ( self,
filepath )

Definition at line 148 of file odf2moinmoin.py.

Member Function Documentation

◆ compressCodeBlocks()

odf.odf2moinmoin.ODF2MoinMoin.compressCodeBlocks ( self,
text )

Removes extra blank lines from code blocks.

Definition at line 309 of file odf2moinmoin.py.

Here is the caller graph for this function:

◆ do_nothing()

odf.odf2moinmoin.ODF2MoinMoin.do_nothing ( self,
node )

Definition at line 325 of file odf2moinmoin.py.

◆ draw_image()

odf.odf2moinmoin.ODF2MoinMoin.draw_image ( self,
node )

Definition at line 330 of file odf2moinmoin.py.

◆ extractParagraphProperties()

odf.odf2moinmoin.ODF2MoinMoin.extractParagraphProperties ( self,
style,
parent = None )

Extracts paragraph properties from a style element.

Definition at line 215 of file odf2moinmoin.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractTextProperties()

odf.odf2moinmoin.ODF2MoinMoin.extractTextProperties ( self,
style,
parent = None )

Extracts text properties from a style element.

Definition at line 189 of file odf2moinmoin.py.

Here is the caller graph for this function:

◆ inline_markup()

odf.odf2moinmoin.ODF2MoinMoin.inline_markup ( self,
node )

Definition at line 369 of file odf2moinmoin.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listToString()

odf.odf2moinmoin.ODF2MoinMoin.listToString ( self,
listElement,
indent = 0 )

Definition at line 400 of file odf2moinmoin.py.

Here is the caller graph for this function:

◆ load()

odf.odf2moinmoin.ODF2MoinMoin.load ( self,
filepath )

Loads an ODT file.

Definition at line 289 of file odf2moinmoin.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ paragraphToString()

odf.odf2moinmoin.ODF2MoinMoin.paragraphToString ( self,
paragraph,
indent = 0 )

Definition at line 518 of file odf2moinmoin.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processFontDeclarations()

odf.odf2moinmoin.ODF2MoinMoin.processFontDeclarations ( self,
fontDecl )

Extracts necessary font information from a font-declaration element.

Definition at line 181 of file odf2moinmoin.py.

Here is the caller graph for this function:

◆ processListStyles()

odf.odf2moinmoin.ODF2MoinMoin.processListStyles ( self,
listStyleElements )

Definition at line 272 of file odf2moinmoin.py.

Here is the caller graph for this function:

◆ processStyles()

odf.odf2moinmoin.ODF2MoinMoin.processStyles ( self,
styleElements )

Runs through "style" elements extracting necessary information.

Definition at line 253 of file odf2moinmoin.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tableToString()

odf.odf2moinmoin.ODF2MoinMoin.tableToString ( self,
tableElement )

MoinMoin uses || to delimit table cells.

Definition at line 434 of file odf2moinmoin.py.

Here is the caller graph for this function:

◆ text_a()

odf.odf2moinmoin.ODF2MoinMoin.text_a ( self,
node )

Definition at line 339 of file odf2moinmoin.py.

Here is the call graph for this function:

◆ text_line_break()

odf.odf2moinmoin.ODF2MoinMoin.text_line_break ( self,
node )

Definition at line 348 of file odf2moinmoin.py.

◆ text_note()

odf.odf2moinmoin.ODF2MoinMoin.text_note ( self,
node )

Definition at line 351 of file odf2moinmoin.py.

Here is the call graph for this function:

◆ text_s()

odf.odf2moinmoin.ODF2MoinMoin.text_s ( self,
node )

Definition at line 359 of file odf2moinmoin.py.

◆ text_tab()

odf.odf2moinmoin.ODF2MoinMoin.text_tab ( self,
node )

Definition at line 366 of file odf2moinmoin.py.

◆ textToString()

odf.odf2moinmoin.ODF2MoinMoin.textToString ( self,
element )

Definition at line 488 of file odf2moinmoin.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

odf.odf2moinmoin.ODF2MoinMoin.toString ( self)

Converts the document to a string.

FIXME Result from second call differs from first call

Definition at line 455 of file odf2moinmoin.py.

Here is the call graph for this function:

◆ wrapParagraph()

odf.odf2moinmoin.ODF2MoinMoin.wrapParagraph ( self,
text,
indent = 0,
blockquote = False )

Definition at line 557 of file odf2moinmoin.py.

Member Data Documentation

◆ content

odf.odf2moinmoin.ODF2MoinMoin.content = xml.dom.minidom.parseString(zip.read("content.xml"))

Definition at line 300 of file odf2moinmoin.py.

◆ elements

dict odf.odf2moinmoin.ODF2MoinMoin.elements
Initial value:
= {
'draw:page': self.textToString,
'draw:frame': self.textToString,
'draw:image': self.draw_image,
'draw:text-box': self.textToString,
'text:a': self.text_a,
'text:note': self.text_note,
}

Definition at line 159 of file odf2moinmoin.py.

◆ fixedFonts

list odf.odf2moinmoin.ODF2MoinMoin.fixedFonts = []

Definition at line 154 of file odf2moinmoin.py.

◆ footnoteCounter

int odf.odf2moinmoin.ODF2MoinMoin.footnoteCounter = 0

Definition at line 150 of file odf2moinmoin.py.

◆ footnotes

list odf.odf2moinmoin.ODF2MoinMoin.footnotes = []

Definition at line 149 of file odf2moinmoin.py.

◆ hasTitle [1/2]

int odf.odf2moinmoin.ODF2MoinMoin.hasTitle = 0

Definition at line 155 of file odf2moinmoin.py.

◆ hasTitle [2/2]

level + odf.odf2moinmoin.ODF2MoinMoin.hasTitle = 1:

Definition at line 542 of file odf2moinmoin.py.

◆ lastsegment [1/3]

list odf.odf2moinmoin.ODF2MoinMoin.lastsegment = None

Definition at line 156 of file odf2moinmoin.py.

◆ lastsegment [2/3]

list odf.odf2moinmoin.ODF2MoinMoin.lastsegment = []

Definition at line 402 of file odf2moinmoin.py.

◆ lastsegment [3/3]

str odf.odf2moinmoin.ODF2MoinMoin.lastsegment = "table:table-header-rows":

Definition at line 440 of file odf2moinmoin.py.

◆ listStyles

dict odf.odf2moinmoin.ODF2MoinMoin.listStyles = {}

Definition at line 153 of file odf2moinmoin.py.

◆ paragraphStyles

dict odf.odf2moinmoin.ODF2MoinMoin.paragraphStyles = {"Standard": ParagraphProps()}

Definition at line 152 of file odf2moinmoin.py.

◆ textStyles

dict odf.odf2moinmoin.ODF2MoinMoin.textStyles = {"Standard": TextProps()}

Definition at line 151 of file odf2moinmoin.py.


The documentation for this class was generated from the following file: