[silva-dev] silva2odt latest snap-shot
Dave Kuhlman
dkuhlman at rexx.com
Wed Jul 4 02:08:42 CEST 2007
silva2odt is still incomplete, but here is a snap-shot. The new
version is available at my Web site. Note minor version change:
http://www.rexx.com/~dkuhlman/silva2odt-1.0b.tar.gz
Added features:
- There is now some support for tables. I've tried to support
nested tables, but I do not know how to create them in Kupu, so I
have not tested it.
- There is minimal support for images. But, we probably need some
control over wrapping text around the image etc. I don't know
how to do that in Kupu.
- Citations are now supported. There are several styles to control
the look of citations. See the documentation.
Fixes:
- Lists have been re-worked. My tests show that nested lists work.
There are now styles for lists and list items
(silvastyle-bulletlist, silvastyle-enumlist,
silvastyle-bulletitem, silvastyle-enumitem).
- Links -- Fixed loss of text. There is a style for hyperlinks
(silvastyle-link). Also, styles such as bold, italic,
and underline now work for the label/text of a hyperlink.
- Fixes to setup.py -- The __init__.py and styles.odt files are
copied during the install phase. But, the users will still need
to copy styles.odt to the current directory or use the
--styles-path command line flag.
- I changed the name of the script that is copied to the bin
directory during install from silva2odt.py to silva2odt. I did
this because in IPython and Idle, the bin directory is in
sys.path and so, with the old name, import was loading the module
from the bin directory rather than loading the package from
site-packages. Thus, formerly,
from silva2od import silva2odt
had a different result in ipython and normal python.
- Some style handling has been reworked. I was using (oowriter)
paragraph styles where I should have used character styles and
vice versa. I think I've straightened that out now.
A problem -- If a piece of text has *more* than one of bold,
italic, and underline style, silva2odt only attaches one of those
attributes. So, for example, suppose you have five words
underlined and, in the middle of those five words, there are two
italic words. Then, Kupu will show five words underlined, two of
which will be both underlined and italic. But, silva2odt will not
make any words both underlined and italic. That is because
oowriter does not do cascading styles. I could add the ability to
create a new style, on the fly (for example, a style that is both
bold and italic), and use that. But, doing so would defeat the
goal of using predefined styles so that the user can change the
characteristics/look of a style and have the altered style
reflected throughout the document.
So I'll need to work on that.
I'll appreciate any comments and suggestions.
Dave
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
More information about the silva-dev
mailing list