Skip to content

Commit

Permalink
minor adjustments to imdb and yelp; regen index
Browse files Browse the repository at this point in the history
  • Loading branch information
nate-parrott committed Nov 12, 2014
1 parent c378131 commit 4bfe87b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion PluginDirectories/1/imdb.bundle/examples.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
imdb ~imdbquery(query here)
imdb ~imdbquery(query here)
search imdb for ~imdbquery(no country for old men)
2 changes: 1 addition & 1 deletion PluginDirectories/1/imdb.bundle/info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "imdb",
"displayName": "IMDB",
"examples": ["imdb Phantom of the opera"]
"examples": ["imdb Phantom of the Opera"]
}
9 changes: 5 additions & 4 deletions PluginDirectories/1/imdb.bundle/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

def results(parsed, original_query):
search_specs = [
["IMDB", "~imdbquery", "http://m.imdb.com/find?q="]
["IMDB", "~imdbquery", "http://m.imdb.com/find?q=", "http://imbdb.com/find?q="]

This comment has been minimized.

Copy link
@gschueler

gschueler Nov 12, 2014

Contributor

"imdbd.com" instead of "imdb.com"

]
for name, key, url in search_specs:
for name, key, mobile_url, url in search_specs:
if key in parsed:
mobile_search_url = mobile_url + urllib.quote_plus(parsed[key])
search_url = url + urllib.quote_plus(parsed[key])
return {
"title": "Search {0} for '{1}'".format(name, parsed[key]),
Expand All @@ -14,9 +15,9 @@ def results(parsed, original_query):
<script>
setTimeout(function() {
window.location = %s
}, 100);
}, 500);
</script>
"""%(json.dumps(search_url)),
"""%(json.dumps(mobile_search_url)),
"webview_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
"webview_links_open_in_browser": True
}
Expand Down
Binary file modified PluginDirectories/1/imdb.bundle/plugin.pyc
Binary file not shown.
Binary file added PluginDirectories/1/imdb.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion PluginDirectories/1/index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"comment": "This index is automatically generated by generate_index.py", "plugins": [{"examples": ["i'm feeling lucky gmail", "ifl facebook"], "zip_url": "im-feeling-lucky.zip", "displayName": "I'm Feeling Lucky", "name": "im-feeling-lucky", "description": "Immediately go to the first search result for your query."}, {"examples": ["translate hello world into pig latin", "pig latin hello world"], "zip_url": "piglatin.zip", "displayName": "Pig Latin", "name": "piglatin", "description": "Translate a message into Pig Latin"}, {"examples": ["say good morning"], "zip_url": "say.zip", "displayName": "Say", "name": "say", "description": "Speak a message out loud."}, {"examples": ["amazon flashlight", "a flashlight", "ebay flashlight", "e flashlight", "jd flashlight", "j flashlight", "taobao flashlight", "t flashlight"], "zip_url": "shop.zip", "displayName": "Shopping Search", "name": "shop", "description": "Search Amazon (shortcut: a), Alibaba (ab), AliExpress (ae), eBay (e), jd.com (jd), Taobao (t), YHD.com (y), Yixun (yx) and 1688 from Spotlight."}, {"examples": ["shutdown", "restart", "logout", "sleep", "lock"], "zip_url": "shutdown.zip", "displayName": "Shutdown", "name": "shutdown", "description": "Provides additional commands such as shutdown, restart and logout"}, {"displayName": "Terminal", "name": "terminal", "examples": ["rm -f *.py", "git push", "$ ping google.com"], "iconPath": "/Applications/Utilities/Terminal.app/Contents/Resources/Terminal.icns", "zip_url": "terminal.zip", "description": "Run Terminal commands. If Finder is open, commands are run in the current folder."}, {"examples": ["weather brooklyn", "how's the weather in houston?"], "zip_url": "weather.zip", "displayName": "Weather", "name": "weather", "description": "View the forecast in Spotlight."}, {"examples": ["google Apple stock", "g Apple stock", "search duck duck go for Flashlight", "ddg Flashlight", "image search for rubber ducks", "baidu search for flashlight"], "zip_url": "websearch.zip", "displayName": "Web Search", "name": "websearch", "description": "Search Google (g), DuckDuckGo (ddg), Google Images (gi), Baidu (bd), Bing (bg) and Twitter (tt)."}, {"zip_url": "wolfram-alpha.zip", "displayName": "Wolfram|Alpha Search", "name": "wolfram-alpha", "examples": ["ask wolfram alpha 1 + 1", "wa first 10 prime numbers", "population of india"]}]}
{"comment": "This index is automatically generated by generate_index.py", "plugins": [{"examples": ["i'm feeling lucky gmail", "ifl facebook"], "zip_url": "im-feeling-lucky.zip", "displayName": "I'm Feeling Lucky", "name": "im-feeling-lucky", "description": "Immediately go to the first search result for your query."}, {"zip_url": "imdb.zip", "displayName": "IMDB", "name": "imdb", "examples": ["imdb Phantom of the Opera"]}, {"examples": ["translate hello world into pig latin", "pig latin hello world"], "zip_url": "piglatin.zip", "displayName": "Pig Latin", "name": "piglatin", "description": "Translate a message into Pig Latin"}, {"examples": ["say good morning"], "zip_url": "say.zip", "displayName": "Say", "name": "say", "description": "Speak a message out loud."}, {"examples": ["amazon flashlight", "a flashlight", "ebay flashlight", "e flashlight", "jd flashlight", "j flashlight", "taobao flashlight", "t flashlight"], "zip_url": "shop.zip", "displayName": "Shopping Search", "name": "shop", "description": "Search Amazon (shortcut: a), Alibaba (ab), AliExpress (ae), eBay (e), jd.com (jd), Taobao (t), YHD.com (y), Yixun (yx) and 1688 from Spotlight."}, {"examples": ["shutdown", "restart", "logout", "sleep", "lock"], "zip_url": "shutdown.zip", "displayName": "Shutdown", "name": "shutdown", "description": "Provides additional commands such as shutdown, restart and logout"}, {"displayName": "Terminal", "name": "terminal", "examples": ["rm -f *.py", "git push", "$ ping google.com"], "iconPath": "/Applications/Utilities/Terminal.app/Contents/Resources/Terminal.icns", "zip_url": "terminal.zip", "description": "Run Terminal commands. If Finder is open, commands are run in the current folder."}, {"examples": ["weather brooklyn", "how's the weather in houston?"], "zip_url": "weather.zip", "displayName": "Weather", "name": "weather", "description": "View the forecast in Spotlight."}, {"examples": ["google Apple stock", "g Apple stock", "search duck duck go for Flashlight", "ddg Flashlight", "image search for rubber ducks", "baidu search for flashlight"], "zip_url": "websearch.zip", "displayName": "Web Search", "name": "websearch", "description": "Search Google (g), DuckDuckGo (ddg), Google Images (gi), Baidu (bd), Bing (bg) and Twitter (tt)."}, {"zip_url": "wolfram-alpha.zip", "displayName": "Wolfram|Alpha Search", "name": "wolfram-alpha", "examples": ["ask wolfram alpha 1 + 1", "wa first 10 prime numbers", "population of india"]}, {"zip_url": "yelp.zip", "displayName": "Yelp", "name": "yelp", "examples": ["yelp pizza"]}]}
4 changes: 3 additions & 1 deletion PluginDirectories/1/yelp.bundle/examples.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
yelp ~yelpquery(query here)
yelp ~yelpquery(query here)
search yelp for ~yelpquery(query here)
find ~yelpquery(chinese takeout) on yelp
Binary file added PluginDirectories/1/yelp.zip
Binary file not shown.

0 comments on commit 4bfe87b

Please sign in to comment.