#This is a work in progress: YMMV (I'm working on an AppleScript supplement, so stay tuned...)
This process will export all of the references from Sente to an EndNote XML library suitable for import into Papers3. With a little shell magic, it will also set up the PDFs
- Select all references in Sente
- File | Export | EndNote X | sente_endnote.xml
sed -i .bak 's/file:\/\//file:\/\/localhost/g' sente_endnote.xml
- Create a new papers library (if necessary)
- File | Import | EndNote XML Library | sente_endnote.xml
- Wait...
Library orgnization, syncing, etc...
This has been tested with Sente 6.7.7 into Papers 3.2.0
-
For some reason, potentially malformed file names in the EndNote export may fail to import. If that fails, the following procedure may work.
-
Install bibutils from http://sourceforge.net/p/bibutils/home/Bibutils/
-
Convert sente_endnote.xml to BibTex
endx2xml -x sente_endnote.xml > sente_endnote.xml.temp
xml2bib -sk -b sente_endnote.xml.temp > sente_endnote.bib
-
Replace file:// with file://localhost
sed -i .bak 's/file:\/\//file:\/\/localhost/g' sente_endnote.bib
-
Replace %20 with spaces
sed -i .bak2 's/%20/ /g' sente_endnote.bib
-
Import the BibTex into Papers3
-
I've got another suggestion, based on my experience that when there are multiple attachments, only the first one is imported by Papers3. I think that if the first one is a "webarchive" and the second a "pdf", you may want the pdf. This can be achieved by the following line:
sed -i .bak -E 's/<urls><related-urls><url><style[^>]*>([^<]+)webarchive<\/style><\/url><url><style[^>]*>([^<]+)pdf<\/style><\/url>/<urls><related-urls><url>\2pdf<\/url>/g' sente_endnote.xml
Similarly, for removing a first attachment with a http URL while there is a second one with a file URL:
sed -i .bak -E 's/<urls><related-urls><url><style[^>]*>(http[^<]+)<\/style><\/url><url><style[^>]*>(file:[^<]+)pdf<\/style><\/url>/<urls><related-urls><url>\2pdf<\/url>/g' sente_endnote.xml