Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with nc tags global #60

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

yekibud
Copy link

@yekibud yekibud commented Jun 14, 2020

A first iteration on integrating metadata with NC tags (refs #20). (Keep in mind that I haven't written a line of PHP for 15 years and I've never hacked on the NC code-base before - so please excuse any noob mistakes, and all pointers are welcome.)

This first iteration only supports IPTC Keywords and automatically extracts, creates and assigns tags for all NC user image files with a queued background job (upon nextcloud-metadata install or update). It also adds a file create/update hook for extracting/creating/assigning tags after initial installation.

This is the primary itch I have to scratch for image file/NC tag integration. But there are clearly more features that would support more users, such as:

  • persist personal settings to db table for more supported metadata properties
  • fetch db table/selected options for Hook
  • trigger queued job if "write tags for existing files?" personal setting selected
  • also trigger job when new metadata options selected

Rather than focus on those features at this time I would rather scratch my secondary itch, which is the fact that nextcloud-photos does not support sharing photos by tag - which it clearly should. With both nextcloud-photos and nextcloud-metadata updated for both features, we would have a complete solution for a major use case for users who manage their photos with IPTC Keywords (such as with Shotwell), and then like to share photos based on those tags.

Thoughts?

@yekibud
Copy link
Author

yekibud commented Jun 14, 2020

Created a related issue in nextcloud/photos#360

@yekibud
Copy link
Author

yekibud commented Jun 17, 2020

Well, @gino0631 , you can probably go ahead and close this PR, unless you want any of the changes, since I just ran into a bit of an upstream wall (see nextcloud/photos#360).

The main use-case/itch I have to scratch is using image metadata to organize photos and subsequently share these collections. It turns out there is a sufficient solution using Piwigo synchronized with NC file storage, so I think I'm going to go with that for now and drop work on NC photos.

@Bugsbane
Copy link

This patch would be incredibly useful to anyone using other tools with the photos in Nextcloud. Personally I would like to have Photoprism automatically tag people, places etc in my photos, but Nextcloud just ignores all the tags created. Others use photomanagement apps and the tagging features now in every major operating system (Windows, Mac and Linux). Even if I tag something in Nextcloud, download and reupload, all of the Nextcloud tags disappear. This wouldn't happen if NC added it's tags also to the IPTC keywords and this patch was applied.

I can't speak to the quality of the code. It would just be such a huge shame if such a useful feature -with code written for it no less - got thrown out just because no one looked at merging it.

@gino0631
Copy link
Owner

The proposed patch creates Nextcloud tags from Metadata Keywords, it doesn't add Nextcloud tags to picture metadata. Also, I wouldn't be sure that doing the update in a background job is a good idea because of the performance reasons. Otherwise, the idea looks good.

@maksymov
Copy link

any news with this?

@gino0631
Copy link
Owner

@maksymov thanks for the ping, no news so far unfortunately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants