From: Dave Kuhlman <dkuhlman@re...> - 2006-09-01 15:45:16
I've been working on (yet another) writer for ODF/OpenDocument.
It produces .odt files that can be ready by OpenOffice/oowriter.
I've tried to learn what I could from pobrien's and aahz's work on
writers for ODF (and other writers as well). But, I also wanted
to do one of my own. And, I wanted to learn about the internal
format of ODF/.odt files.
A few features:
- It produces .odt files, specifically a Zipped file containing
content.xml and styles.xml.
- It uses styles defined in styles.xml in a styles file
(styles.odt by default). These styles are named with the prefix
"rststyle-". The user can modify these styles using either
oowriter or a text editor, and by doing so can control the look
of generated documents.
- It uses Lxml or, if Lxml is not installed, ElementTree to build
the DOM used to generate the XML content in content.xml in the
generated document. So, installation of one of Lxml or
ElementTree is required.
There is some documentation -- See
There is also a setup.py that will install rst2odt.py to you
.../bin directory and will install the writer and style files
It is not complete, so this is not really an announcement. But,
it is working well enough so that I've been able to use it on some
of my reST documents. An example is in
sandbox/dkuhlman/OpenDocument/docs/: odtwriter.txt and
Where is it? You can find it in the docutils SVN/Subversion
sandbox under sandbox/dkuhlman/OpenDocument.
If you have an interest in this, please let me know if you have
problems or suggestions. In particular, if you feed it a document
containing reST features that are not supported, you are likely to
see messages of the form "missing visit_xxx". I'd like to see
examples of documents that produce that error message so that I
can add support to the writer.