The ODF2XHTML parses an ODF file and produces XHTML. More...
Public Member Functions | |
__init__ (self, generate_css=True, embedable=False) | |
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. | |
Static Public Attributes | |
str | default_styles |
dict | familymap |
Protected Member Functions | |
_resetfootnotes (self) | |
_resetobject (self) | |
_walknode (self, node) | |
_wlines (self, s) | |
_writecss (self, s) | |
_writenothing (self, s) | |
Protected Attributes | |
_wfunc | |
_orgwfunc | |
_csslines | |
Static Protected Attributes | |
dict | _familyshort |
The ODF2XHTML parses an ODF file and produces XHTML.
Definition at line 346 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.__init__ | ( | self, | |
generate_css = True , |
|||
embedable = False |
|||
) |
Reimplemented in odf.odf2xhtml.ODF2XHTMLembedded.
Definition at line 348 of file odf2xhtml.py.
|
protected |
Definition at line 474 of file odf2xhtml.py.
|
protected |
|
protected |
Definition at line 1454 of file odf2xhtml.py.
|
protected |
|
protected |
Definition at line 1491 of file odf2xhtml.py.
|
protected |
Definition at line 1494 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.add_style_file | ( | self, | |
stylefilename, | |||
media = None |
|||
) |
Add a link to an external style file.
Also turns of the embedding of styles in the HTML
Definition at line 466 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.characters | ( | self, | |
data | |||
) |
odf.odf2xhtml.ODF2XHTML.classname | ( | self, | |
attrs | |||
) |
Generate a class name from a style name.
Definition at line 600 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.closetag | ( | self, | |
tag, | |||
block = True |
|||
) |
Close an open HTML tag.
Definition at line 533 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.collectnote | ( | self, | |
s | |||
) |
Definition at line 1325 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.css | ( | self | ) |
Returns the CSS content.
Definition at line 1498 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_custom_shape | ( | self, | |
tag, | |||
attrs | |||
) |
End the <draw:frame>
Definition at line 682 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_contentlanguage | ( | self, | |
tag, | |||
attrs | |||
) |
Set the content language.
Identifies the targeted audience
Definition at line 637 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_creator | ( | self, | |
tag, | |||
attrs | |||
) |
Set the content creator.
Identifies the targeted audience
Definition at line 644 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_metatag | ( | self, | |
tag, | |||
attrs | |||
) |
Any other meta data is added as a <meta> element.
Definition at line 631 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_title | ( | self, | |
tag, | |||
attrs | |||
) |
Get the title from the meta data and create a HTML <title>
Definition at line 624 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_draw_frame | ( | self, | |
tag, | |||
attrs | |||
) |
End the <draw:frame>
Definition at line 718 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_draw_page | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_draw_textbox | ( | self, | |
tag, | |||
attrs | |||
) |
End the <draw:text-box>
Definition at line 802 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_office_document_content | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_office_presentation | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_office_spreadsheet | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_office_text | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_style_default_style | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 948 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_style_footer | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_style_header | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_style_page_layout | ( | self, | |
tag, | |||
attrs | |||
) |
End this style.
Definition at line 1011 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_style_style | ( | self, | |
tag, | |||
attrs | |||
) |
End this style.
Definition at line 1078 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_table_table | ( | self, | |
tag, | |||
attrs | |||
) |
End a table.
Definition at line 1094 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_table_table_cell | ( | self, | |
tag, | |||
attrs | |||
) |
End a table cell.
Definition at line 1118 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_table_table_row | ( | self, | |
tag, | |||
attrs | |||
) |
End a table row.
Definition at line 1145 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_a | ( | self, | |
tag, | |||
attrs | |||
) |
End an anchor or bookmark reference.
Definition at line 1160 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.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.
Definition at line 1202 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_list | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_text_list_item | ( | self, | |
tag, | |||
attrs | |||
) |
End list item.
Definition at line 1266 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_list_level_style_bullet | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 1289 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_list_level_style_number | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 1311 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_note | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 1322 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_note_body | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 1333 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_note_citation | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.e_text_p | ( | self, | |
tag, | |||
attrs | |||
) |
End Paragraph.
Definition at line 1372 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_span | ( | self, | |
tag, | |||
attrs | |||
) |
End the <text:span>
Definition at line 1408 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_x_source | ( | self, | |
tag, | |||
attrs | |||
) |
Various indexes and tables of contents.
We ignore those.
Definition at line 1429 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.emptytag | ( | self, | |
tag, | |||
attrs = {} |
|||
) |
Definition at line 539 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.endElementNS | ( | self, | |
tag, | |||
qname | |||
) |
Definition at line 562 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.generate_footnotes | ( | self | ) |
Definition at line 852 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.generate_stylesheet | ( | self | ) |
odf.odf2xhtml.ODF2XHTML.get_anchor | ( | self, | |
name | |||
) |
Create a unique anchor id for a href name.
Definition at line 606 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.handle_endtag | ( | self, | |
tag, | |||
attrs, | |||
method | |||
) |
odf.odf2xhtml.ODF2XHTML.handle_starttag | ( | self, | |
tag, | |||
method, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.html_body | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 805 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.load | ( | self, | |
odffile | |||
) |
Loads a document into the parser and parses it.
The argument can either be a filename or a document in memory.
odffile | if the type is unicode string: name of a file; else it must be an open file type |
Definition at line 1446 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.odf2xhtml | ( | self, | |
odffile | |||
) |
Load a file and return the XHTML.
odffile | if the type is unicode string: name of a file; else it must be an open file type |
Definition at line 1473 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.opentag | ( | self, | |
tag, | |||
attrs = {} , |
|||
block = False |
|||
) |
Create an open HTML tag.
Definition at line 520 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.purgedata | ( | self | ) |
odf.odf2xhtml.ODF2XHTML.rewritelink | ( | self, | |
imghref | |||
) |
Intended to be overloaded if you don't store your pictures in a Pictures subfolder.
Definition at line 730 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_custom_shape | ( | self, | |
tag, | |||
attrs | |||
) |
A <draw:custom-shape> is made into a.
Definition at line 651 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_fill_image | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.s_draw_frame | ( | self, | |
tag, | |||
attrs | |||
) |
A <draw:frame> is made into a.
Definition at line 687 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_image | ( | self, | |
tag, | |||
attrs | |||
) |
A <draw:image> becomes an element.
Definition at line 735 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_object | ( | self, | |
tag, | |||
attrs | |||
) |
A <draw:object> is embedded object in the document (e.g.
spreadsheet in presentation).
Definition at line 748 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_object_ole | ( | self, | |
tag, | |||
attrs | |||
) |
A <draw:object-ole> is embedded OLE object in the document (e.g.
MS Graph).
Definition at line 765 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_page | ( | self, | |
tag, | |||
attrs | |||
) |
A <draw:page> is a slide in a presentation.
We use a <fieldset> element in HTML. Therefore if you convert a ODP file, you get a series of <fieldset>s. Override this for your own purpose.
Definition at line 776 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_textbox | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.s_ignorecont | ( | self, | |
tag, | |||
attrs | |||
) |
Stop processing the text nodes.
Definition at line 592 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_ignorexml | ( | self, | |
tag, | |||
attrs | |||
) |
Ignore this xml element and all children of it It will automatically stop ignoring.
Definition at line 588 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_automatic_styles | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 870 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_document_content | ( | self, | |
tag, | |||
attrs | |||
) |
First tag in the content.xml file.
Definition at line 877 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_master_styles | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 891 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_presentation | ( | self, | |
tag, | |||
attrs | |||
) |
For some odd reason, OpenOffice Impress doesn't define a default-style for the 'paragraph'.
We therefore force a standard when we see it is a presentation
Definition at line 898 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_spreadsheet | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.s_office_styles | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 914 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_text | ( | self, | |
tag, | |||
attrs | |||
) |
OpenDocument text.
Definition at line 918 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_processcont | ( | self, | |
tag, | |||
attrs | |||
) |
Start processing the text nodes.
Definition at line 596 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_default_page_layout | ( | self, | |
tag, | |||
attrs | |||
) |
Collect the formatting for the default page layout style.
Definition at line 993 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_default_style | ( | self, | |
tag, | |||
attrs | |||
) |
A default style is like a style on an HTML tag.
Definition at line 941 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_font_face | ( | self, | |
tag, | |||
attrs | |||
) |
It is possible that the HTML browser doesn't know how to show a particular font.
Luckily ODF provides generic fallbacks Unfortunately they are not the same as CSS2. CSS2 serif, sans-serif, cursive, fantasy, monospace ODF roman, swiss, modern, decorative, script, system
Definition at line 957 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_footer | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.s_style_footer_style | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 972 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_handle_properties | ( | self, | |
tag, | |||
attrs | |||
) |
Copy all attributes to a struct.
We will later convert them to CSS2
Definition at line 929 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_header | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.s_style_header_style | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 986 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_master_page | ( | self, | |
tag, | |||
attrs | |||
) |
Collect the formatting for the page layout style.
Definition at line 1016 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_page_layout | ( | self, | |
tag, | |||
attrs | |||
) |
Collect the formatting for the page layout style.
This won't work in CSS 2.1, as page identifiers are not allowed. It is legal in CSS3, but the rest of the application doesn't specify when to use what page layout
Definition at line 1002 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_style | ( | self, | |
tag, | |||
attrs | |||
) |
Collect the formatting for the style.
Styles have scope. The same name can be used for both paragraph and character styles Since CSS has no scope we use a prefix. (Not elegant) In ODF a style can have a parent, these parents can be chained. We may not have encountered the parent yet, but if we have, we resolve it.
Definition at line 1050 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table | ( | self, | |
tag, | |||
attrs | |||
) |
Start a table.
Definition at line 1083 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table_cell | ( | self, | |
tag, | |||
attrs | |||
) |
Start a table cell.
Definition at line 1100 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table_column | ( | self, | |
tag, | |||
attrs | |||
) |
Start a table column.
Definition at line 1124 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table_row | ( | self, | |
tag, | |||
attrs | |||
) |
Start a table row.
Definition at line 1135 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_a | ( | self, | |
tag, | |||
attrs | |||
) |
Anchors start.
Definition at line 1151 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_bookmark | ( | self, | |
tag, | |||
attrs | |||
) |
Bookmark definition.
Definition at line 1166 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_bookmark_ref | ( | self, | |
tag, | |||
attrs | |||
) |
Bookmark reference.
Definition at line 1175 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_h | ( | self, | |
tag, | |||
attrs | |||
) |
Headings start.
Definition at line 1183 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_line_break | ( | self, | |
tag, | |||
attrs | |||
) |
Force a line break (
)
Definition at line 1218 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_list | ( | self, | |
tag, | |||
attrs | |||
) |
Start a list (.
To know which level we're at, we have to count the number of <text:list> elements on the tagstack.
Definition at line 1227 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_list_item | ( | self, | |
tag, | |||
attrs | |||
) |
Start list item.
Definition at line 1261 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.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.
Definition at line 1275 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_list_level_style_number | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 1293 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_note | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.s_text_note_body | ( | self, | |
tag, | |||
attrs | |||
) |
Definition at line 1329 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_p | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.s_text_s | ( | self, | |
tag, | |||
attrs | |||
) |
Generate a number of spaces.
ODF has an element; HTML uses We use   so we can send the output through an XML parser if we desire to
Definition at line 1387 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_span | ( | self, | |
tag, | |||
attrs | |||
) |
The <text:span> element matches the element in HTML.
It is typically used to properties of the text.
Definition at line 1395 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_tab | ( | self, | |
tag, | |||
attrs | |||
) |
Move to the next tabstop.
We ignore this in HTML
Definition at line 1415 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_x_source | ( | self, | |
tag, | |||
attrs | |||
) |
Various indexes and tables of contents.
We ignore those.
Definition at line 1422 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.save | ( | self, | |
outputfile, | |||
addsuffix = False |
|||
) |
Save the HTML under the filename.
If the filename is '-' then save to stdout We have the last style filename in self.stylefilename
Definition at line 1511 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.set_embedable | ( | self | ) |
Tells the converter to only output the parts inside the <body>
Definition at line 456 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.set_plain | ( | self | ) |
Tell the parser to not generate CSS.
Definition at line 452 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.startElementNS | ( | self, | |
tag, | |||
qname, | |||
attrs | |||
) |
Definition at line 552 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.unknown_endtag | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.unknown_starttag | ( | self, | |
tag, | |||
attrs | |||
) |
odf.odf2xhtml.ODF2XHTML.writedata | ( | self | ) |
Definition at line 514 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.writeout | ( | self, | |
s | |||
) |
odf.odf2xhtml.ODF2XHTML.xhtml | ( | self | ) |
Returns the xhtml.
Definition at line 1488 of file odf2xhtml.py.
|
protected |
Definition at line 1499 of file odf2xhtml.py.
|
staticprotected |
Definition at line 1039 of file odf2xhtml.py.
|
protected |
Definition at line 1330 of file odf2xhtml.py.
|
protected |
Definition at line 482 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.anchors |
Definition at line 497 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.autoprefix |
Definition at line 872 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.creator |
Definition at line 486 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.cs |
Definition at line 496 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.currentnote |
Definition at line 477 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.currentstyle |
Definition at line 502 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.data |
Definition at line 487 of file odf2xhtml.py.
|
static |
Definition at line 817 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.default_styles |
Definition at line 843 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.document |
Definition at line 1451 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_custom_shape |
Definition at line 357 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_contentlanguage |
Definition at line 353 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_creator |
Definition at line 354 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_metatag |
Definition at line 355 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_dc_title |
Definition at line 352 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_draw_frame |
Definition at line 358 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_draw_page |
Definition at line 364 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_draw_textbox |
Definition at line 365 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_office_document_content |
Definition at line 377 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_office_presentation |
Definition at line 382 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_office_spreadsheet |
Definition at line 383 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_office_text |
Definition at line 385 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_style_default_style |
Definition at line 391 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_style_page_layout |
Definition at line 403 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_style_style |
Definition at line 406 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_table_table |
Definition at line 416 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_table_table_cell |
Definition at line 413 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_table_table_row |
Definition at line 415 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_a |
Definition at line 417 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_h |
Definition at line 425 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_list |
Definition at line 429 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_list_item |
Definition at line 430 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_list_level_style_bullet |
Definition at line 431 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_list_level_style_number |
Definition at line 432 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_note_body |
Definition at line 435 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_note_citation |
Definition at line 436 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_p |
Definition at line 439 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_span |
Definition at line 441 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.e_text_x_source |
Definition at line 418 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.elements |
Definition at line 351 of file odf2xhtml.py.
|
static |
Definition at line 934 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.generate_css |
Definition at line 350 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.headinglevels |
Definition at line 494 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.htmlstack |
Definition at line 489 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.language |
Definition at line 485 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.lines |
Definition at line 481 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.listtypes |
Definition at line 493 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.metatags |
Definition at line 507 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.notebody |
Definition at line 478 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.notedict |
Definition at line 476 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.prevstyle |
Definition at line 1278 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.processcont |
Definition at line 492 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.processelem |
Definition at line 491 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.pstack |
Definition at line 490 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_custom_shape |
Definition at line 357 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_fill_image |
Definition at line 360 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_frame |
Definition at line 358 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_image |
Definition at line 359 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_object |
Definition at line 362 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_object_ole |
Definition at line 363 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_page |
Definition at line 364 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_draw_textbox |
Definition at line 365 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_ignorecont |
Definition at line 381 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_ignorexml |
Definition at line 361 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_automatic_styles |
Definition at line 376 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_document_content |
Definition at line 377 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_master_styles |
Definition at line 380 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_presentation |
Definition at line 382 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_spreadsheet |
Definition at line 383 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_styles |
Definition at line 384 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_office_text |
Definition at line 385 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_processcont |
Definition at line 352 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_default_style |
Definition at line 391 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_font_face |
Definition at line 393 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_handle_properties |
Definition at line 392 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_master_page |
Definition at line 401 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_page_layout |
Definition at line 403 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_style_style |
Definition at line 406 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table |
Definition at line 416 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table_cell |
Definition at line 413 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table_column |
Definition at line 414 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_table_table_row |
Definition at line 415 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_a |
Definition at line 417 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_bookmark |
Definition at line 421 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_bookmark_ref |
Definition at line 423 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_h |
Definition at line 425 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_line_break |
Definition at line 427 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_list |
Definition at line 429 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_list_item |
Definition at line 430 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_list_level_style_bullet |
Definition at line 431 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_list_level_style_number |
Definition at line 432 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_note |
Definition at line 434 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_note_body |
Definition at line 435 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_p |
Definition at line 439 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_s |
Definition at line 440 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_span |
Definition at line 441 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_tab |
Definition at line 442 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.s_text_x_source |
Definition at line 418 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.styledict |
Definition at line 501 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.stylefilename |
Definition at line 468 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.stylestack |
Definition at line 500 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.tagstack |
Definition at line 488 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.title |
Definition at line 484 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.use_internal_css |
Definition at line 467 of file odf2xhtml.py.
odf.odf2xhtml.ODF2XHTML.xmlfile |
Definition at line 483 of file odf2xhtml.py.