Papers to Bookends export script

Users asking other users for AppleScripts that work with Bookends.
Thompson
Posts: 7
Joined: Thu Oct 12, 2017 4:35 am

Re: Papers to Bookends export script

Post by Thompson » Fri Oct 20, 2017 3:58 am

Hello Matthias,

Ah, I missed the readme. The script works perfectly. You are right about the scripting support in Papers. I have already used some of your previous scripts succesfully. They have been a big help in automating my note taking. Thanks again!
-Juha

KMJvet
Posts: 1
Joined: Wed Mar 28, 2018 4:28 pm

Re: Papers to Bookends export script

Post by KMJvet » Wed Mar 28, 2018 5:15 pm

Is it possible that something about the script trying to rename pdf files causes problems when files would end up having the same name as a file alread in the Attachment folder? Most of the time the exports work fine for me. But sometimes they seem to end up with the wrong PDF attached.
thanks

jamiehatzis
Posts: 16
Joined: Fri Aug 10, 2018 7:14 pm

Re: Papers to Bookends export script

Post by jamiehatzis » Sat Aug 11, 2018 10:05 am

Hi. Very new user to Bookends. I purchased and downloaded Bookends and read the online instructions on SonnySoft for exporting Papers collections/library to Bookends. I originally exported the references to the iCloud folder which is where my library lives on Bookends - I checked the cloud drive and saw the PDFs were there. I then did the import command on the Bookends side and got a message that said Papers did not send papers (or something similar). I then thought maybe I exported to the wrong folder so I found the "default attachment" folder on the local disk and re-ran the export command within Papers, confirmed the PDFs were in fact in that folder and then ran the import command within Bookends - all consistent with the instructions posted by Bookends. I got the same error message. I am using Papers 3. What am I missing????

Jon
Site Admin
Posts: 8345
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Papers to Bookends export script

Post by Jon » Sat Aug 11, 2018 10:12 am

First, your Bookends library should not be in the iCloud folder. If it is, get it out of there. PDFs can go there, not the library.

Second, "followed the instructions" is too vague. There are instructions on our site for transferring from Papers to Bookends in two different ways -- using AppleEvents vs. exporting/importing. Which did you use? Just to be sure, here's a link to the methods for getting references from Papers 3 into Bookends.

https://www.sonnysoftware.com/bookends/ ... mport.html

If you get an error message please post exactly what it says.

Jon
Sonny Software

jamiehatzis
Posts: 16
Joined: Fri Aug 10, 2018 7:14 pm

Re: Papers to Bookends export script

Post by jamiehatzis » Sat Aug 11, 2018 4:02 pm

By library I meant PDFs… I submit the instructions I followed and for which you also directed me (one and the same) appear to be unclear. You note via Apple script or export/import. What’s missing is for those of us who are unfamiliar with Apple scripts ie how to use them. I’m thinking I missed a step which is the actual script itself. I need step by step instructions. If you need I can screenshot the error message, but I have a hunch that if I get instructions for the script then I may be ok

Jon
Site Admin
Posts: 8345
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Papers to Bookends export script

Post by Jon » Sat Aug 11, 2018 4:47 pm

If you meant the AppleScripts posted to this thread, they were submitted by a third party (msteffens) and he'd be the one to answer any questions about them. If you follow the instructions posted on our web site, the there is nothing for you to know except what is stated there -- the scripting is built into Bookends. All you have to do is choose the menu File -> Import References -> From Paper 3 (while Papers 3 is running). Yes, I need more information about the error message -- you should write to support@sonnysoftware.com and send the image as an attachment. This is really an issue for tech support, not the forum.

Jon
Sonny Software

P.S. You don't need AppleEvents to import from Papers 3 at all. In Papers 3, export the references as a "EndNote XML Library" file. Then in Bookends, import that file (I would drop the file onto the Bookends library window to do that, but you could also use the File -> Import References -> From File Or Clipboard.

Wagenmann
Posts: 5
Joined: Thu Nov 08, 2018 11:31 am
Location: Germany

Re: Papers to Bookends export script

Post by Wagenmann » Tue Nov 13, 2018 2:14 pm

Matthias! Your script is perfect - it saved me lots of time and effort and really motivated me to invest more time and effort into Bookends!
Martin

msteffens
Posts: 31
Joined: Thu Jul 19, 2007 10:04 am
Location: Germany
Contact:

Re: Papers to Bookends export script

Post by msteffens » Tue Nov 13, 2018 4:34 pm

Hi Martin,

that's great to hear, and many thanks for the feedback!

Best, Matthias
Wagenmann wrote:
Tue Nov 13, 2018 2:14 pm
Matthias! Your script is perfect - it saved me lots of time and effort and really motivated me to invest more time and effort into Bookends!

mber
Posts: 2
Joined: Wed Dec 19, 2018 9:33 pm

Re: Papers to Bookends export script

Post by mber » Thu Dec 20, 2018 7:06 pm

Unfortunately, these scripts are no longer available. Any chance of a re-upload? I could really use these.

mber
Posts: 2
Joined: Wed Dec 19, 2018 9:33 pm

Re: Papers to Bookends export script

Post by mber » Thu Dec 20, 2018 7:07 pm

Thompson wrote:I have feeling that this is not very easy to accomplish because Papers 3 has proprietary PDF reader, which doesn't translate well to other programs.
msteffens wrote:Papers 3 is fairly scriptable and also offers access to individual annotations via its scripting interface. So IMO this actually offers more flexibility than just having annotations baked into the PDF (which Papers also offers on export) since you can create all kinds of export workflows for your annotations. Here's some examples (which I hope to also move to the above-linked "mac-scripting" repo):
Matthias
Referring to these ones specifically.

msteffens
Posts: 31
Joined: Thu Jul 19, 2007 10:04 am
Location: Germany
Contact:

Re: Papers to Bookends export script

Post by msteffens » Fri Dec 21, 2018 6:17 am

Hi mber,
mber wrote:
Thu Dec 20, 2018 7:06 pm
Unfortunately, these scripts are no longer available. Any chance of a re-upload? I could really use these.
Sorry for the trouble, the scripts are still there and I've updated the links to the last remaining domain that still works:
Next year, I'll hopefully find time to polish & better document these scripts and upload them to my own repo.

Matthias

ivirshup
Posts: 2
Joined: Fri Jan 11, 2019 1:22 am

Re: Papers to Bookends export script

Post by ivirshup » Tue Jan 15, 2019 3:40 am

Thanks for the great export script!

Just here to report a little modification I made. I like having my library sorted in reverse chronological order of when I added it, but couldn't set the "Date Added" field on import. I was able to work around this by setting papers to sort by date added, then running the script with the line:

Code: Select all

set selectedPubs to reverse of selectedPubs
added under this line in the script. While all papers were added while the script ran, at least they're in the right order.

pcn
Posts: 1
Joined: Sat Jul 13, 2019 8:04 pm

Re: Papers to Bookends export script

Post by pcn » Sun Jul 14, 2019 11:20 am

Dear Matthias Steffens

I am fleeing Papers3, specifically 3.4.20 on MacOS10.14.5. Jon referred me to you about the problem of migration to Bookends.

First I should outline my current workflow:

I have several book manuscripts in LaTeX. Currently I have one huge Papers3 database for all of the books. From time to time I export a BibTeX file from Papers3 and run one of the LaTeX book MSS. But the Papers3 database is the definitive one, not the BibTex file.

I would like to migrate my Papers library with all its metadata and attached articles and their supplements. It is critical that the BibTeX citekeys generated by Papers remain unchanged, so that my books will still compile without an enormous conversion. (However, I have not made any annotations on the PDF files in Papers, so I'm not worried about whether annotations transfer.)

I launched Bookends in trial mode (unregistered). (If I can successfully import from Papers3 I'll buy it.)
I followed advice here:
https://www.sonnysoftware.com/bookends/ ... mport.html
I used the first method (for Papers3).

Specifically I made a test folder in Papers3 with just two articles and their PDFs. One of the article also had a supplement, so in all there were total of three PDF files.
• In MacOS System Preferences > Privacy > Privacy I gave Bookends disk access.
• In Papers 3, I made sure Preferences -> Library -> "Rename files in library folder" is checked.
• I selected my test folder.
• I used File -> Export PDF Files and Media, and in the resulting Save Dialog clicked the Option button and made sure that "Include annotations" is checked.
• I Exported the PDFs to the Bookends default attachment folder (not a subfolder).

In Bookends.
• I used File -> Import From Papers 3
• When asked, I gave Bookends permission to open and use Papers3.
I got a popup saying "References were not sent by Papers3". Jon helped me to understand that this means "Papers3 failed to send info." Perhaps you have encountered this situation and know what to do.

I also tried the second method given on the web site above (Endnote XML export). However, I found that Papers does not include its BibTeX citekeys in the resulting XML file, so of course Bookends cannot find them. That would be a big problem for me.

Jon pointed me to this forum where I see that you have an alternative script to accomplish the migration. Before I try it, I wanted to ask whether I am doing anything obviously wrong, and if not, then whether you think your script would succeed.

Many thanks Phil N

msteffens
Posts: 31
Joined: Thu Jul 19, 2007 10:04 am
Location: Germany
Contact:

Re: Papers to Bookends export script

Post by msteffens » Wed Jul 17, 2019 6:02 pm

Hi Phil. Sorry for the late reply, I somehow didn‘t get the post notification.

From your description I don’t think you‘ve done anything wrong.

I‘m wondering whether the new restrictions with running AppleScripts in macOS Mojave (10.14) somehow cause these issues.

In any case, I think that my script is worth trying. You could just try it with your little test folder of two publications & PDFs.

However, please note that the script was written before macOS Mojave and as such doesn‘t deal with the automation sandboxing introduced there (and unfortunately, I haven‘t been able to address this until now). This means that you likely can’t use the downloadable .app version of my script but would instead need to copy the script code into a new ScriptEditor.app window, and run it from there. Let me know if you have further questions or if you get stuck!

Matthias

Post Reply