Re: [Bibdesk-users] Applescript for Bibdesk to Endnote X4 synchronisation

2011-11-01 Thread Fischlin Andreas
What's the difference what I provide since a long time?  
http://www.sysecol.ethz.ch/people/afischli/software

Regards,
Andreas


ETH Zurich
Prof. Dr. Andreas Fischlin
Systems Ecology - Institute of Integrative Biology
CHN E 21.1
Universitaetstrasse 16
8092 Zurich
SWITZERLAND

andreas.fisch...@env.ethz.chmailto:andreas.fisch...@env.ethz.ch
www.sysecol.ethz.chhttp://www.sysecol.ethz.ch

+41 44 633-6090 phone
+41 44 633-1136 fax
+41 79 221-4657 mobile

 Make it as simple as possible, but distrust it!




On 31/10/2011, at 18:51 , Peadar Grant wrote:

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#153; now supports Android#153; Apps
for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
___
Bibdesk-users mailing list
Bibdesk-users@lists.sourceforge.netmailto:Bibdesk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-users


--
RSAreg; Conference 2012
Save #36;700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Bibdesk-users mailing list
Bibdesk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-users


[Bibdesk-users] Applescript for Bibdesk to Endnote X4 synchronisation

2011-10-31 Thread Peadar Grant
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#153; now supports Android#153; Apps 
for the BlackBerryreg; PlayBook#153;. 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