Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save arkadyan/5936367 to your computer and use it in GitHub Desktop.
Save arkadyan/5936367 to your computer and use it in GitHub Desktop.
Make an OmniFocus inbox entry from a GitHub ticket you are viewing in Safari.
tell application "Safari"
set ticketPage to the document of the front window
set ticketUrl to the URL of ticketPage
set nameArray to my splitText((name of ticketPage), " · ")
set ticketTitle to the first item of nameArray
end tell
tell application "OmniFocus" to tell default document
make new inbox task with properties {name:ticketTitle, note:ticketUrl}
end tell
on splitText(someText, delimiter)
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to delimiter
set output to text items of someText
set AppleScript's text item delimiters to prevTIDs
return output
end splitText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment