Export from Papers 3 sqlite database into Bookends?

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
schliep
Posts: 1
Joined: Mon Sep 27, 2021 7:40 am

Export from Papers 3 sqlite database into Bookends?

Post by schliep »

Hello everyone,

Papers 3 ceased working for me and none of my attempts to revive it seemed to get it back to a state where I could export all the data successfully. Switching to a new library and exporting that seemed to work temporarily—now it is back to crashing right after starting. The archive it wrote was corrupt and could not be imported into a fresh Papers 3 install in a virtual machine.

I played around with the Bookends Demo in the last two days and like the functionality and stability. I understand that the import from Papers 3 relies on AppleScript which is not an option for me.

I opened the Papers 3 sqlite database with sqlitebrowser and it seems that I could extract most of the bibliographic data, and the filenames for article PDFs easily. Writing a Python script to generate for example a BibTeX file with extra fields like PDF, or even the groups I created should be not too hard. I presume one can find Python libs for other bibliographic formats too.

Questions:
  • Has anyone seen software for processing the Papers 3 sqlite database directly?
  • What is the best format to generate or workflow to follow to get papers with PDFs into Bookends? In other words, is there a text format where I can specify the PDF to attach to a bibliographic item? It seems from the documentation that BibTeX is a no go (Pubmed PMID are not parsed?).
I searched on the web and through the documentation but did not find anything.

Thanks,
A.

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

Re: Export from Papers 3 sqlite database into Bookends?

Post by Jon »

I can't help with your first question, but as for the second please note that you can edit the import filters in the Import Filter Manager, or create a new filter with tags you define, to import the reference text file you generate. You can even have Bookends import one of the tagged fields into the attachments internal field (remember to import just the PDF name, not the full path name).

Jon
Sonny Software

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

Re: Export from Papers 3 sqlite database into Bookends?

Post by msteffens »

schliep wrote: Papers 3 ceased working for me and none of my attempts to revive it seemed to get it back to a state where I could export all the data successfully.
If I understand you correctly, you cannot use an AppleScript-based solution (such as that offered by Bookends or like my script) since Papers 3 crashes repeatedly for you?

If you have the possibility to try your copy of Papers 3 with an older macOS system, that would be worth trying. If not, depending on the size of your Papers 3 library, I could also try this for you (my copy of Papers 3 still runs successfully on macOS El Capitan and High Sierra).

Extracting data directly from the Papers 3 database may work but likely will be a lossy endeavour. If you want to follow this route, though, I think you could pursue the same logic as my script code. I.e., for each Papers record, generate a RIS file (which, from my experience works best), then import this together with the corresponding PDF file.

Alternatively, you could, for each Papers record, directly create a new publication via the Bookends scripting API (see here or here) and set any properties as needed. This also includes setting the attachments property.

Post Reply