1) Sort by cite key 2) Choose menu command "DataBase -> Select Duplicates by Cite Key" 3) Run the following AppleScript:
(*
Name Delete duplicates
Purpose If importing into a BibDesk file updated records,
which have been imported previously, duplicates need to be cleaned up.
This script deletes any duplicate by cite key record that has an older
Add-date.
Installation
Copy this script to folder '~/Library/Application
Support/BibDesk/Scripts/'
Usage In your frontmost BibDesk document sort by cite key and
choose menu command "DataBase -> Select Duplicates by Cite Key". Then
run this script by choosing corresponding menu command from within
BibDesk's Script menu. Of any duplicates, only the most recent record is
kept in the BibDesk document.
Remark Alternatively you can also run this script from anywhere on
your system without any installation.
Programmer Andreas Fischlin, [email protected]
http://www.sysecol.ethz.ch/staff/af/
History
af 01.Sep.2009 v 1.0: First implementation (works with
BibDesk Version 1.3.21 (1611)
under Leopard OS X 10.5.8)
*)
on run {}
tell application "BibDesk"
set theBibDeskDocu to first document
set thePubs to selection of theBibDeskDocu
end tell
if not thePubs is missing value then
set thePrevCiteKey to ""
set thePrevAddDate to ""
repeat with thePub in thePubs
tell application "BibDesk"
tell thePub
set theCiteKey to get cite key
set theAddDate to value of field "Date-Added"
end tell
end tell
if thePrevCiteKey is theCiteKey then
if thePrevAddDate comes after theAddDate then
-- display dialog theCiteKey & " added: " &
theAddDate & " prevAdded: " & thePrevAddDate
delete thePub
end if
end if
set thePrevCiteKey to theCiteKey
set thePrevAddDate to theAddDate
end repeat
else
beep
end if
end run
Andreas
Carlos Hernandez wrote:
Dear All,I have two BibTex files (.bib) and in one of them I updated some items (publications) while in the other I updated different items (publications). That is, the same publication may be updated in one file while not in the other.Is there a simple way to merge these two files and to keep the most recently updated records for each publication in the files?I'm looking forward your advice and hints. Best regards, Carlos ------------------------------------------------------------------------ ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart yourdeveloping skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now!http://p.sf.net/sfu/devconf ------------------------------------------------------------------------ _______________________________________________ Bibdesk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-users
-- ________________________________________________________________________ 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! ________________________________________________________________________ * *
<<attachment: andreas_fischlin.vcf>>
------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf
_______________________________________________ Bibdesk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-users
