Dear all,
Perhaps someone can help me: I'm trying to export merely the currently
selected publications to a xml file from BibDesk (Version 1.3.21
(1525)). I can happily save all publications in the current document
with an applescript similar to this:
set theOutPFN to ((path to home folder) & "refs.xml" as string)
tell application "BibDesk"
set theBibDeskDocu to first document
save theBibDeskDocu in file theOutPFN as "EndNote XML"
display dialog "Saved" buttons {"OK"} default button {"OK"}
end tell
however, a script using the export command similar to the following,
what I actually want, does not work
set theOutPFN to ((path to home folder) & "refs.xml" as string)
tell application "BibDesk"
set theBibDeskDocu to first document
set thePubs to selection of theBibDeskDocu
export theBibDeskDocu to file theOutPFN using template "EndNote XML"
for (list thePubs)
display dialog "Saved" buttons {"OK"} default button {"OK"}
end tell
and fails with error message: Error -1728: BibDesk got an error: Can't
get file "<path>:refs.xml". This seems to me to be a bug in BibDesk,
since above syntax is accepted by the script editor and follows
BibDesk's AppleScript dictionary description of the export command.
There might be an alternative approach by using a custom template
<?xml version=\"1.0\" encoding=\"UTF-8\"? >
<xml>
<records>
<$publications><$endNoteString/></$publications>
</records>
</xml>
and then using the first AppleScript
save theBibDeskDocu in file theOutPFN as "My EndNote XML"
Having installed in the "Template" preference of BibDesk above template
as the main page under "My EndNote XML" for xml files. Above template
works fine, but again, it exports all records. AFAIK I would need a
"Collection modifier key" to export only the selection. Yet, BibDesk's
help on this topic does no list any. Does anyone know whether it is
possible to specify via above template such that only currently selected
publications are exported? An if this is possible, does anyone know how
the syntax of such a modification of this template would look like?
Thanks for your help and cooperation.
Sincerely yours,
Andreas Fischlin
--
________________________________________________________________________
ETH Zurich
Prof. Dr. Andreas Fischlin
Systems Ecology - Institute of Integrative Biology
CHN E 21.1
Universitaetstrasse 16
8092 Zurich
SWITZERLAND
[email protected]
www.sysecol.ethz.ch/staff/af
+41 44 633-6090 phone
+41 44 633-1136 fax
Make it as simple as possible, but distrust it!
________________________________________________________________________
* *
begin:vcard
fn:Andreas Fischlin
n:Fischlin;Andreas
org:ETH Zurich;Systems Ecology - Institute of Integrative Biology
adr:Universitaetstrasse 16;;CHN E 21.1;Zurich;;8092;SWITZERLAND
email;internet:[email protected]
title:Prof. Dr.
tel;work:+41 44 633-6090
tel;fax:+41 44 633-1136
tel;home:+41 44 492-4636
tel;cell:+41 79 221-4657
url:www.sysecol.ethz.ch/staff/af
version:2.1
end:vcard
------------------------------------------------------------------------------
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users