-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.plist
130 lines (118 loc) · 2.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
<?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>io.github.searchmaven</string>
<key>connections</key>
<dict>
<key>863B2A89-6210-4F52-8155-262472C5ACBD</key>
<array>
<dict>
<key>destinationuid</key>
<string>1EC57E82-6BD9-42C3-9AAB-FB078B09B8C8</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
</dict>
<key>createdby</key>
<string>mumu@yfyang</string>
<key>description</key>
<string>Search http://search.maven.org/ Maven Center Repository Component</string>
<key>disabled</key>
<false/>
<key>name</key>
<string>Maven Repository Search</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>autopaste</key>
<true/>
<key>clipboardtext</key>
<string>{query}</string>
</dict>
<key>type</key>
<string>alfred.workflow.output.clipboard</string>
<key>uid</key>
<string>1EC57E82-6BD9-42C3-9AAB-FB078B09B8C8</string>
</dict>
<dict>
<key>config</key>
<dict>
<key>argumenttype</key>
<integer>0</integer>
<key>escaping</key>
<integer>63</integer>
<key>keyword</key>
<string>cmr</string>
<key>runningsubtext</key>
<string>Please Wait...</string>
<key>script</key>
<string>#!/usr/bin/python
#_*_ coding:UTF-8 _*_
#
# Copyright 2012-2013 by yfyang. All Rights Reserved.
import json
import urllib
import urllib2
import alfred
theQuery = u'{query}'
# theQuery = 'Spring'
theQuery = urllib.quote_plus(theQuery)
url = 'http://search.maven.org/solrsearch/select?q=%s&rows=20&wt=json' % theQuery
request = urllib2.Request(url)
req_open = urllib2.build_opener()
conn = req_open.open(request)
req_data = conn.read()
data = json.loads(req_data)
results = []
response = data['response']
for doc in response['docs']:
arg = doc['id']
group = doc['g']
artifact = doc['a']
version = doc['latestVersion']
zb = "%s:%s:%s" % (group, artifact, version)
item = alfred.Item({'uid': 1, 'arg': zb}, zb, arg,('cmp.gif', {'type': 'gif'}))
results.append(item)
xml = alfred.xml(results)
alfred.write(xml)</string>
<key>subtext</key>
<string>Maven Search With groupId or ArfactId</string>
<key>title</key>
<string>Maven Search</string>
<key>type</key>
<integer>3</integer>
<key>withspace</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.input.scriptfilter</string>
<key>uid</key>
<string>863B2A89-6210-4F52-8155-262472C5ACBD</string>
</dict>
</array>
<key>readme</key>
<string></string>
<key>uidata</key>
<dict>
<key>1EC57E82-6BD9-42C3-9AAB-FB078B09B8C8</key>
<dict>
<key>ypos</key>
<real>90</real>
</dict>
<key>863B2A89-6210-4F52-8155-262472C5ACBD</key>
<dict>
<key>ypos</key>
<real>110</real>
</dict>
</dict>
<key>webaddress</key>
<string>yfyang.github.io</string>
</dict>
</plist>