Re: [Bibdesk-users] Merging Bibliographies?

2023-03-31 Thread David Craig
Andreas-
Thank you, I’ll experiment with that.


David




> On Mar 31, 2023, at 7:49 AM, Fischlin Andreas  
> wrote:
> 
> If the cite keys remain constant, i.e. serve as the primary key, then you can 
> clean up your new data base by using following AppleScript. Note, it 
> overwrites any existing older record with the imported one. If this is not 
> your case, you must not use this AppleScript.
> 
> (* 
>Name   Cleanup Duplicates
>
>PurposeIf importing into a BibDesk file updated records, which 
> have been imported previously, are obsolete, since outdated. Such duplicates 
> are deleted while retaining static group memberships.
>  
>   Remark  This script does also properly restore static group memberships 
> even in cases where duplicates are present in multiple numbers, i.e. not only 
> simple pairs (see variable 'youngestPub')
>  
>   Installation
>   Copy this script to folder '~/Library/Application 
> Support/BibDesk/Scripts/'
>   
>   Usage   Run this script by choosing corresponding menu command 
> from within BibDesk's Script menu.
>   
>   Remark  Alternatively you can also run this script from anywhere on 
> your system without any installation. 
>   
>   
>   Programmer  Andreas Fischlin, andreas.fisch...@env.ethz.ch 
> , http://www.sysecol.ethz.ch/staff/af/ 
>   building on script 'Select Obsolete Duplicates' 
> written by Christiaan Hofmann, as of 1.Sep.2009 and the previous, but 
> comparably very slow script 'Cleanup Duplicates' written by af
>
>   History 
>   
> af01.Sep.2009 v 1.0: First implementation (works with 
> BibDesk Version 1.5.2 (1879) under Snow Leopard OS X 10.6.4). In contrast to 
> its predecessor, this script does no logging to be as efficient as possible. 
> This algorithm is considerably more efficient than its much more complex 
> predecessor variant.
> af08.Oct.2011 v 1.0.1: Introducing core algorithm as a 
> separte routine to enable copy/paste maintenance (identical routines used in 
> scripts 'Cleanup Duplicates.scpt' and 'Fix PDF and URL Links.scpt'). 
> af15.Sep.2019 v 1.1: Enhancement: For a large library the 
> algorithm becomes very time consuming. I added therefore a case working only 
> within the set of currently selected pubs. This works also in the case when 
> called after an import, making the importing much more efficient.
> af8.Apr.2022 v 1.2: Enhancement: Adding routine 
> alertUserOfFailedDeletion to notify user when deletion of records failed
> 
> *)
> 
> 
> on run {}
>   CleanupDuplicates()
> end run
> 
> 
> -- IMPORTANT NOTE: The following routine is an identical copy as contained in 
> files 'Cleanup Duplicates.scpt' and 'Fix PDF and URL Links.scpt'. Make sure 
> the two copies are always kept identical.
> on CleanupDuplicates()
>   set theBibDeskDocu to document 1 of application "BibDesk"
>   tell document 1 of application "BibDesk"
>   set thePubs to selection
>   if (count of thePubs) = 0 then
>   -- get and sort all publications by cite key ensuring 
> that in any set of publications with the same cite key the youngest comes 
> first and the oldest, typically the only one of the set that is still member 
> of any static groups, comes last. To retain static group memberships we have 
> to ensure that such "membership info" is copied from the last to the first 
> publication of any set of publications with the same cite key (see vars 
> 'aPub', 'prevPub', 'youngestPub').
>   -- with a large library this functionality becomes 
> quite tedious and with BibDesk 1.7.1 under OS X 10.14.x (Mojave) it seems 
> that duplicates are no longer found with the menu command 'Database -> Select 
> Duplicates -> Only Duplicates'. Choosing this menu command results only in a 
> beep, despite the fact that duplicates (by cite key) are present and 
> correctly shown in red.
>   set thePubs to (sort (get publications) by "Cite Key" 
> subsort by "Date-Added" without ascending)
>   else
>   -- this part of the algorithm does only search for 
> duplicates for the currently selected publications regardless of the possible 
> presence of additional other duplicates in the data base or not. It finds for 
> every cite key within current selection a possibly matching publication in 
> the data base. Only the thus constructed set of publications is then fixed 
> for duplicates by keeping the younger record only. This helps to speed up 
> things considerably for large libraries, in particular when importing 
> potential duplicates is a relatively small set compared to the entire library.
>  

Re: [Bibdesk-users] Merging Bibliographies?

2023-03-31 Thread Fischlin Andreas
If the cite keys remain constant, i.e. serve as the primary key, then you can 
clean up your new data base by using following AppleScript. Note, it overwrites 
any existing older record with the imported one. If this is not your case, you 
must not use this AppleScript.

