I want to automate the ingestion of a bunch of PDFs where I do have the PDFs themselves as files in a folder and in one accompanying CSV file some metadata to each PDF: URL, keywords, and a published date.
I want to import the PDFs into Devonthink and bring over the metadata:
For the URL I worked out I can put it in the com.apple.metadata.kMDItemWhereFroms field of the macOS file metadata
The published date carries over when I set the modified date of the PDF file to it.
How can I carry over the keywords to the Devonthink tags of the PDF ?
tell application id "DNtp"
if (selected records) is {} then return
set theKeywords to |kMDItemKeywords| of (get meta data of selected record 1)
end tell
Unless I’m overlooking something, that script does nothing pertinent. It sets a variable to the kMDItemsKeywords and then does nothing with that variable.