Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derickfay/6386669 to your computer and use it in GitHub Desktop.
Save derickfay/6386669 to your computer and use it in GitHub Desktop.
-- original by Stephen Margheim
-- edited to write the clipboard by Derick Fay, 29 Aug 2013
-- edited to change link format to Cite Key Title
--establish a variable for the line feed (aka LF key)
set LF to ASCII character 10
--insert the MetaData for export to Evernote
set theText to "# BibDesk Sources Index w/ biblio links" & LF & "= !nbox" & LF & "@ BibDesk, Source List" & LF & LF & LF & "**List of Sources in BibDesk Group**" & LF & LF & LF
--get relevant information from selected items in BibDesk
tell application "BibDesk"
set these_items to selection of first document
if these_items is {} then error "Please select some content."
repeat with this_item in these_items
set CiteKey to cite key of this_item
set itemURL to "x-bdsk://" & CiteKey
set ItemName to CiteKey & " " & (title of this_item)
set FinalText to "[" & ItemName & "](" & itemURL & ")" & LF & LF
--append a Markdown formatted link for all selected items
--insert whichever link type you selected into WriteRoom
set theText to theText & FinalText
end repeat
end tell
set the clipboard to theText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment