> On 12 Oct 2021, at 15:42, Alexander,J <[email protected]> wrote:
>
> I was wondering if the following is possible to achieve with BibDesk’s
> scripting capabilities: I have a static group called “To read” that contains
> a number of entries which have PDFs attached as local files. I’d like to be
> able to automatically copy the attached PDFs for all entries in that group to
> a separate folder for later syncing with my iPad. Could anyone knowledgable
> about AppleScript please advise?
>
> Many thanks,
>
> Jason
Yes, that is possible. Both the (static) groups and linked files are scriptable.
For instance, you could try something like this:
tell application “Finder”
set theFolder to folder “Macintosh HD:Users:alexander:TargetFolder:"
end tell
tell application "BibDesk"
set theGroup to static group “To read” of front document
repeat with thePub in publications of theGroup
set thePub to contents of thePub
repeat with theFile in linked files of thePub
try
set theFile to (contents of theFile) as alias
tell application “Finder”
duplicate theFile to theFolder
end tell
end try
end repeat
end repeat
end tell
Written in Mail, and needs some extra validation for when groups or files do
not exist, or already exist in the target folder.
Christiaan
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users