xhtml2odt(1) - Linux man page

Name

xhtml2odt - Convert an XHTML page to an ODT document

Synopsis

xhtml2odt.py [options] -i input -o output -t template.odt

Options

-h, --help
show this help message and exit
--version
Show the version and exit
-i FILE, --input=FILE
Read the html from this file
-o FILE, --output=FILE
Location of the output ODT file
-t FILE, --template=FILE
Location of the template ODT file
-u URL, --url=URL
Use this URL for relative links
-v, --verbose
Show what's going on
--html-id=ID
Only export from the element with this ID
--replace=KEYWORD
Keyword to replace in the ODT template (default is ODT-INSERT)
--cut-start=KEYWORD
Keyword to start cutting text from the ODT template (default is ODT-CUT-START)
--cut-stop=KEYWORD
Keyword to stop cutting text from the ODT template (default is ODT-CUT-STOP)
--top-header-level=LEVEL
Level of highest header in the HTML (default is 1)
--img-default-width=WIDTH
Default image width (default is 8cm)
--img-default-height=HEIGHT
Default image height (default is 6cm)
--dpi=DPI
Screen resolution in Dots Per Inch (default is 96)
--no-network
Do not download remote images
--stylesdir=DIR
Override the style templates directory

Files

/usr/share/xhtml2odt/template.odt
The system wide ODT template file.
/usr/share/xhtml2odt/styles
The system wide styles definitions.
/usr/share/xhtml2odt/xsl
The conversion stylesheets.

Example

First, download the HTML page:
$ wget -O wp-odt.html http://fr.wikipedia.org/wiki/OpenDocument
Then, convert it to ODT, selecting only the "content" element:
$ xhtml2odt -i wp-odt.html -o wp-odt.odt --html-id content \
-u http://fr.wikipedia.org/wiki/OpenDocument

Author

Aurelien Bompard <aurelien(a)bompard.org>

Reporting Bugs

Report bugs on the XHTML2ODT tracker at <http://xhtml2odt.org>.

Copyright

(C) 2009-2010 Aurelien Bompard <aurelien(a)bompard.org>