How to use certain entries from a txt file as metadata?
So during my plugin development I stumbled on a problem.
I have created a txt file for each picture telling me who's in the photos. So the first column in the file shows all the names that appear in the photo.
I want to add those names into LR for each photo. I thought using them as metadata would be a good idea. Then I could let the user enter a name of some person and create a smart collection having all photos with that person in them.
But putting it into practice isn't that easy.
So I started with the classic metadata definition:
metadataFieldsForPhotos = {
{
id = 'Person',
title = 'Person'
dataType = 'string',
searchable = true,
browsable = true,
},
},
Now I don't know how to actually read only the column entries of the txt file and displaying all the names appearing in it. Another problem is that each photo has its own txt file in "nameofphoto.jpg.txt" So LR must know which txt file belongs to a photo.
I know my question isn't very specific but it would be great if someone could help...