Skip to content

Instantly share code, notes, and snippets.

tell application "Bookends"
tell front library window
set theIDs to get id of publication items of group item "Unlinked Attachments"
repeat with theID in theIDs
try
set myRefs to (publication items whose id is theID)
set myItem to first item of myRefs
set {theKey, thePath, theAuthor, theEditor, theTitle} to {citekey, path of attachment items, authors, editors, title} of myItem
if theAuthor = "" then set theAuthor to theEditor
set theRIS to format myItem using "RIS.fmt"