libin (owner)

Fork Of

Revisions

gist: 62806 Download_button fork
public
Public Clone URL: git://gist.github.com/62806.git
Embed All Files: show embed
gist.scpt #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- Create a gist from the specified text or the contents of the selected file
--
-- Author: Brian Smith <bsmith@swig505.com>
 
using terms from application "Quicksilver"
 
on process text str
my growlRegister()
do shell script "echo '" & str & "' | /usr/local/bin/gist"
growlNotify("Gist Created!", "URL has been copied to clipboard")
end process text
 
on open _file
my growlRegister()
set _path to quoted form of the POSIX path of _file
do shell script "cat " & _path & " | /usr/local/bin/gist"
growlNotify("Gist created!", "URL has been copied to clipboard")
end open
 
end using terms from
 
using terms from application "GrowlHelperApp"
 
on growlRegister()
tell application "GrowlHelperApp"
register as application "Gist" all notifications {"Alert"} default notifications {"Alert"}
end tell
end growlRegister
 
on growlNotify(grrTitle, grrDescription)
tell application "GrowlHelperApp"
notify with name "Alert" title grrTitle description grrDescription application name "Gist" icon of file path to me
end tell
end growlNotify
 
end using terms from