2011/06/01

Add keywords to many entries of BibDesk at the same time

The following AppleScript performs the above function:
tell application "BibDesk"
    set theSelection to the selection of document 1
    display dialog "Give the new keywords separated by commas:" default answer "" buttons {"Cancel", "OK"} default button 2
    set the newKeywords to the text returned of the result
   
    repeat with thePub in theSelection
        set oldKeywords to keywords of thePub
        if oldKeywords is "" then
            set keywords of thePub to newKeywords
        else
            set keywords of thePub to keywords of thePub & ", " & newKeywords
        end if
    end repeat
end tell

No comments: