Skip to content

Update gallery.html: read keywords from XPKeywords Exif tag#81

Open
jbsilva wants to merge 1 commit into
mfg92:masterfrom
jbsilva:xpkeywords
Open

Update gallery.html: read keywords from XPKeywords Exif tag#81
jbsilva wants to merge 1 commit into
mfg92:masterfrom
jbsilva:xpkeywords

Conversation

@jbsilva
Copy link
Copy Markdown
Contributor

@jbsilva jbsilva commented Jul 7, 2024

This change allows reading keywords from the XPKeywords Exif tag (0x9c9e).

The decodeUTF16LE function was added as Hugo does not parse UCS-2 encoded strings correctly.

Use keywords in filterOptions.

I made this as Hugo does not support reading IPCT and XMP tags (see gohugoio/hugo#8586), but I can easily convert them to XPKeywords using exiftool -overwrite_original "-XPKeywords<Keywords" *.jpg (the tags will be comma-separated).

@mfg92
Copy link
Copy Markdown
Owner

mfg92 commented Jul 19, 2024

I am not sure about merging this. How common is the problem you are trying to solve here?

@jbsilva
Copy link
Copy Markdown
Contributor Author

jbsilva commented Jul 20, 2024

For me, it's a must have. I imagine that other people would also benefit from it, so I opened the PR.

In fact, I found your module while searching for a tool that could display exif tags.
I'm not a fan of sidecar files and manage my keywords with Lightroom.

Anyway, I'm only using XPKeywords because Hugo cannot read XMP tags yet.
This might change very soon (see commit from 15 min ago: bep/hugo@d2bfe27).

@mfg92
Copy link
Copy Markdown
Owner

mfg92 commented Jul 22, 2024

Ok, I see. I would suggest just waiting until it is part of a Hugo release.
If for some reason it does not end up in Hugo, we can continue the discussion here.

BTW: I manage my image tags in Darktable, and have written a small plugin to automatically generate the sidecar files with all the necessary info on export.

@mfg92
Copy link
Copy Markdown
Owner

mfg92 commented Jul 30, 2024

@jbsilva Hugo 0.130.0 has been released with migration to the new EXIF library, does this help?

@mfg92 mfg92 added the question Further information is requested label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants