Review Request 125762: External extractor plugin support for KFileMetaData

David Faure faure at kde.org
Sun Dec 6 10:43:59 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125762/#review89164
-----------------------------------------------------------

Ship it!


another round of low-level code review; but I'd say you can push afterwards, given the lack of objections on the overall mechanism.


src/extractors/externalextractor.cpp (line 85)
<https://git.reviewboard.kde.org/r/125762/#comment61010>

    m_extractors(),  would do the same, no need to copy from a default-constructed instance.



src/extractors/externalextractor.cpp (line 86)
<https://git.reviewboard.kde.org/r/125762/#comment61009>

    this is used only here in this method, so it doesn't need to be a member variable



src/extractors/externalextractor.cpp (line 91)
<https://git.reviewboard.kde.org/r/125762/#comment61012>

    const QString &extractor



src/extractors/externalextractor.cpp (line 94)
<https://git.reviewboard.kde.org/r/125762/#comment61011>

    maybe with a timeout? + error handling?


- David Faure


On Oct. 24, 2015, 12:19 p.m., Boudhayan Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125762/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2015, 12:19 p.m.)
> 
> 
> Review request for Baloo, KDE Frameworks, Pinak Ahuja, and Vishesh Handa.
> 
> 
> Repository: kfilemetadata
> 
> 
> Description
> -------
> 
> This patch introduces support for external metadata extractors in KFileMetaData
> 
> The external extractors themselves can be written in any language, provided that it can be executed as a standalone executable (compiled or script with a hashbang), with command line arguments, and can output data to stdout.
> 
> The extractors are executed like so:
> 
> * `extractor --mimetypes` - outputs a list of mimetypes supported by the extractor, one per line.
> * `extractor filename` - outputs a json document with the metadata. The keys are such that they can be directly used with PropertyInfo::fromName().
> 
> At the KFileMetaData end, an additional internal plugin (ExternalExtractor) is provided that forms a conduit between external extractors and the internal API. This plugin looks for executables called kfilemetadata_extractor_<something> in /usr/bin to find external extractors, and executes them with the --mimetypes arg to find the list of mimetypes each extractor supports. ExternalExtractor then claims to support all of these mimetypes, and then delegates to the extractor executable when doing the actual extraction.
> 
> 
> Diffs
> -----
> 
>   README.md 19b1a26 
>   src/extractors/CMakeLists.txt 5dd223e 
>   src/extractors/externalextractor.h PRE-CREATION 
>   src/extractors/externalextractor.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/125762/diff/
> 
> 
> Testing
> -------
> 
> Tested with the sample executable file extractor (as attched, written in python) with the dump manual test in KFileMetaData. Works.
> 
> 
> File Attachments
> ----------------
> 
> kfilemetadata_extractor_executable
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/10/23/146b657f-31d9-4117-a82f-ef966a6339d4__kfilemetadata_extractor_executable
> 
> 
> Thanks,
> 
> Boudhayan Gupta
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151206/0c268b41/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list