https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #18 from Konrad Renner <[hidden email]> --- (In reply to comment #17) > Hi Vishesh Handa, > > Can you give us a simple estimation of work to do about to port current > digiKAm Nepomuk interface to use Baloo instead. > > All code relevant is here : > > https://projects.kde.org/projects/extragear/graphics/digikam/repository/ > revisions/master/show/utilities/nepomuk > > Also, please take a look of analysis from Veaceslav in comments #13 and #15 > to see if all is fine... > > Thanks in advance > > Gilles Caulier Hi, Vishesh has posted about tagging and baloo: http://vhanda.in/blog/2014/07/tagging-your-files/ , does this help? -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #19 from Vishesh Handa <[hidden email]> --- Sorry about the delay. I finally looked at the code. With Baloo, we have tried to keep Baloo just as a file indexer for searching. Everything else which Nepomuk used to do have either been thrown away or put in other places. In the case of tags, ratings and comments, they are stored in the extended attributes. So, if you guys want, you can skip depending on Baloo completely. Lets talk about the code - dknepomukwrap.cpp - This can be converted into reading and writing the extended attributes. dknepomukquery.cpp - This is something you can use Baloo for if you want. Or you can scan the files yourself. If you want to use Baloo, I can help with the query. Baloo would just be giving you a list of files which have the xattrs set. dknepomukwatcher.cpp - Baloo can inform you when a file changes. Or you can use KDirWatch and listen for changes yourself. It's up to you. On a separate note, one of the things I hated about Nepomuk was the need for these "synchornization agents" to be always running. We had those in PIM and in digikam. Perhaps, now would be a good time to revise that? I'm not aware of the digikam code base, but it might be simpler to just read and write tags from the file system directly. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #22 from Vishesh Handa <[hidden email]> --- (In reply to comment #21) > (In reply to comment #20) > > We have our own database so the demon is needed to sync to the digikam > > database when digikam is not running, and a file is changed. > > Hm, is the modification date touched when the xattr is edited? > > Hi, I edited xattr (user.xdg.comment and user.baloo.rating) with the > setfattr command and with a little java app. Result: The modification date > is not touched. The mtime does not change, but the ctime does - vlap:~ $ touch fook vlap:~ $ stat fook File: ‘fook’ Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 12h/18d Inode: 13395683 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ vishesh) Gid: ( 1000/ vishesh) Access: 2014-07-11 13:36:24.339823962 +0200 Modify: 2014-07-11 13:36:24.339823962 +0200 Change: 2014-07-11 13:36:24.339823962 +0200 Birth: - vlap:~ $ vlap:~ $ setfattr -n "user.baloo.rating" -v "4" fook vlap:~ $ stat fook File: ‘fook’ Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 12h/18d Inode: 13395683 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ vishesh) Gid: ( 1000/ vishesh) Access: 2014-07-11 13:36:24.339823962 +0200 Modify: 2014-07-11 13:36:24.339823962 +0200 Change: 2014-07-11 13:36:41.619823391 +0200 Birth: - I think you can use QFileInfo::created() to access it. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
Veaceslav Munteanu <[hidden email]> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |CONFIRMED --- Comment #23 from Veaceslav Munteanu <[hidden email]> --- I decided to simplify a little the entire nepomuk/baloo thing. Since digiKam database and metadata can be out of sync, I suggest to extend read/write metadata options to also read and write using Baloo. This will reduce the need of having a Nepomuk service and would be much easier to maintain. But currently I have 2 problems: 1. digiKam image scanner do not detect changes when I add tag with Dolphin 2. I'm still looking for a tutorial for get/set with Ballo, CMake rules and API (I don't know, google does not return relevant searches for Baloo API or tutorial) -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #24 from Gilles Caulier <[hidden email]> --- Veaceslav, >digiKam image scanner do not detect changes when I add tag with Dolphin Image scanner must be triggered by media change notifier at least. Do you see this kind of information printed on the console when you tag file with Dolphin. If yes, image scanner must be not able yet to see Baloo event. But are you sure that Dolphin write tags in image metadata when Baloo info are changed ? >I'm still looking for a tutorial for get/set with Ballo, CMake rules and API (I >don't know, google does not return relevant searches for Baloo API or tutorial) If Dolphin is already ported to Baloo, you can find probably all relevant info in Dolphin code : https://projects.kde.org/projects/kde/applications/kde-baseapps/repository/revisions/5707e1e92c9c6ad320dbce5f9eeecb637f3e3312 Gilles Caulier -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #25 from Konrad Renner <[hidden email]> --- (In reply to Veaceslav Munteanu from comment #23) > 2. I'm still looking for a tutorial for get/set with Ballo, CMake rules and > API (I don't know, google does not return relevant searches for Baloo API or > tutorial) Hi, you don't need baloo for setting or getting the attributes from a file. The important part is, that the attributes are stored in a namespace as defined here: http://www.freedesktop.org/wiki/CommonExtendedAttributes/ baloo uses the following namespaces for attributes: - user.xdg.comment - user.xdg.tags => tags are separated with , - user.baloo.ratig => rating range is from 0 to 10 (9 is displayed as 4.5 Stars in dolphin) In "the near future" baloo will detect changes on this attributes on its own, see Bug 337602 for more information. I think the real cool part is, that every application which uses the freedesktop defined namespaces will be able to interpret those attributes and is not depened to another software or library. I don't know how to set the attributes with C/C++ but I have found these: - http://stackoverflow.com/questions/9979864/system-file-read-write-o-create-custom-metadata-or-attributes-extended - http://www.lesbonscomptes.com/pxattr/ -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #26 from Vishesh Handa <[hidden email]> --- I have to agree with Konrad Renner. As a previously said, it might be best NOT to use Baloo. Diadvantages - * Using Baloo introduces a large number of dependencies * The API still does not guarantee source compatibility in KF5 The whole point of moving to xattr was also so that other applications can use tags/ratings/comments without having to use Baloo. The primary AIM of Baloo is just to be a good file indexer + searching frameworking. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #27 from Veaceslav Munteanu <[hidden email]> --- wait... what? I already ported both sync digiKam->Baloo and Baloo -> digiKam for tags/comment/rating This means I must one more time drop everything to trash? Do Baloo have any signals which tells if an image is updated?(I need this to tell digiKam to rescan metadata...) -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #28 from Vishesh Handa <[hidden email]> --- On Sat, Aug 9, 2014 at 8:28 PM, Veaceslav Munteanu < [hidden email]> wrote: > *Comment # 27 <https://bugs.kde.org/show_bug.cgi?id=332665#c27> on bug > 332665 <https://bugs.kde.org/show_bug.cgi?id=332665> from Veaceslav > Munteanu <[hidden email]> * > > wait... what? > > I already ported both sync digiKam->Baloo and Baloo -> digiKam for > tags/comment/rating > > This means I must one more time drop everything to trash? > > the API. Minor. > Do Baloo have any signals which tells if an image is updated?(I need this to > tell digiKam to rescan metadata...) > > When someone changes the tag/rating/comment? We have a file monitor. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #29 from Veaceslav Munteanu <[hidden email]> --- File monitor is not quite flexible. In old nepomuk implementation we could register a listener for tags, comments and rating and images. Adding few thousand of urls in filemonitor at each digiKam start-up will not scale at all... Marcel, Gilles, I sucessfully integrated read/write with metadatahub and imagescanner, but I don't know how to keep baloo <-> digiKam in sync when is off... even when It is on, might be a problem if I don't find a way to get an universal signal... Should I let the user to sync manually through read/write metadata? -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #30 from Veaceslav Munteanu <[hidden email]> --- I already implemented read/write and all necessary switches in digiKam. But extended atributes are very volatile. If I disable write support, each metadata update simply destroy all existing extended attributes... -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #31 from Vishesh Handa <[hidden email]> --- (In reply to Veaceslav Munteanu from comment #30) > I already implemented read/write and all necessary switches in digiKam. > > But extended atributes are very volatile. If I disable write support, each > metadata update simply destroy all existing extended attributes... Could you please elaborate? The metadata update destroys all existing extended attributes? -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #32 from Veaceslav Munteanu <[hidden email]> --- yes, when I enable write to baloo, tags, comments and rating is updated. If I disable it, and trigger write metadata, the image is empty: no rating, no comment, no tags.. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #33 from Gilles Caulier <[hidden email]> --- Vishesh, Any progress here to help Veaceslav to complete Baloo digiKam interface ? Thanks in advance Gilles Caulier -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #34 from Vishesh Handa <[hidden email]> --- @Veaceslav: Could you give me a specific test case for me to reproduce it and fix it. Perhaps it would be simpler to just look at the code? The code is in baloo/src/file/lib/filemodifyjobtest.cpp. The code is *quite* simple. I'll be happy to answer any questions. Is there anything else you require? We do not plan to add more facilities in the file monitor for informing clients about what exactly changed. It's too expensive. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #35 from nucleo <[hidden email]> --- Is this bug figed in 4.3.0? -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #36 from nucleo <[hidden email]> --- Here message when compiling 4.3.0: -- Baloo libraries found.................... YES (optional) -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #37 from Gilles Caulier <[hidden email]> --- Partially. See Veaceslav comments for details. It still some work to do i think... Gilles Caulier -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #38 from nucleo <[hidden email]> --- So, can it be already enabled at comile time or better to disable baloo in 4.3.0? -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
In reply to this post by nucleo
https://bugs.kde.org/show_bug.cgi?id=332665
--- Comment #39 from Veaceslav Munteanu <[hidden email]> --- @Vishesh, in older Nepomuk Api, I was able to register in ResourceMonitor which type of resource I want to monitor. I used to register: comments, tags, ratings and images. what I really need from Baloo is signalFileMetadatachanged(Kurl file), so I can also trigger it in digiKam. At least, if filemodifyjob could register a folder path, that would be much better. If it's to expensive to fire a signal when Baloo register a change.... well there is nothing more I can do to integrate better with digiKam except basic read/write on request. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |