-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Gyazo Search in Spotlight plugin by Flashlight | ||
|
||
![Screenshot](https://i.gyazo.com/9a8ffcd84835c1630088579565fb5150.png) | ||
|
||
## keyword | ||
|
||
- `gyazo <searchword>` | ||
- `gy <searchword>` | ||
|
||
### :warning: Note about login | ||
|
||
if it shows login page in webview, please login to Gyazo.com with your Safari. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
gyazo ~keyword(kyoto) | ||
gy ~keyword(lgtm) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"categories" : [ | ||
"Utilities" | ||
], | ||
"displayName" : "Gyazo Search", | ||
"name" : "gyazo-search", | ||
"description" : "", | ||
"examples" : [ | ||
"gyazo kyoto", | ||
"gy lgtm" | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
def results(fields, original_query): | ||
keyword = fields['~keyword'] | ||
html = ( | ||
open("show.html").read().decode('utf-8') | ||
.replace("<!--KEYWORD-->", keyword) | ||
) | ||
return { | ||
"title": "Gyazo Seach '{0}'".format(keyword.encode('utf-8')), | ||
"run_args": [keyword.encode('utf-8')], | ||
"html": html, | ||
"webview_links_open_in_browser": True | ||
} | ||
|
||
def run(message): | ||
import os, pipes | ||
os.system('open "https://gyazo.com/search/{0}"'.format(message.encode('utf8'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<html> | ||
<head> | ||
</head> | ||
<body data-keyword='<!--KEYWORD-->'> | ||
<script> | ||
setTimeout(function () { | ||
var keyword = document.querySelector('body').getAttribute('data-keyword') | ||
window.location = 'https://gyazo.com/search/' + keyword | ||
}, 500) | ||
</script> | ||
<h1 style="font-family: sans-serif;margin-bottom: 5px;"> Searching <!--KEYWORD--> </h1> | ||
<img style="width: 80%; margin: auto;margin-top: 0px;" src="./ninja.png" /> | ||
</body> | ||
</html> |