Hi everybody, On Wed, Oct 6, 2010 at 8:47 PM, Stephen Kelly <[email protected]> wrote: > Matt Rogers wrote: > >>> The second solution is more appealing, but I would rather get a >>> working version with what we have got now. Therefore, I will go with >>> the first suggestion. >>> >> >> We actually have thought about interfacing with Akonadi for data >> storage/caching. If we do that, would we get Nepomuk integration for >> "free" as well? > > Just an FYI about this: > > I changed how kjots stores data so that it can use Akonadi for access to the > notes.
Although I have read all I could find about Nepomuk and Akonadi, I still don't know what Akonadi does exactly and how it interacts with Nepomuk! Could anyone please help me with that? > > http://dot.kde.org/2010/02/17/kjots-takes-advantage-innovations-kde- > development-platform > > KJots accesses the notes as Mime documents (KMime::Message objects) from > Akonadi. Akonadi stores the notes in mime format in maildir containers (one > note per file). The mime format could also be used to store the images in > the note directly in the note, but I haven't got around to doing that > (though there is API for it I think). > > http://www.faqs.org/rfcs/rfc2387.html > > The way Akonadi stores the notes is irrelevant to the application. They > could just as easily be in mbox format (one single file for a group of > notes). The application just uses the KMime::Message objects that Akonadi > returns. > > Even if you don't make basket use Akonadi yet it could make sense to store > the notes as mime messages and use KMime to (de)serialize them. > > All the best, > > Steve. > I hope I found a solution for opening note files with Basket: Suppose there is a basket in ~/.kde/share/apps/basket/baskets/basket106 which has a note in a file called note1.html and the metadata in Nepomuk is as following: $ nepomukcmd query "select ?r where { ?r nie:url <file:///~/.kde/share/apps/basket/baskets/basket106/note1.html> . }" <nepomuk:/res/00473b7a-4ac9-4223-b8d3-dee3d24631c1> Total results: 1 Execution time: 00:00:00.3 $ nepomukcmd query "select ?a where { <nepomuk:/res/00473b7a-4ac9-4223-b8d3-dee3d24631c1> nie:mimeType ?a . }" "application/x-basket-item"^^<http://www.w3.org/2001/XMLSchema#string> Total results: 1 Execution time: 00:00:00.1 Now in Nepomuk::SearchRunner::run, we could get the service that should run this resource and then tell the KRun to use it, like the following: QString mimetype = res.property(Nepomuk::Vocabulary::NIE::mimeType).toString(); KService::Ptr preferredService = KMimeTypeTrader::self()->preferredService( mimetype ); KRun *newApp = new KRun(url, 0); newApp->setPreferredService( preferredService->desktopEntryName() ); I hope it works without changing anything else. Sebastian, would you please take a look? Cheers, Amir ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Basket-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/basket-devel