(* 
   Name Cleanup Duplicates
   
   Purpose  If importing into a BibDesk file updated records, which have 
been imported previously, are obsolete, since outdated. Such duplicates are 
deleted while retaining static group memberships.
   
Remark  This script does also properly restore static group memberships 
even in cases where duplicates are present in multiple numbers, i.e. not only 
simple pairs (see variable 'youngestPub')
   
Installation
Copy this script to folder '~/Library/Application 
Support/BibDesk/Scripts/'

Usage   Run this script by choosing corresponding menu command 
from within BibDesk's Script menu.

Remark  Alternatively you can also run this script from anywhere on 
your system without any installation.   


Programmer  Andreas Fischlin, andreas.fisch...@env.ethz.ch, 
http://www.sysecol.ethz.ch/staff/af/ 
building on script 'Select Obsolete Duplicates' 
written by Christiaan Hofmann, as of 1.Sep.2009 and the previous, but 
comparably very slow script 'Cleanup Duplicates' written by af
 
History 

  af01.Sep.2009 v 1.0: First implementation (works with 
BibDesk Version 1.5.2 (1879) under Snow Leopard OS X 10.6.4). In contrast to 
its predecessor, this script does no logging to be as efficient as possible. 
This algorithm is considerably more efficient than its much more complex 
predecessor variant.
  af08.Oct.2011 v 1.0.1: Introducing core algorithm as a 
separte routine to enable copy/paste maintenance (identical routines used in 
scripts 'Cleanup Duplicates.scpt' and 'Fix PDF and URL Links.scpt'). 
  af15.Sep.2019 v 1.1: Enhancement: For a large library the 
algorithm becomes very time consuming. I added therefore a case working only 
within the set of currently selected pubs. This works also in the case when 
called after an import, making the importing much more efficient.
  af8.Apr.2022 v 1.2: Enhancement: Adding routine 
alertUserOfFailedDeletion to notify user when deletion of records failed
  
*)


on run {}
CleanupDuplicates()
end run


-- IMPORTANT NOTE: The following routine is an identical copy as contained in 
files 'Cleanup Duplicates.scpt' and 'Fix PDF and URL Links.scpt'. Make sure the 
two copies are always kept identical.
on CleanupDuplicates()
set theBibDeskDocu to document 1 of application "BibDesk"
tell document 1 of application "BibDesk"
set thePubs to selection
if (count of thePubs) = 0 then
-- get and sort all publications by cite key ensuring 
that in any set of publications with the same cite key the youngest comes first 
and the oldest, typically the only one of the set that is still member of any 
static groups, comes last. To retain static group memberships we have to ensure 
that such "membership info" is copied from the last to the first publication of 
any set of publications with the same cite key (see vars 'aPub', 'prevPub', 
'youngestPub').
-- with a large library this functionality becomes 
quite tedious and with BibDesk 1.7.1 under OS X 10.14.x (Mojave) it seems that 
duplicates are no longer found with the menu command 'Database -> Select 
Duplicates -> Only Duplicates'. Choosing this menu command results only in a 
beep, despite the fact that duplicates (by cite key) are present and correctly 
shown in red.
set thePubs to (sort (get publications) by "Cite Key" 
subsort by "Date-Added" without ascending)
else
-- this part of the algorithm does only search for 
duplicates for the currently selected publications regardless of the possible 
presence of additional other duplicates in the data base or not. It finds for 
every cite key within current selection a possibly matching publication in the 
data base. Only the thus constructed set of publications is then fixed for 
duplicates by keeping the younger record only. This helps to speed up things 
considerably for large libraries, in particular when importing potential 
duplicates is a relatively small set compared to the entire library.
set theCitekeys to {}
repeat with aPub in thePubs
set aCiteKey to cite key of aPub
set end of theCitekeys to aCiteKey
end repeat
set n to 

Re: [Bibdesk-users] BibDesk 1.8.16

2023-03-31 Thread Luc Bourhis via Bibdesk-users
Hi,

thank you very much for the increase of the contrast of the count bubbles when 
the system is set up with reduced transparency.

Best wishes,

Luc J Bourhis


> On 22 Mar 2023, at 11:04, Christiaan Hofman  wrote:
> 
> The BibDesk development team is pleased to announce that a new version of 
> BibDesk, version 1.8.16, is now available.
> 
> We thank the users who have contributed to BibDesk development by sharing 
> their experiences with BibDesk, and testing nightly builds. 
> 
> This release can be obtained by selecting "check for updates" in the 
> "BibDesk" menu, visiting the Sourceforge downloads page at
> 
> https://sourceforge.net/projects/bibdesk/ 
> 
> 
> or by visiting the BibDesk home page at
> 
> https://bibdesk.sourceforge.io/ 
> 
> or by following the link below, which will begin immediate download:
> 
> https://sourceforge.net/projects/bibdesk/files/BibDesk/latest/download 
> 
> 
> For those interested follow the full release notes for this version.
> 
> Release notes for BibDesk version 1.8.16
> 
> Bugs Fixed
>   *  Don't always call Will Generate Cite Key script hook when importing
>   *  Do call Did Generate Cite Key script hook also when we don't change the 
> key
>   *  Always auto generate cite key when importing when pref is set, also when 
> a cite key was set
>   *  Make sure font preferences controls use the font panel
>   *  Increase contrast for count bubbles with reduced transparency
>   *  Support reduced motion accessibility option
> 
> ___
> Bibdesk-users mailing list
> Bibdesk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bibdesk-users

___
Bibdesk-users mailing list
Bibdesk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-users