After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 472766 - Include tags in Web Gallery export
Include tags in Web Gallery export
Status: RESOLVED WONTFIX
Product: f-spot
Classification: Other
Component: Tags
0.3.x
Other All
: Normal enhancement
: ---
Assigned To: F-spot maintainers
F-spot maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2007-09-02 08:54 UTC by Alex
Modified: 2018-07-12 00:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
export-tags-as-keywords-to-g2.patch (10.86 KB, patch)
2007-10-18 17:52 UTC, Maxxer
none Details | Review
export-tags-as-keywords-to-g2.patch (10.79 KB, patch)
2007-10-19 07:04 UTC, Maxxer
needs-work Details | Review
folder-gallery-export-tag-icons.patch (12.76 KB, patch)
2007-11-24 21:46 UTC, Maxxer
rejected Details | Review

Description Alex 2007-09-02 08:54:47 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.
Comment 1 Michał Sawicz 2007-10-15 21:51:50 UTC
Yeah I'm missing that, too.
Comment 2 Maxxer 2007-10-18 17:52:58 UTC
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.
Comment 3 Maxxer 2007-10-19 07:04:01 UTC
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.
Comment 4 Maxxer 2007-11-24 21:46:51 UTC
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.
Comment 5 Maxxer 2007-11-24 21:47:58 UTC
wrong bug, sorry for Comment #4.
Comment 6 Pascal de Bruijn 2008-07-20 14:32:32 UTC
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.
Comment 7 André Klapper 2018-07-12 00:05:02 UTC
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.