upload event comments to piwigo
Submitted by an unknown user
Link to original bug (#719041)
Description
---- Reported by shotwell-maint@gnome.bugs 2013-02-13 17:52:00 -0800 ----
Original Redmine bug id: 6381
Original URL: http://redmine.yorba.org/issues/6381
Searchable id: yorba-bug-6381
Original author: Norbert Preining
Original description:
When a new album is created on Piwigo, it would be nice to upload a event- comment into the description of the new album.
Related issues:
- related to shotwell - Feature #6305: facebook sharing: support for comments (Open)
---- Additional Comments From shotwell-maint@gnome.bugs 2013-05-01 11:38:00 -0700 ----
History
Comment 1
Updated by Jim Nelson 9 months ago
- Status changed from Open to Need Information
Norbert, one problem with this is that today Shotwell doesn't have a notion of a one-to-one mapping between events and Web service albums, nor does the publishers have any idea of uploading an event (they upload batches of photos).
Additionally, if we were to offer this for Piwigo, we would need to offer it for all Web services, at least those that support some notion of albums or containers.
Can you describe your vision for how this would work?
Comment 2
Updated by Norbert Preining 9 months ago
True. My idea was the following (I want to implement this, but I am not sure if I can manage it!)
Under the following conditions the event comment is exported:
- new album created
- all photos to be uploaded belong to the same event
Then it makes sense to upload the Shotwell event comment as the comment for the album.
Comment 3
Updated by Jim Nelson 9 months ago
This is entirely new behavior, and so we would need to inform (warn) users of this situation before Shotwell actually performed it. Since we've had complaints in the past about sending metadata to the server, we need to offer a checkbox so it can be disabled. So the process is more like this:
- If creating a new album,
- and all photos belong to same event,
- add checkbox to upload pane describing that this is going to happen,
- and if user checks true, then send up the comments.
Perhaps a better (more general) solution is to offer in the publish pane a Comments field that is pre-filled in with the Event comment, if the conditions above are true. This means users could create Piwigo albums and add comments regardless of the presence of Event comments, or even if the photos are all from the same Event. This strikes me as more useful than the above conditions, where everything has to line up just right to get album comments. What do you think?
Comment 4
Updated by Norbert Preining 9 months ago
Hi Jim,
yeah, your proposal looks fine (besides that the checkbox condition on uploading is not needed in this case). So to repeat, the publishing pane would have one additional text field "Event description" which is prefilled with the event comment if all photos to be uploaded belong to the same event and a new event is created. Right?
Comment 5
Updated by Jim Nelson 9 months ago
- Status changed from Need Information to Open
Yes, but I would use whatever terminology the web service uses. I don't know Piwigo that well, but I suspect they call their containers Albums, and so the text should read like that. And yes, in this scheme there's no need for a checkbox, although if the entry field is blank, no comment should be uploaded.
I suggest mocking-up the publishing pane so we can see what the widget layout looks like before diving into the code. Please feel free to ask us any questions you may have about the plugin interface and how to get the event comments from Shotwell.
Comment 6
Updated by Norbert Preining 9 months ago
Hi Jim,
thanks for your remark. Yes, that was my plan to make a mock-up of the publishing pane. I want to reorganize it a bit and try to simplify it. I will let you know.
Concerning getting the comments of events, that is not a problem, I implemented it. What is more a problem I guess is how to check whether all photos are part of the same event, i.e., get the event a photo is in.
But for now I will go for the mock-up, and later I will bother you with implementation questions.
Thanks
Norbert
Comment 7
Updated by Norbert Preining 9 months ago
- File screenshot_002.png added
Hi Jim,
here a first mock up. I have done the following:
- add a line below the "within category" called "Album comment" (could also be "Album description")
- changed the x-alignment of the text stuff to be on the right.
Reason for that was that for the "within category" and "Album comment" are not radio buttons, so
if I x-align them left (value = 0) then it looks strange under the radio boxes. If I align them
to the center (value = 0.5) that looks strange even more (that is the current look!).
What do you think?
Norbert
Comment 8
Updated by Norbert Preining 9 months ago
- File upload-event-comments-piwigo-20130215.patch added
BTW, here is a first patch that does half of the work, and which is by itself already interesting: namely allows adding a comment to a newly created category on piwigo.
Later on this textview might be pre-filled with the event-comment under the condition that all photos are from the same event.
Should we split these two steps or do you want everything in one go. Now it is already usable, I have uploaded several photos to a new category on piwigo and simply typed in some text to the comment field, which showed up on piwigo afterwards.
Thanks
Norbert
Comment 9
Updated by Jim Nelson 9 months ago
- Target version set to 0.14.0
I think the mockup looks fine, although "Album comment:" should be aligned with the top of the control, not its vertical sender.
Go ahead and send a patch for both steps, it's easier to evaluate the approach in its entirety that way.
Comment 10
Updated by Norbert Preining 9 months ago
Hi Jim,
Do you mean "Album comment" should be vertically aligned to the top line?
I tried that, but didn't get it working. Will try again ;-)
Thanks
Norbert
Comment 11
Updated by Norbert Preining 9 months ago
One more question, now that it comes up: I need to check the events of all the items to be published.
Now, I thought about in the PublishingPane to use
Spit.Publishing.Publishable[] publishables = publisher.get_host().get_publishables();
and then get from the publishables the event.
But how do I get an Event identifier or similar from each of the publishables?
Thanks
Norbert
Comment 12
Updated by Norbert Preining 9 months ago
- File 0001-upload-event-comments-to-piwigo-1-allow-editing-the-.patch added
- File 0002-upload-event-comments-to-piwigo-2-pre-fill-the-comme.patch added
- File upload-event-comments-piwigo-20130220.patch added
Hi Jim,
I have now implemented the missing feature and uploaded three patches.
-
0001-upload-event-comments-to-piwigo-1...
this patch adds only the infrastructure to add a textfield to the upload pane -
0002-upload-event-comments-to-piwigo-2...
this patch tries to deduce whether all photos are from the same event, and if yes, preseeds the above textbox with the event comment. -
upload-event-comments-piwigo-20130220.patch
the combined patch of the above two
One warning has to be said here: Since the publishing infrastructure has no access to the events in any way, I had to go the hard way and
- add one publishing parameter eventcomment
- compare all the eventcomments of all the publishable items
This works as far as I see now in all cases.
If we would have access to the Event datatype and structure, I could pass around only EventIDs and compare those, which would be better or more efficient.
Please let me know what you think, and if you want to see it implemented somehow differently.
Comment 13
Updated by Norbert Preining 9 months ago
Any news on that? Is there anything else necessary from my side?
Comment 14
Updated by Jim Nelson 9 months ago
- Status changed from Open to Review
- Keywords set to string-change
We'll take a look at this shortly, Norbert. Thanks for your patience!
Comment 15
Updated by Norbert Preining 9 months ago
- Status changed from Review to 5
Applied in changeset d1560421.
Comment 16
Updated by Lucas Beeler 9 months ago
- Resolution set to fixed
Comment 17
Updated by Norbert Preining 9 months ago
Thanks for review and inclusion, that is great.
Comment 18
Updated by Charles Lindsay 7 months ago
- Status changed from 5 to Fixed
--- Bug imported by chaz@yorba.org 2013-11-25 21:59 UTC ---
This bug was previously known as bug 6381 at http://redmine.yorba.org/show_bug.cgi?id=6381 Imported an attachment (id=262632) Imported an attachment (id=262633) Imported an attachment (id=262634) Imported an attachment (id=262635) Imported an attachment (id=262636)
Unknown milestone "unknown in product shotwell. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
Version: 0.14.0
Resolution: RESOLVED FIXED