auto-populating "title" field from filename?

Users asking other users for AppleScripts that work with Bookends.
Post Reply
yzrzi
Posts: 2
Joined: Thu Jan 25, 2018 8:42 am

auto-populating "title" field from filename?

Post by yzrzi »

Greetings. I just migrated to BE from Papers3 (and like everyone else, I am now wondering what took me so long :wink:).

I successfully migrated more than 5,000 PDFs from papers3 to BE but I still have 2,000+ of them for which I cannot auto-recover their DOI. These 2,000+ entries exist as references in the BE library with no information in the corresponding record other than the name of the attachment.

However, I noticed that if I cut and paste the title into the "auto-complete" window, invariably I get a single hit in PubMed. So I was hoping to avoid doing two thousand repetitions of "select reference / select title / copy / open autocomplete form / paste / search / store" by leveraging the fact that the filename already contains the title I need to autocomplete the record.

Is there a script that I can use to populate the title of each of these 'empty' records from the filename of the attached reference? If not a script, something else that I could perhaps use?

Thank you!
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: auto-populating "title" field from filename?

Post by Jon »

I assume they had corresponding metadata in Paper 3? If so, when you imported the metadata (via EndNote XML export/import) the full reference should be there. Maybe I'm misunderstanding your setup, though. Please see this, if you haven't already. Papers 3 is the third reference manager discussed.

http://www.sonnysoftware.com/bookends/t ... mport.html

Jon
Sonny Software

P.S. There is a possibility that the watch folder might help you if you really need to get the metadata from the PDF, but let's see if that's not necessary, first.
yzrzi
Posts: 2
Joined: Thu Jan 25, 2018 8:42 am

Re: auto-populating "title" field from filename?

Post by yzrzi »

Thank you for the quick reply.

I did, in fact, follow the instructions for the migration from papers3 and the XML file had all 7,000 references in it. For 5,000 of them everything worked fine. But the other 2,000 seem to have a mind of their own. BTW, all 7,000 files are in the BE attachments folder as per the instructions.

I even tried to link by hand randomly selected BE library entries (one at a time), from among the 2,000, to the "local PDF" but invariably none of the suggested PDF 'choices' was the correct one. I even forced Spotlight to exclude all files from my home (~/) directory except for those in the BE attachments directory but it did not make any difference vis-à-vis the PDF choices.

On the other hand, cutting and pasting the title of the same randomly selected PDFs into the autocomplete form pulled a single Pubmed hit and it was the correct one every time. This is why I was hoping to go down the path of a script, or something along those lines, to fill the title field from the PDF's filename.
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: auto-populating "title" field from filename?

Post by Jon »

Please contact tech support, I want to clarify what you did and what you're doing. It seems to be you already have the reference but the PDF isn't being found. But I'm not sure.

support@sonnysoftware.com

Jon
Sonny Software
Post Reply