Hi everybody, I think the following would work OK: - Added an XML file to the project which during installation will add application/x-basket-item MIME-type - "Basket Note Pads" is set as the default application to open application/x-basket-item - "Basket Note Pads" will know how to open application/x-basket-item files (when passed as an argument using KRunner for example) - "Basket Note Pads" will add/update metadata in Nepomuk when saving an item (currently, only Tags are added and updated)
Now I am going to test it. Any suggestions, tips or tricks? One more thing: Now that I am going to use the existing ".basket" file resource instead of a new resource, what the "Type" should it be? Is pimo:Note appropriate? A new type should be proposed? Cheers, Amir On Thu, Sep 2, 2010 at 1:29 PM, Sebastian Trüg <[email protected]> wrote: > On 09/02/2010 08:39 AM, Amir Pakdel wrote: >> I was playing with KUrl::protocol(), KMimeType::findByUrl(KUrl), >> KMimeTypeTrader::query(QString), new KRun(KUrl, 0) and some others and >> finally understood what are MIME and KIO for :) >> Protocols only indicate how files should be reached, and afterwards, >> regarding to the content of the files itself, MIME type is determined. >> It is the MIME-type that dictates the application used for opening the >> file. Therefore, there is no point in setting the protocol to something >> like basket:// >> Please correct me if I am wrong. > > this is correct. > >> Moreover, I saw that Nepomuk::SearchRunner::run performs a KRun(url, 0) >> in which the url is retrieved from the matched Nepomuk::Resource > > yes. > >> A have attached a basket file (baskets are containers of the actual >> notes) which is a simple XML. > > For the list I attach it again. > Most of what is in that file could be stored in Nepomuk. The only > questionable thing is formatting - ie. bg color and the like. > For starters (since we do not have the previously mentioned rdf type > registry) we could store each note in an html file (looks like you are > doing that already) and then give that file an additional type of > pimo:Note. Then we can tag it, set a title, add a comment, relate it to > other things. > Note groups could be modeled via pimo:partOf, ie. a set of pimo:Note > resources are pimo:partOf a group resource which would be of type > pimo:Thing or a new pimo:Thing subtype Basket, maybe? > >> As a result, in order to be able to open basket notes by searching them >> in KRunner, two solutions came to my mind: >> 1. In Nepomuk::SearchRunner::actionsForMatch we could retrieve >> mime-types from Nepomuk and add multiple actions based on these mime-types >> 2. We could add a MIME-type for basket files into KDE. In this case, we >> could add a KDE4 file analyzer >> (http://techbase.kde.org/Development/Tutorials/Writing_file_analyzers) > > I think with the above solution there is no need for anthing new. The > note files would be analyzed by strigi, thus indexing their content. And > they would have the additional pimo:Note type which allows us to search > for them nicely. > > Cheers, > Sebastian > >> >> Since I still feel that I lack the required knowledge, I will continue >> reading stuff about KDE and MIME. >> >> Cheers, >> Amir >> >> On Wed, Sep 1, 2010 at 10:50 PM, Amir Pakdel <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi, >> >> On Tue, Aug 31, 2010 at 8:52 PM, Dragan, Laura >> <[email protected] <mailto:[email protected]>> wrote: >> >> >> Hi, >> >> >> > SemNotes seems really nice, Laura. >> >> Thanks :) >> >> > > IMHO it would be great to use the same basic structure for >> storing notes >> > > to both Basket and Semnotes can display the same notes - >> with different >> > > focus of course. >> >> > Good point. Although, IMHO it would be really nice if both >> applications >> > could be merged. Both have neat unique features. >> >> I also think merging would be a good idea. Basket has a much >> larger user base than SemNotes could ever dream of getting and >> the UI is much nicer too. So I am all for this. >> >> > > Since the Basket Note Pads, itself, does not have a good search >> > > capability, the goal is store as much information as needed >> for a good >> > > search using the Nepomuk. I mean, since the Basket Note Pads >> does not >> > > index its own data (which are notes), I would like to use >> the Nepomuk >> > > for that. Moreover, notes are normally not so big and as a >> result, I >> > > might be able to store all the basket information in Nepomuk >> (or at >> > > least titles, tags and keywords). >> > >> > IMHO you could store everything besides possible layouting in >> Basket >> > which could be specific to Basket. >> >> For SemNotes I was considering moving the (content of the) notes >> to Akonadi and keep in Nepomuk only the metadata about them. I >> didn't actually start implementing it yet because I wasn't quite >> sure it was a good idea, but most importantly because I didn't >> have time to investigate further. So far there seem to be both >> advantages and disadvantages to it.. >> The biggest advantage that I can see is the possibility to work >> on notes taken with other tools, like KJots, and that other >> tools can use the notes taken in SemNotes. The biggest >> disadvantage would be that the data about the notes would be >> split in two systems. >> >> [..] >> >> In fact I do not know much about Akonadi. Nevertheless, since I am >> synchronizing my note files in multiple computers right now, using >> Akonadi instead of plain files might affect users who are >> synchronizing their notes in a way like me. Therefore, we should >> think of a synchronization mechanism too. However, we can do the >> first part (storing metadata in Nepomuk) and in mean time discuss >> the rest. >> >> Sebastian, is there any way to synchronize instanses of Nepomuk (or >> Akonadi)? >> >> >> > > But for now: Laura, how are you storing notes again? >> >> atm everything about the notes including the content of the >> notes themselves is stored in Nepomuk, as triples. The notes are >> of type pimo:Note. For each note i store the content, as string >> value of the property nao:htmlContent, title, tags, creation >> time, last modification time, and related resources. >> >> Does KRunner know how to open your notes? Can you search and open >> them from within the KDE Run Command or you are searching only >> inside the SemNotes? >> >> >> Cheers, >> Laura >> >> >> Cheers, >> Amir >> >> > _______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
