Forked from fractaledmind/Create Sources Index in TextMate from BIbDesk
Last active
December 22, 2015 00:08
-
-
Save derickfay/6386669 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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