[silva-dev] Update - silva2odt
eric at infrae.com
Tue Jun 26 11:09:05 CEST 2007
>> 1. running 'setup.py install' with a different root specified doesn't
>> seem to take the styles.odt along.
> I'll do some more work and testing on setup.py. Distutils isn't
> something that I understand very well.
Me either, so I'm afraid I won't be of much help there.
>> 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
> OK, I've added this.
>> 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
> I've made a change in trying to fix this. But I believe that the
> command line interface still needs some work. For example, Marc
> seems to want to be able to pipe the output to stdout.
Ok, well, as I said: no hurry, we've got enough for initial testing now.
I suggest that Marc and I (and anyone else giving it the once over) keep
lists of what we find, just not to forget about it. Of course we
understand this is an early release, and it's not yet feature complete.
>> 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.
> Let me think about it a bit. It sounds do-able. But, working out
> the details about things like section and sub-section titles might
> be problematic. Let me think about it. Maybe I can come up with
> some low-level support that might help.
> There have been threads in the Docutils email lists about an
> analogous feature, specifically being able to use "include"
> directives so as to assemble a larger document out of smaller ones.
Yes, this might need a little more thinking and discussion. With
arbitrarily many levels of nesting, it's very hard to guarantee a
structure that makes sense in the output ODT, so we'll have to think
about where to cut off.
>> 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?
> I'm happy to be working on this. It's not in any version control
> system, now. My goal is to contribute it to the Silva project,
> when you think it's ready. Let me know if and when you'd like in
> the Silva SVN repository. If we put it there, I'd hope that you'd
> give me access to it, of course.
Of course, and we'd be happy to put it in our subversion repository as a
separate project until then, if you like. I think for the speed of
development it would make sense to keep it separate until it stabilizes
a bit, maybe creating a separate Zope product for the Silva integration
first, and then moving that into Silva when we expect no further major
changes aside from bug fixes and new features. Maybe it would make sense
to keep (a version of) it separate, though, since although it's of
course tied to Silva, it doesn't need Silva or Zope to run.
- eric casteleijn
More information about the silva-dev