Nepomuk integration : how to "run" nepomuk resources
Adrien BUSTANY
madcat at mymadcat.com
Tue Jul 29 13:25:38 BST 2008
Hi there,
it's my first message on the list, so here is a quick introduction : I'm
a french student working this summer at Mandriva's on KDE-Nepomuk, my
mentor is Sebastian TrĂ¼g.
Now for the real content :
I recently wrote a KRunner plugin for Nepomuk resources. This runner
uses plugins, each plugin feeding him with a certain type of resource
(think e-mail, contact, tags, webpages...). The question which comes
after listing the resource is "what should we do with them ?".
Basically, we probably want to open webpages in a web browser, display
contacts in KAddressBook and show tagged files in the file manager. This
is more or less the same thing as mimetypes (how to run a file), but for
Nepomuk resources.
This information has to be stored somewhere. So far we've been thinking
of two different solutions, and I'd like to know which one your prefer,
and why. Other propositions are of course accepted :-)
1. Add a specific line in the application .desktop file, specifying the
resource types the application can handle. For example, we'd see in
KAddressBook desktop file :
X-KDE-NepomukResourceType=http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Contact
Then KAddressBook should be modified in order to handle being run with a
nepomuk resource as its parameter. Of course, a wrapper can also be done
if patching the application is too complex/not wanted.
2. Create a new type of service (let's call it NepomukRunner). Each
service file specify the resource type they can handle (as in solution
1.), and a command to run. In the command, %u gets replaced by the
resource url, %t by the resource label etc. (this can also be done in
solution 1.). For example the command for "running" a tag would be
Exec=kde-open nepomuksearch:/hasTag:%t
Both solutions are somewhat similar, it's all about deciding weither we
use external services, or the application desktop file.
Please tell me your thoughts about that
Best regards
Adrien Bustany
More information about the kde-core-devel
mailing list