Hi Ignacio, thanks a lot for contributing.
On 02/22/2011 11:16 PM, Ignacio Serantes wrote: > I'm actually developing a python script to backup/restore, share nepomuk > data in usb disks and tag/untag files from command line. The script name > is neposidekick and I submitted to kde-apps. > > But I updated last week to KDE 4.6 and because search is not working, I > dislike a lot the new filter panel, and I hate that the query toolbar > box was removed in KDE 4.6, I decided to add queries to my script. The query box was not removed at all. Simple press Ctrl-F to get it shown again like in other applications. > Actually queries works only in console fine and fast except if you mix > ontologies, a design mistake because I barely know sparql, but next > weekend I will rewrite sparql builder and solve this problem. > > The search syntax is currently: > > exact_string = "string" | 'string' > value = exact_string | date | number | string > op = > | < | >= | <= | = | != > > term = [ + | - ] value [op] [:ontology] > query = term [ [or] term ]... > > but dates, numbers and arithmetic operators are not supported and only > Tag, hasTag, description and url ontologies are implemented yet. > > Here are same usage examples: > query: 'pending':hasTag .avi:name -'Takeuchi Yūko':actor > explanation: hasTag equals pending, file name contains .avi and actor > not equal 'Takeuchi Yūko' > > query: wind > explanation: wind contained in all supported places > > query: movie:hasTag 5> > explanation: hasTag contains movie and rating > 5 > > query: 5< or 8> > explanation: rating < 5 or rating > 8 > > Some question are not decided yet, for example date format, but when I > will rewrite sparql generator I will have more knowledge about this stuff. nice. > About query language, please consider that my intention is not create a > natural language, an easy language or an input interface because this > are nepomuksearch and filter panel goals. I want a syntax where you can > write complex queries in a few seconds, without inutile key presses or a > method where you need to open a window several times and do a search to > add a tag to build your query. I can understand that. > In irc sxe (sorry and don't know his real name) was a great help testing > my work and he and V. Handa suggested to write a KIO. I think that this > is a great idea if KIO could be written in python so any knowledge about > this stuff will be appreciated. > > Comments and suggestions about my work are welcome :). Well, the nepomuksearch:/ KIO slave already supports a more natural language, ie. the language that is used in the search box. It allows to write queries like "hasTag:foobar AND ...". The query parser is one big hack and I would actually like to get it improved (compare the GSOC project idea: http://community.kde.org/GSoC/2011/Ideas#Project:_A_.22real.22_query_parser). So maybe the work could be combined? > On the other side, I'm reading nmm ontologies and I found that there is > a lot of interesting stuff, at least for me, missing. Things like music > videos or live performances, documentaries or emission dates. I'm a > newbie so I don't know if things like this are inside or outside of nmm > goals neither this stuff was discussed before. These things are in the scope of NMM and IMHO it would be a good idea to add them. Cheers, Sebastian _______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
