Good Evening Everyone,

Although I use LaTeX and Bibdesk for as much of my publication output as 
possible, there are still times when I have to complete an academic document 
that includes references in Microsoft Word.  Seen as I have access to Endnote, 
I have put together a script to automate the transfer from Bibdesk to Endnote 
X4.  

Note that this script deletes everything in the Endnote database and re-creates 
it on every run, so do not make changes to the Endnote database unless you 
don't mind losing them.  I am working on a new version to do incremental 
updates, but it's still early in development.

Developers - please feel free to post this on the Bibdesk Wiki. 

Best regards,

Peadar.




Script follows below:



--- Script to pre-load Endnote from BibDesk
--- Peadar Grant 2009, updated 2011.

--- Start with an empty Endnote library
--- This applescript will save the Bibdesk bibliography as 
--- endnote XML and then will open Endnote,
--- delete all the references in your Endnote library
--- and populate it with your BibDesk references.

--- You need to set the three filenames:
--- bibdeskFile : your bibdesk file
--- exportFile : the interim file that's used to dump data
--- endnoteFile : your endnote library
--- ... and the filenames need to be specified
--- in applescript (as opposed to POSIX) format.

--- This has been tested to work with Endnote X4 for Mac only.

--- There seems to be a file access problem unless the applications
--- are both quit. 

set bibdeskFile to ((path to home folder as text) & 
"Documents:Bibliography:Bibliography.bib")
set exportFile to ((path to home folder as text) & 
"Documents:Bibliography:ExportedFromBibdesk.xml")
set endnoteFile to ((path to home folder as text) & 
"Documents:Bibliography:EndnoteLibrary.enl")


tell application "BibDesk"
        activate
        open bibdeskFile
        set theDoc to get first document
        save theDoc in exportFile as "EndNote XML"
        quit
end tell

tell application "Finder"
        set myXMLFile to open for access exportFile without write permission
        set refsToImport to read myXMLFile
        close access myXMLFile
end tell

tell application "EndNote X4"
        activate
        set myDB to open endnoteFile
        set res to find " "
        delete record res
        import refsToImport into myDB
        close myDB saving yes
        quit
end tell

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World™ now supports Android™ Apps 
for the BlackBerry® PlayBook™. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Bibdesk-users mailing list
Bibdesk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to