On Wednesday, September 12, 2012 16:55:10 Vishesh Handa wrote: > Hey everyone > > I'm currently working on improving KDE File Indexing infrastructure. > > One of the areas where we are lacking is proper support for Open Document > Formats and Microsoft Document Formats. It occurred to me that maybe I > could use the calligra libraries to do so. I even looked at the code base ( > a little bit ) and extracting the basic metadata is really simple > (KoDocumentInfo). > > I also looked at the Calligra Converter code, which seems to be using a > print job to convert the formats. It can convert the file to a pdf, which I > can then easily parse, but that seems like a bit too much effort. Not to > mention that it's probably very slow. > > So my question is - Is it possible to use Calligra to quickly extract the > plain text from the file? > > Also, what kind of dependencies an I looking at? Just calligra-libs or > something else?
The short answer would be to look at the epub export filter. It uses a small set of functions to traverse the xml tree of an odt file. Right now it uses this information to create an xhtml output file. It should be very easy to instead create a pure text file. _______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel