Support for optional external metadata file for images#139
Conversation
IPTC data is slowly fading and proper editors are not easy to find these days, so I decided to add support for external metadata files:
###### USING AN EXTERNAL DATA FILE FOR METADATA (TITLE, DESCRIPTION, KEYWORDS)
### Since IPTC data is a bit old fashioned I implemented a way to store the metadata
### in an external text file.
### This uses a .dat file named like this:
### If the image name is "2001_23.jpg",
### the datfile name is "2001_23.jpg.dat"
###
### The Datfile may have up three lines:
### Line 1: Title
### Line 2: Description
### Line 3: Keywords
###
### Example:
### -------file-------
### Portrait Of Foo's Mother
### Oil on drywall, 2015
### painting grafitti
### ------------------
|
The change does only kick in if there is a .dat file present. If not, the IPTC data will be used as before. |
|
That is an interesting concept. You are aware that Stacey already supports metadata stored directly in the page yml file? For example: title: title be here
filename.jpg:
title: Some title here
description: Some description here
another-image.jpg:
title: Some title here
description: Some description hereNot saying this is better than your method, but I would imagine it requires less processing on server since it doesn't need to open files for each image in the page. |
|
Actually, I was not aware of it :) I am using this solution, as I am hosting a few pages for artists and this way I can let them edit the image and plain text files, send them over and simply drop them into the according directory. I will have a more thorough look at your method. The overhead for opening the text files is there, but will only happen if there is no exif data. And also it is being cached as far as I see. I will have to run a test with more files. Thanks! |
IPTC data is slowly fading and proper editors are not easy to find these days, so I decided to add support for external metadata files:
USING AN EXTERNAL DATA FILE FOR METADATA (TITLE, DESCRIPTION, KEYWORDS)