Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (21 sloc) 662 Bytes
#!/usr/bin/ruby
# Dropzone Destination Info
# Name: Pastie / Is.Gd
# Description: Sends the dropped text to the Pastie (pastie.org) service and minifies the resulting Pastie URL using Is.Gd.
# Handles: NSStringPboardType
# Events: Clicked, Dragged
# Creator: Paul William
# URL: http://entropytheblog.com
# IconURL: http://aptonic.com/destinations/icons/pastie-is.gd.png
def dragged
$dz.determinate(false)
$dz.begin("Performing Paste...")
pastie = Pastie::API.new
url = pastie.paste($items[0], 'plain_text', false)
url = IsGd.minify(url)
$dz.finish("URL is now on clipboard")
$dz.url(url)
end
def clicked
system("open http://pastie.org/")
end