-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinfo.plist
158 lines (151 loc) · 3.96 KB
/
info.plist
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bundleid</key>
<string>ruby-alfred-template</string>
<key>connections</key>
<dict>
<key>0B72B508-D1B2-4579-BFF4-17BDE20F7646</key>
<array>
<dict>
<key>destinationuid</key>
<string>14DEBC1D-4426-4BF4-83D5-ECA8F531F686</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
<key>14DEBC1D-4426-4BF4-83D5-ECA8F531F686</key>
<array>
<dict>
<key>destinationuid</key>
<string>42D05639-3F0F-4760-8214-317167E4173D</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
</dict>
<key>createdby</key>
<string>Duane Johnson</string>
<key>description</key>
<string>A starting place for developing other Ruby scripts in Alfred</string>
<key>disabled</key>
<false/>
<key>name</key>
<string>Ruby Script Workflow Template</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>argumenttype</key>
<integer>1</integer>
<key>keyword</key>
<string>test</string>
<key>withspace</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.input.keyword</string>
<key>uid</key>
<string>0B72B508-D1B2-4579-BFF4-17BDE20F7646</string>
</dict>
<dict>
<key>config</key>
<dict>
<key>escaping</key>
<integer>4</integer>
<key>normalisation</key>
<integer>1</integer>
<key>script</key>
<string># Put this init script directly into the Alfred script window and
# it will load main.rb with console logging enabled for Ruby exceptions
ENV['GEM_PATH'] = File.join(Dir.pwd, 'ruby-1.8')
# Provide a facility to log messages to Console.app:
def console_log(msg)
escape = proc{ |m| m.gsub("'", "'\\\\''") }
`logger -t 'Alfred Workflow' '#{escape[msg]}'`
end
# Yay! A way to debug Alfred scripts. You can use either method:
# raise "I need to explain how this happened…"
# OR
# Alfred.log "parachutes away!"
#
# To see the messages, open up Console.app
def load_ruby_file(filename)
ruby_code = IO.read(filename)
eval(ruby_code, binding, File.expand_path(filename))
end
begin
# Load the Alfred singleton object
load_ruby_file("alfred.rb")
Alfred = AlfredInit.new("{query}")
# Load your code from main.rb:
load_ruby_file("main.rb")
rescue Exception => e
slice = -1
# Ignore final 2 lines of backtrace that always come from this file
slice = -3 if e.backtrace.size > 2
bt = e.backtrace[0..slice].join("\n ")
console_log "#{e.message} (#{e.class}) [query: {query}]\n " + bt
end</string>
<key>type</key>
<integer>2</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>14DEBC1D-4426-4BF4-83D5-ECA8F531F686</string>
</dict>
<dict>
<key>config</key>
<dict>
<key>lastpathcomponent</key>
<false/>
<key>onlyshowifquerypopulated</key>
<true/>
<key>output</key>
<integer>0</integer>
<key>removeextension</key>
<false/>
<key>sticky</key>
<false/>
<key>text</key>
<string>{query}</string>
<key>title</key>
<string>Ruby Script</string>
</dict>
<key>type</key>
<string>alfred.workflow.output.notification</string>
<key>uid</key>
<string>42D05639-3F0F-4760-8214-317167E4173D</string>
</dict>
</array>
<key>readme</key>
<string></string>
<key>uidata</key>
<dict>
<key>0B72B508-D1B2-4579-BFF4-17BDE20F7646</key>
<dict>
<key>ypos</key>
<real>130</real>
</dict>
<key>14DEBC1D-4426-4BF4-83D5-ECA8F531F686</key>
<dict>
<key>ypos</key>
<real>130</real>
</dict>
<key>42D05639-3F0F-4760-8214-317167E4173D</key>
<dict>
<key>ypos</key>
<real>140</real>
</dict>
</dict>
<key>webaddress</key>
<string>http://github.com/canadaduane/ruby-alfred-template</string>
</dict>
</plist>