Linking Bookends entries and pdfs in Devonthink

Some might find the following code useful. I have adapted the script for Bibdesk and Devonthink
(organognosi.com/how-to-conne … n-bibdesk/)
mentioned here: sonnysoftware.com/phpBB3/vi … =15#p15335
to work with Bookends and DTPO. First, the right reference in Bookends and the pdf in DT have to be selected. Then, the script has to be invoked (I do that with Alfred); it pastes the Bookends-URL into the URL-field of Devonthink and copies the internal reference of Devonthink to the Clipboard, then returns to Bookends. Unfortunately, I did not find a way to paste it automatically in a field of my choice, so this has to be done by hand.

Cheers

Nils

tell application "Bookends"
   try
      set theID to «event ToySRUID» "Selection"
   end try
end tell

tell application id "com.devon-technologies.thinkpro2"
   try
      set theRecord to the content record of think window 1
      set the URL of theRecord to ("bookends://sonnysoftware.com/" & theID) as text
      set theVerweis to reference URL of theRecord
      set the clipboard to theVerweis
   end try
end tell

tell application "Bookends"
   activate
end tell

Many thanks for this! I am also a Bookends user - and have bookmarked this for later use, when I get round to finalising my BE library…

Given that I haven’t tried it - just to be clear - is this going to establish a link of sorts between the PDF in DTP, and BE? Would this remove the need to import the DTP pdf into BE, by virtue of BE now having the URL link?

Apologies for the confusion - but it has been a long day - and the old brain is not working as it should! :blush:

Exactly. I paste the DT-link into one of the BE-fields (you can view the fields in the right-hand column). Clicking this link will open the respective pdf in DT. In DT clicking the BE-link will switch to BE to the respective record. The integration of DT and BE possible by this alternate linking is really very handy.

Hope this helps,

Nils

Fantastic! Many thanks Nils!

I believe there are some advantages in storing pdfs in the Bookends Attachment folder, especially in terms of finding citations and for this reason I have indexed my BE attachment folder from within DTP.
This means there is still only one copy, but the BE workflow is not disrupted.

Bob

In retrospect, this ^^ is what I should have done from the get-go…

As it stands, I have one academic database, which I duplicate in to DTP, and ‘index’ in to BE12… Has me doing a fair amount more work than what I should, but prefer having the DTP as a separate database, given my often moving my documents’ folders around, when the mood grabs me to reorganise everything… [I blame Hazel 3.0, and it chasing me to design the perfect, automated library system! :laughing: ]

Bought BE much later. Knowing what I do now - should have gone your route - leave BE’s attachment folder somewhere safe, and point DTP that way for indexing. Oh well - live and learn…

When I’m done with what I’m currently busy with, project-wise, will get round to making the necessary changes - but don’t want to risk upsetting anything now.

DTP can now import BE references citations ( author, date, title, plus abstract & keywords) and store as a BE text folder which is searchable. This works well for me with 900 references.

In general, you are probably right. However, this does not work for me because I work on different computers at home and in my office. My solution is to automatically synchronize my files at home with a removable disk which I use in my office. Perhaps sounds awkward, but has worked now for several years. The downside is that indexing files does not work as the place of storage depends on me being in my office or at home. So, it depends on your setup.

Cheers,

Nils

How does this work? When I try to index or import my BE library, DTPO shows me “unknown format” (which I would expect). Do you perhaps mean the BE annotation template?

Cheers,

Nils

Open BE, version 11.3.5 or later

Open DTP, go to file/import/references from bookends

More info: search the DTP user guide for Bookends

“References from Bookends: Imports multiple references from Bookends into a newly created group named “Bookends”. Already imported references are updated (requires Bookends 11.3.5 or later).”

Hope this helps

Bob

I did not know this. I think. Or maybe I did, but have since forgotten. Regardless, thanks for the reminder - will definitely have a looksie.

Many thanks! I did not know this trick. Now I have to think about how to put this to good use.

Cheers,

Nils

Bob - only got round to doing this tonight… Wow. Thanks for the tip - this could be potentially VERY useful!

[EDIT:]

I had a question about “updating” the new BE group that has been created… but then answered my own question, when I found the following in the DT manual:

“Already imported references are updated (requires Bookends 11.3.5 or later).”

Fantastic if this works like that!!

Nils - just thought I’d let you know that your script works a treat, and will indeed prove very useful going forward! Many thanks!

8)

Thanks for the feedback!

Nils