[silva-dev] Update - silva2odt

eric casteleijn eric at infrae.com
Mon Jun 25 18:16:25 CEST 2007


Ok, had a quick initial look, and it's very impressive indeed. I just 
exported the Silva documentation (from a 1.6 installation) and 
transformed it into odts without major problems. I ran into some small 
things, which I'll report here, mostly so that I don't forget about them:

1. running 'setup.py install' with a different root specified doesn't 
seem to take the styles.odt along.

2. I exported the documentation, which is a Silva Publication, not a 
Silva Folder. Publications are units of organization which behave like 
folders most of the time, and probably should in this context as well. 
So without more than perfunctorily skimming over the code, I suggest 
something like changing lines 164-165 to:

         if self.root.xpath('/aa:silva/aa:folder', self.nsmap) or \ 
self.root.xpath('/aa:silva/aa:publication', self.nsmap):
             self.is_folder = True

This seemed to do the trick for me.

3. the syntax:

silva2odt.py infile.zip outfile.odt

doesn't seem to work, (at least not in the above case,), it just gives 
me the list of options, but:

silva2odt.py infile.zip

does, in that it creates a directory tree structure with separate odts 
for every Silva Document. I would like to have the option to transform 
an entire tree into a single odt, which would make sense because Silva 
Documents map more naturally to (web-)pages than to documents in a lot 
of use cases.

Again, thanks Dave, great work! And don't feel like you have to run and 
implement/fix these things immediately, I might have a go at them 
myself. Is the code under version control anywhere?

cheers,

eric



More information about the silva-dev mailing list