keywords from plain text file

Started by mike6789, March 12, 2019, 10:17:27 PM

Previous topic - Next topic

mike6789

Is it possible to automatically populate keyword fields using a text file e.g. the file has the filename of each image in a directory then a list of keywords to add to each of the files.
The reason for wanting to do this is that I have information in the description field that I want to turn into keywords and to add other information to create other keywords it depending on the text in the description field.

Mario

There is no feature in IMatch which imports keywords from text files.
It would be very hard to come up with something that works, e.g. to handle all the various formats, character set encodings etc. users would come up with.
Besides, I doubt that many people maintain keywords in text files flapping around on the hard disk. This is what metadata was invented for 30 years ago...

You can import metadata from CSV files, though.
If you produce a text file which has a format like (for example)

File Name;Keywords
c:\images\beach.jpg;motive|beach,sun,vacation
c:\images\car.jpg;motive|vehicle|car,trade show,company|Aston Martin

you can use the CSV import in IMatch (Import & Export panel) to automatically import the keywords from this file into the images.
Use ; as the column delimiter, , as the separator for repeatable tags (keywords in this case) and you're all set.

If you already have the information in the description or another metadata tag IMatch maintains for your files, you can use a Metadata Template  or the Metadata Mechanic App to copy the data into proper keywords.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mike6789

It sounds like the csv option is what I was thinking of.  Presumably it is possible to export all the metadata from a directory in a suitable format starting with filename such as c:\images\beach.jpg then in the csv file (turned into a spreadsheet) add a load of other columns which are generated from the contents of the description field, then read this back in to the metadata.

I have had a look through the various help sections relating to csv and metadata.  I was hoping to be able to separate out at least the first 1, 2, 3 words of the description field into separate keywords or similar but this does not seem to be possible. There is plenty on how to choose the number of characters from beginning or end but the words have different number of characters, words do have a space after them but I could not see how to use that (unless severable variables can be used together).
If I am reading the data out to spreadsheet then reading it back in the issue about selecting the words is less important as I can probably do that selection there.

The final thing about this selection is how to get appropriate data into Darwin core fields from the spreadsheet.

Mario

The CSV import is very powerful, especially if you have control over the creation process.
Why don't you split your description into keywords and then combine them into one column in the CSV, with a separator?
The CSV import in IMatch can then convert them into multiple keywords and import them easily.

Please understand that you will most likely fail with your undertaking with most cataloging or DAM tools. This is just too special and uncommon.
IMatch and it's powerful CSV import and variables give you at least a chance to get your description transformed into keywords.

Usually, this would be a job for a purpose-built IMatch app or script which understands your description format, parses it, cleans it, converts it into keywords and updates your database or outputs a properly formatted CSV file for IMatch to import. Any capable developer can implement this for you in a day or two.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook