Use pastie.org with LaunchBar
Since a while, I’m having senile insomnia, so I thought, I should use it for good. One thing that always bugs me at work is the work with pastie (or any other paste-thing) because of the copy – paste – copy thing.
So I wrote a very little script to use it with LaunchBar.
What does it do? It takes your clipboard, pastes it to pastie and pastes the returned URL back into the clipboard..
Here is the script:
pastie.scpt
set pastieURL to "http://pastie.org/pastes"
try
set responseURL to (do shell script "curl http://pastie.caboo.se/pastes/create -H 'Expect:' -F 'paste[parser]=plaintext' -F 'paste[body]=" & (the clipboard) & "' -F 'paste[authorization]=burger' -s -L -o /dev/null -w '%{url_effective}'")
set the clipboard to responseURL
end try
Save this to “~/Library/Application Support/LaunchBar/Actions/” (works with LaunchBar 5) and it will detect it automatically. Type the name of your script and you’re done. So much for my insomnia :)
UPDATE: Just found out about Spark which let’s you define shortcuts for Apple Scripts – which is another nice way.