[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: another suggestion for writing new filters
From: Werner Trobin <trobin () kde ! org>
Date: 2002-07-08 8:15:29
[Download RAW message or body]
On Monday 08 July 2002 09:47, Thomas Zander wrote:
> On Sun, Jul 07, 2002 at 11:17:03PM +0200, Marco Zanon wrote:
> > Hi,
> >
> > since KOffice 1.3 is going to move towards OpenOffice format at
> > least for KWord, I tell you all an idea that I already exposed to
> > David Faure some weeks ago (he didn't like it very much :).
> >
> > Since we would have to rewrite the filters from scratch or the
> > like, why not changing the idea behind them and create simple
> > command-line programs, instead of libraries?
> > We could have, for instance:
> > word97-2-openwriter
> > rtf-2-openwriter
> > wp-2-openwriter
> > and so on... Those filters would return the converted file to
> > stdout, and that would be read by KWord.
> >
> > My idea is to group those filters into an external project
> > (hosted by Sourceforge?).
> >
> > The advantages:
> > a) filters made this way would be simpler to create, even for
> > beginners (like I am: I'm not saying that creating an actual
> > KWord filter is impossible, but a simple command line application
> > is better :)
>
> Have you ever tried it? Its really easy to create a KOffice filter
> the framework is quite good, the hard part is the logic behind it,
> but that has to be done anyway.
> If you want you can simply use debug statements to print your stream
> if you want, no difference in logic there..
I'd be interested to hear about problems with the framework (you can download
a dummy filter from http://www.koffice.org/filters/faq.phtml where you can
also find the description what to do with all that Makefile.am and .desktop
files, the direct link is http://www.koffice.org/filters/template.tar.gz).
As soon as you set up that template I'd also be interested in problems and
limitations of the filter API and/or problems with the documentation.
Right now the only problem I see is that one isn't able to get hold of the
"real" URL of a file on a remote machine, as the filter only sees the
temporary file location. This can be a problem if your file to convert
references other parts of the document (e.g. externally stored images) using
relative links.
<thinking aloud>
David: IIRC KoDocument's url should hold that address, so we could somehow
provide a way to query this information from the filter. Hmm, there are some
ugly boundary cases with filter chains and temporary documents... let's see
if I can fix that after the exam.
</thinking aloud>
Ciao,
Werner
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic