[silva-dev] Update - silva2odt
dkuhlman at rexx.com
Tue Jun 26 05:56:51 CEST 2007
On Mon, Jun 25, 2007 at 06:16:25PM +0200, eric casteleijn wrote:
> 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.
I'll do some more work and testing on setup.py. Distutils isn't
something that I understand very well.
> 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.
> 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.
> 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.
Thanks for the comments and help. With your comments and Marc's,
I've got plenty to keep me busy for awhile.
More information about the silva-dev