What I'd like to do is link the downloaded PDF attachments to the references by name -- the PDF files have names like "PMC5382433.pdf" that have a 1:1 relationship with a PMCID in the citations list.
When I try to link the local PDFs with the list of citations using the 'Find and Attach Local PDF' option, some PDF files fail to link and others link inappropriately to more than one citation. Is there any way to associate attachments with references by name instead of by scanning the contents of the PDF?
UPDATE: I tried solving this with Applescripting / Apple Events. I think I'm close, but not quite there. I can get a list of all the unique IDs in my reference library and extract the PMCID field value. The next step is to add an attachment to a record based on the PMCID. When I set the attachment field to the path of the file, Booeknds creates an attachment internally (as indicated by a paperclip next to the reference and an attachment not found indicator in the inspector). But Bookends can't find the file.
For a single record, I'm trying:
Code: Select all
set PMCID to «event ToySRFLD» uid given string:"user16" --user16 is bookends's location for PMCID
event ToySSFLD» uid given «class FLDN»:"attachments", string:"/path/to/file/dl/" & PMCID & ".pdf"
Thanks!
dave