https://bugs.kde.org/show_bug.cgi?id=398101

            Bug ID: 398101
           Summary: Insufficient documentation
           Product: frameworks-kfilemetadata
           Version: 5.49.0
          Platform: unspecified
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: pinak.ah...@gmail.com
          Reporter: yhi06...@awsoo.com
  Target Milestone: ---

Today I tried to write a simple external metadata plugin based on the
documentation of your library [1] but it turns out at its current state it's
near impossible to use it. To be clear I'm not a KDE dev, just a dev who uses
KDE.

[1] https://phabricator.kde.org/source/kfilemetadata/browse/master/README.md

Here are my questions not answered by your documentation:


What's the usual `libexec` path on actual systems? Examples would be useful. Is
it only possible to define external plugins on system-level or does it support
plugins from the users' home directories?

What's the format of the required `manifest.json` files? There's an example in
the tests directory but the actual JSON schema is not defined anywhere.

If every plugin is placed in the `libexec/kf5/kfilemetadata/externalextractors`
directory how external extractors and external writers are distinguished?
Shouldn't external writers be placed in a separate
`libexec/kf5/kfilemetadata/externalwriters` directory?

The doc states both kind of plugins accept a file as an argument. This is too
ambiguous. Is it a command-line argument, or is this refers to a field of the
JSON stdin inputs? If this is a command-line argument, does it use a specific
flag or it's always argument position one?

What format does external writers expect via the standard input? I assume it's
JSON but it's not stated in the docs.

What's the actual format of JSON inputs and responses? No JSON schemas, no idea
what my plugin could receive and should return.

What's the order of magnitude of the timeouts? Do I have 50 milliseconds or 50
seconds for my plugin to finish?

What happens if my plugin fails or crashes? Is it possible to retrieve the
stderr of my plugin somehow via KFileMetaData for debugging reasons or should I
provide my own logging functionality?

What happens if my plugin produces invalid output? How does KFileMetaData
handles invalid output? Also there are no schemas for the JSON output so I
cannot validate I'm sending valid responses.

How is it possible to check if my plugin is loaded by the users of this library
like Dolphin or Baloo?


If you don't find these question unreasonable, would be useful to have your
documentation updated with answers to them.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to