Translations:

Command-line scripts

Two command-line scripts to run the stylesheets are provided, one is Python-based, the other is PHP-based. They do import the styles and the images, so they can also be used as a code example for these two steps in other languages and actual export plugins.

Documentation for both scripts can be generated using the "make doc" command. This will require  sphinx for python and  phpDocumentor for PHP. The generated documentation can be viewed online here.

The python script

The python script is the preferred command-line script, because it currently is a little more complete than the PHP script. It depends on the following Python modules:

To get information on the script's options, run it with --help:

./xhtml2odt.py --help

The script can be installed on the system with the make install command.

The generated documentation is available online here.

The PHP script

The PHP script can be used as an example to create an ODT export plugin for a PHP-based application. It contains comments on what you should do differently in a web-based application. If you want a real PHP-based export plugin, you can look at the code of the  Dotclear ODT export plugin.

The PHP script requires the  zip module, and will work better with the  tidy extension.

To get information on the script's options, run it with --help:

./xhtml2odt.php --help

The generated documentation is available online here.