ODFPY 1.2.0
 
Loading...
Searching...
No Matches
odf.odf2xhtml.ODF2XHTMLembedded Class Reference

The ODF2XHTML parses an ODF file and produces XHTML. More...

Inheritance diagram for odf.odf2xhtml.ODF2XHTMLembedded:
Collaboration diagram for odf.odf2xhtml.ODF2XHTMLembedded:

Public Member Functions

 __init__ (self, lines, generate_css=True, embedable=False)
 
- Public Member Functions inherited from odf.odf2xhtml.ODF2XHTML
 set_plain (self)
 Tell the parser to not generate CSS.
 
 set_embedable (self)
 Tells the converter to only output the parts inside the <body>
 
 add_style_file (self, stylefilename, media=None)
 Add a link to an external style file.
 
 writeout (self, s)
 
 writedata (self)
 
 opentag (self, tag, attrs={}, block=False)
 Create an open HTML tag.
 
 closetag (self, tag, block=True)
 Close an open HTML tag.
 
 emptytag (self, tag, attrs={})
 
 characters (self, data)
 
 startElementNS (self, tag, qname, attrs)
 
 endElementNS (self, tag, qname)
 
 handle_starttag (self, tag, method, attrs)
 
 handle_endtag (self, tag, attrs, method)
 
 unknown_starttag (self, tag, attrs)
 
 unknown_endtag (self, tag, attrs)
 
 s_ignorexml (self, tag, attrs)
 Ignore this xml element and all children of it It will automatically stop ignoring.
 
 s_ignorecont (self, tag, attrs)
 Stop processing the text nodes.
 
 s_processcont (self, tag, attrs)
 Start processing the text nodes.
 
 classname (self, attrs)
 Generate a class name from a style name.
 
 get_anchor (self, name)
 Create a unique anchor id for a href name.
 
 purgedata (self)
 
 e_dc_title (self, tag, attrs)
 Get the title from the meta data and create a HTML <title>
 
 e_dc_metatag (self, tag, attrs)
 Any other meta data is added as a <meta> element.
 
 e_dc_contentlanguage (self, tag, attrs)
 Set the content language.
 
 e_dc_creator (self, tag, attrs)
 Set the content creator.
 
 s_custom_shape (self, tag, attrs)
 A <draw:custom-shape> is made into a.
 
 e_custom_shape (self, tag, attrs)
 End the <draw:frame>
 
 s_draw_frame (self, tag, attrs)
 A <draw:frame> is made into a.
 
 e_draw_frame (self, tag, attrs)
 End the <draw:frame>
 
 s_draw_fill_image (self, tag, attrs)
 
 rewritelink (self, imghref)
 Intended to be overloaded if you don't store your pictures in a Pictures subfolder.
 
 s_draw_image (self, tag, attrs)
 A <draw:image> becomes an element.
 
 s_draw_object (self, tag, attrs)
 A <draw:object> is embedded object in the document (e.g.
 
 s_draw_object_ole (self, tag, attrs)
 A <draw:object-ole> is embedded OLE object in the document (e.g.
 
 s_draw_page (self, tag, attrs)
 A <draw:page> is a slide in a presentation.
 
 e_draw_page (self, tag, attrs)
 
 s_draw_textbox (self, tag, attrs)
 
 e_draw_textbox (self, tag, attrs)
 End the <draw:text-box>
 
 html_body (self, tag, attrs)
 
 generate_stylesheet (self)
 
 generate_footnotes (self)
 
 s_office_automatic_styles (self, tag, attrs)
 
 s_office_document_content (self, tag, attrs)
 First tag in the content.xml file.
 
 e_office_document_content (self, tag, attrs)
 Last tag.
 
 s_office_master_styles (self, tag, attrs)
 
 s_office_presentation (self, tag, attrs)
 For some odd reason, OpenOffice Impress doesn't define a default-style for the 'paragraph'.
 
 e_office_presentation (self, tag, attrs)
 
 s_office_spreadsheet (self, tag, attrs)
 
 e_office_spreadsheet (self, tag, attrs)
 
 s_office_styles (self, tag, attrs)
 
 s_office_text (self, tag, attrs)
 OpenDocument text.
 
 e_office_text (self, tag, attrs)
 
 s_style_handle_properties (self, tag, attrs)
 Copy all attributes to a struct.
 
 s_style_default_style (self, tag, attrs)
 A default style is like a style on an HTML tag.
 
 e_style_default_style (self, tag, attrs)
 
 s_style_font_face (self, tag, attrs)
 It is possible that the HTML browser doesn't know how to show a particular font.
 
 s_style_footer (self, tag, attrs)
 
 e_style_footer (self, tag, attrs)
 
 s_style_footer_style (self, tag, attrs)
 
 s_style_header (self, tag, attrs)
 
 e_style_header (self, tag, attrs)
 
 s_style_header_style (self, tag, attrs)
 
 s_style_default_page_layout (self, tag, attrs)
 Collect the formatting for the default page layout style.
 
 s_style_page_layout (self, tag, attrs)
 Collect the formatting for the page layout style.
 
 e_style_page_layout (self, tag, attrs)
 End this style.
 
 s_style_master_page (self, tag, attrs)
 Collect the formatting for the page layout style.
 
 s_style_style (self, tag, attrs)
 Collect the formatting for the style.
 
 e_style_style (self, tag, attrs)
 End this style.
 
 s_table_table (self, tag, attrs)
 Start a table.
 
 e_table_table (self, tag, attrs)
 End a table.
 
 s_table_table_cell (self, tag, attrs)
 Start a table cell.
 
 e_table_table_cell (self, tag, attrs)
 End a table cell.
 
 s_table_table_column (self, tag, attrs)
 Start a table column.
 
 s_table_table_row (self, tag, attrs)
 Start a table row.
 
 e_table_table_row (self, tag, attrs)
 End a table row.
 
 s_text_a (self, tag, attrs)
 Anchors start.
 
 e_text_a (self, tag, attrs)
 End an anchor or bookmark reference.
 
 s_text_bookmark (self, tag, attrs)
 Bookmark definition.
 
 s_text_bookmark_ref (self, tag, attrs)
 Bookmark reference.
 
 s_text_h (self, tag, attrs)
 Headings start.
 
 e_text_h (self, tag, attrs)
 Headings end Side If there is no title in the metadata, then it is taken from the first heading of any level.
 
 s_text_line_break (self, tag, attrs)
 Force a line break (
)
 
 s_text_list (self, tag, attrs)
 Start a list (.
 
 e_text_list (self, tag, attrs)
 End a list.
 
 s_text_list_item (self, tag, attrs)
 Start list item.
 
 e_text_list_item (self, tag, attrs)
 End list item.
 
 s_text_list_level_style_bullet (self, tag, attrs)
 CSS doesn't have the ability to set the glyph to a particular character, so we just go through the available glyphs.
 
 e_text_list_level_style_bullet (self, tag, attrs)
 
 s_text_list_level_style_number (self, tag, attrs)
 
 e_text_list_level_style_number (self, tag, attrs)
 
 s_text_note (self, tag, attrs)
 
 e_text_note (self, tag, attrs)
 
 collectnote (self, s)
 
 s_text_note_body (self, tag, attrs)
 
 e_text_note_body (self, tag, attrs)
 
 e_text_note_citation (self, tag, attrs)
 
 s_text_p (self, tag, attrs)
 Paragraph.
 
 e_text_p (self, tag, attrs)
 End Paragraph.
 
 s_text_s (self, tag, attrs)
 Generate a number of spaces.
 
 s_text_span (self, tag, attrs)
 The <text:span> element matches the element in HTML.
 
 e_text_span (self, tag, attrs)
 End the <text:span>
 
 s_text_tab (self, tag, attrs)
 Move to the next tabstop.
 
 s_text_x_source (self, tag, attrs)
 Various indexes and tables of contents.
 
 e_text_x_source (self, tag, attrs)
 Various indexes and tables of contents.
 
 load (self, odffile)
 Loads a document into the parser and parses it.
 
 odf2xhtml (self, odffile)
 Load a file and return the XHTML.
 
 xhtml (self)
 Returns the xhtml.
 
 css (self)
 Returns the CSS content.
 
 save (self, outputfile, addsuffix=False)
 Save the HTML under the filename.
 

Public Attributes

 lines
 
 generate_css
 
 elements
 
 s_draw_frame
 
 e_draw_frame
 
 s_draw_image
 
 s_draw_fill_image
 
 s_ignorexml
 
 s_draw_page
 
 e_draw_page
 
 s_draw_object
 
 s_draw_object_ole
 
 s_draw_textbox
 
 e_draw_textbox
 
 s_ignorecont
 
- Public Attributes inherited from odf.odf2xhtml.ODF2XHTML
 generate_css
 
 elements
 
 s_processcont
 
 e_dc_title
 
 e_dc_contentlanguage
 
 e_dc_creator
 
 e_dc_metatag
 
 s_custom_shape
 
 e_custom_shape
 
 s_draw_frame
 
 e_draw_frame
 
 s_draw_image
 
 s_draw_fill_image
 
 s_ignorexml
 
 s_draw_object
 
 s_draw_object_ole
 
 s_draw_page
 
 e_draw_page
 
 s_draw_textbox
 
 e_draw_textbox
 
 s_office_automatic_styles
 
 s_office_document_content
 
 e_office_document_content
 
 s_office_master_styles
 
 s_ignorecont
 
 s_office_presentation
 
 e_office_presentation
 
 s_office_spreadsheet
 
 e_office_spreadsheet
 
 s_office_styles
 
 s_office_text
 
 e_office_text
 
 s_style_default_style
 
 e_style_default_style
 
 s_style_handle_properties
 
 s_style_font_face
 
 s_style_master_page
 
 s_style_page_layout
 
 e_style_page_layout
 
 s_style_style
 
 e_style_style
 
 s_table_table_cell
 
 e_table_table_cell
 
 s_table_table_column
 
 s_table_table_row
 
 e_table_table_row
 
 s_table_table
 
 e_table_table
 
 s_text_a
 
 e_text_a
 
 s_text_x_source
 
 e_text_x_source
 
 s_text_bookmark
 
 s_text_bookmark_ref
 
 s_text_h
 
 e_text_h
 
 s_text_line_break
 
 s_text_list
 
 e_text_list
 
 s_text_list_item
 
 e_text_list_item
 
 s_text_list_level_style_bullet
 
 e_text_list_level_style_bullet
 
 s_text_list_level_style_number
 
 e_text_list_level_style_number
 
 s_text_note
 
 s_text_note_body
 
 e_text_note_body
 
 e_text_note_citation
 
 s_text_p
 
 e_text_p
 
 s_text_s
 
 s_text_span
 
 e_text_span
 
 s_text_tab
 
 use_internal_css
 
 stylefilename
 
 notedict
 
 currentnote
 
 notebody
 
 lines
 
 xmlfile
 
 title
 
 language
 
 creator
 
 data
 
 tagstack
 
 htmlstack
 
 pstack
 
 processelem
 
 processcont
 
 listtypes
 
 headinglevels
 
 cs
 
 anchors
 
 stylestack
 
 styledict
 
 currentstyle
 
 metatags
 
 default_styles
 
 autoprefix
 
 prevstyle
 
 document
 

Additional Inherited Members

- Static Public Attributes inherited from odf.odf2xhtml.ODF2XHTML
str default_styles
 
dict familymap
 
- Protected Member Functions inherited from odf.odf2xhtml.ODF2XHTML
 _resetfootnotes (self)
 
 _resetobject (self)
 
 _walknode (self, node)
 
 _wlines (self, s)
 
 _writecss (self, s)
 
 _writenothing (self, s)
 
- Protected Attributes inherited from odf.odf2xhtml.ODF2XHTML
 _wfunc
 
 _orgwfunc
 
 _csslines
 
- Static Protected Attributes inherited from odf.odf2xhtml.ODF2XHTML
dict _familyshort
 

Detailed Description

The ODF2XHTML parses an ODF file and produces XHTML.

Definition at line 1523 of file odf2xhtml.py.

Constructor & Destructor Documentation

◆ __init__()

odf.odf2xhtml.ODF2XHTMLembedded.__init__ (   self,
  lines,
  generate_css = True,
  embedable = False 
)

Reimplemented from odf.odf2xhtml.ODF2XHTML.

Definition at line 1525 of file odf2xhtml.py.

Here is the call graph for this function:

Member Data Documentation

◆ e_draw_frame

odf.odf2xhtml.ODF2XHTMLembedded.e_draw_frame

Definition at line 1537 of file odf2xhtml.py.

◆ e_draw_page

odf.odf2xhtml.ODF2XHTMLembedded.e_draw_page

Definition at line 1541 of file odf2xhtml.py.

◆ e_draw_textbox

odf.odf2xhtml.ODF2XHTMLembedded.e_draw_textbox

Definition at line 1544 of file odf2xhtml.py.

◆ elements

odf.odf2xhtml.ODF2XHTMLembedded.elements

Definition at line 1531 of file odf2xhtml.py.

◆ generate_css

odf.odf2xhtml.ODF2XHTMLembedded.generate_css

Definition at line 1530 of file odf2xhtml.py.

◆ lines

odf.odf2xhtml.ODF2XHTMLembedded.lines

Definition at line 1527 of file odf2xhtml.py.

◆ s_draw_fill_image

odf.odf2xhtml.ODF2XHTMLembedded.s_draw_fill_image

Definition at line 1539 of file odf2xhtml.py.

◆ s_draw_frame

odf.odf2xhtml.ODF2XHTMLembedded.s_draw_frame

Definition at line 1537 of file odf2xhtml.py.

◆ s_draw_image

odf.odf2xhtml.ODF2XHTMLembedded.s_draw_image

Definition at line 1538 of file odf2xhtml.py.

◆ s_draw_object

odf.odf2xhtml.ODF2XHTMLembedded.s_draw_object

Definition at line 1542 of file odf2xhtml.py.

◆ s_draw_object_ole

odf.odf2xhtml.ODF2XHTMLembedded.s_draw_object_ole

Definition at line 1543 of file odf2xhtml.py.

◆ s_draw_page

odf.odf2xhtml.ODF2XHTMLembedded.s_draw_page

Definition at line 1541 of file odf2xhtml.py.

◆ s_draw_textbox

odf.odf2xhtml.ODF2XHTMLembedded.s_draw_textbox

Definition at line 1544 of file odf2xhtml.py.

◆ s_ignorecont

odf.odf2xhtml.ODF2XHTMLembedded.s_ignorecont

Definition at line 1558 of file odf2xhtml.py.

◆ s_ignorexml

odf.odf2xhtml.ODF2XHTMLembedded.s_ignorexml

Definition at line 1540 of file odf2xhtml.py.


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