GNOME Bugzilla – Bug 472766
Include tags in Web Gallery export
Last modified: 2018-07-12 00:05:02 UTC
Gallery2 has support for keywords. F-Spot has support for tags. Gallery2 keywords and F-Spot tags seem roughly equivalent. Ideally, exporting from F-Spot to Gallery2 would therefore preserve the F-Spot tags as keywords.
Yeah I'm missing that, too.
Created attachment 97437 [details] [review] export-tags-as-keywords-to-g2.patch I wrote all of the needed code for this, but sadly it's not working. Don't laugh :) The problem must be in this line added by me: client.Add ("auto_rotate", autorotate ? "yes" : "no"); + client.Add ("extrafield.keywords", keywords); client.Add ("userfile", new FileInfo (path)); (the code is a bit different, but "keywords" is correctly set and the if is executed. Almost similar applies to v2 of the protocol.). According to http://codex.gallery2.org/Gallery_Remote:Protocol#add-item the syntax should be correct. I've sniffed the HTTP POST and the data is passed correctly. I'm using G2.2.3 with Remote 1.0.9. If you want to try the patch yourself here it is.
Created attachment 97461 [details] [review] export-tags-as-keywords-to-g2.patch Fixed version. I've found out what was wrong: Gallery Remote protocol doesn't support keywords upload! Nice, isn't it? Luckily I've found this thread http://gallery.menalto.com/node/60370 with a patch for that. So if you want to use this patch for F-Spot you will also need to patch modules/remote/GalleryRemote.inc on your G2 installation with the following code: # diff -Naur GalleryRemote.inc.ORIG GalleryRemote.inc --- GalleryRemote.inc.ORIG 2007-10-19 08:39:58.000000000 +0200 +++ GalleryRemote.inc 2007-10-19 08:58:39.000000000 +0200 @@ -563,6 +563,7 @@ $title = isset($form['caption'])?$form['caption']:NULL; $summary = isset($form['extrafield.Summary'])?$form['extrafield.Summary']:NULL; $description = isset($form['extrafield.Description'])?$form['extrafield.Description']:NULL; + $keywords = isset($form['keywords'])?$form['keywords']:NULL; /* * Don't use uploaded files, because the framework cannot safely copy them. @@ -584,6 +585,12 @@ $tmpFile, basename($itemName), $title, $summary, $description, $mimeType, $parentId); + //set keywords + list($ret, $lockId) = GalleryCoreApi::acquireWriteLock($newItem->getId()); + $newItem->setKeywords($keywords); + $status=$newItem->save(); + GalleryCoreApi::releaseLocks($lockId); + /* Get rid of the tmp file if necessary */ if ($needToDeleteTmpFile) { @$platform->unlink($tmpFile); Anyway, it seems that keywords will be left in favour of tags usage in 2.4. There seems to be a tags module already, which will be included into the default installation in 2.4.
Created attachment 99589 [details] [review] folder-gallery-export-tag-icons.patch Fixed minor aesthetic issues, like function description in the gui. The problem reported by Bengt (dropping tags on resized export) is another issue and will be fixed in another bug. I'll update bug summary to better reflect the function.
wrong bug, sorry for Comment #4.
I've been fidling with Gallery2 export as well, and it seems to me the protocol is case sensitive. extrafield.description doesn't work, extrafield.Description does work. Please also mind there is code for GalleryV1 and GalleryV2. Changing one probably won't affect the other.
F-Spot has moved to https://github.com/f-spot/f-spot/issues If this Bugzilla ticket is still valid in a recent version of F-Spot, please feel free to post this topic as a ticket in the F-Spot project on GitHub. Closing this report as WONTFIX as part of Bugzilla Housekeeping as we are planning to shut down GNOME Bugzilla in favor of GNOME Gitlab.