[Kde-pim] Re: Akonadi in a commandline tool

Volker Krause vkrause at kde.org
Sat Apr 30 15:54:15 BST 2011


On Friday 29 April 2011 01:08:33 Michael Schuerig wrote:
> I'm trying to access Akonadi in a commandline tool, however there are
> still some crucial tasks I haven't found a way to achieve:
> 
> * Getting a list of the user-visible names of all (top level)
> collections.
> * Instantiating a Collection given its user-visible name.
> * Restricting a SPARQL query to a single collection.
> * Providing useful error messages for malformed SPARQL queries.
> 
> In GUI apps, the first two tasks are apparently handled by
> Akonadi::EntityTreeModel, but as that class is tied rather intimately to
> GUI functionality, I'm not sure if it is the right thing for my purpose.
> 
> Searching is done with Akonadi::ItemSearchJob. However, its docs warn
> explicitly that it might search the entire Nepomuk store. Unfortunately,
> the docs don't say how to restrict the search to a given collection.
> 
> Looking at the Akonadi Console code for Item Search, I got the
> impression that the errorString of a failed ItemSearchJob is displayed.
> When I enter a malformed query, I don't get any such message, although
> error messages do appear in ~/.xsession-errors.
> 
> I appreciate any help and particulary pointers to apps that already
> implement similar functionality.

In the very early days of Akonadi, there actually was a command line client, 
but it got abandoned with the introduction of akonadiconsole. The code can 
still be found in playground/pim/akonadi/akonadicli. Many things have changed 
in Akonadi since then, so I'm not sure how much of this is still valid.

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110430/23bc55f6/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list