Jos van den Oever provides an overview of the recent move of
Strigi into kdelibs and its implications for the wider desktop porting effort:
Monday was a red day for the KDE build
dashboard. This was the day that KFilePlugin was removed from kdelibs. In fact, dashboard is still mostly red because of this move. The KFilePlugin class has been a great success in KDE3 and there are many implementations of it. So it is no wonder that removing it causes many problems.
KFilePlugin has been removed to be split up into reading and writing plugins. The writing plugins are very similar to what we have now, but the read plugins are radically different and this is where KDE4 will see an enhancement and speed up of the extraction of metadata.
The exposure of the strigi API to the KDE developers this week led to cleaner code, better win32 support and the implementation of many wishes for making it easier to write analyzers.
Since the
tutorial on writing analyzers and the
list of plugins to be ported were put online, many porting efforts were started. Some plugins will be ported when nice analyzer interfaces are ready. Two of these are planned (in addition to StreamEndAnalyzer and StreamThroughAnalyzer):
- StreamSaxAnalyzer will let the analyzer react to SAX events that occur while parsing a file. XML is used for many file formats these days and this will save a lot of duplicated work. The StreamSaxAnalyzers will all be called from a StreamThroughAnalyzer which means that you can run multiple analyses in parallel. This is useful for mixed formats such as RDF embedded in HTML.
- StreamLineAnalyzer will let the analyzer react to each line that is read in a text file. The line will be reported as UTF-8, regardless of the encoding of original stream. This saves the analyzer implementor many headaches.
The StreamSaxAnalyzer is easy to implement and it will be added this week. The StreamLineAnalyzer will come a bit later, because it is a bit trickier to write.
About eight KFilePlugins allow writing of data to a file. This is something Strigi cannot handle and this functionality will go into a new KService, KFileWritePlugin. The first of these can be found in kdegraphics: kfilewrite_jpeg.cpp.
All in all the red color of dashboard should fade in the next week or two. I hope many more will help make this happen and would like to thank all the brave developers that already dove in and committed ported analyzers.