-
Notifications
You must be signed in to change notification settings - Fork 7
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
0 parents
commit e8fbdfd
Showing
9 changed files
with
573 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,70 @@ | ||
# Created by https://www.gitignore.io | ||
|
||
### Vim ### | ||
[._]*.s[a-w][a-z] | ||
[._]s[a-w][a-z] | ||
*.un~ | ||
Session.vim | ||
.netrwhist | ||
*~ | ||
|
||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
Binary file not shown.
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 [email protected] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,26 @@ | ||
|
||
# Find Similar Images with Google Images Search # | ||
|
||
An [Alfred 2][alfred] workflow. | ||
|
||
Perform a Google Image search based on a file on your computer. | ||
|
||
**Insert demo here!** | ||
|
||
## Usage ## | ||
|
||
Google search supports PNG, JPG, GIF and BMP images only. This workflow | ||
is available as a File Action for any of these filetypes in Alfred. | ||
|
||
There is also a Hotkey to search based on the current Finder selection. If more | ||
than one image file is selected, on the first will be used. | ||
|
||
|
||
## Licence ## | ||
|
||
This workflow is released under the [MIT License][mit]. | ||
|
||
|
||
[alfred]: http://www.alfredapp.com/ | ||
[mit]: ./LICENCE.txt | ||
|
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,39 @@ | ||
(* | ||
Get images in Finder selection, then call the workflow again with | ||
the first selected image. | ||
If no images are selected, return an error message, which | ||
can be passed to a Post Notification action. | ||
*) | ||
|
||
-- The filetypes understood by Google Image Search | ||
set imageExtensions to {"jpg", "jpeg", "bmp", "gif", "png"} | ||
|
||
-- Return list of files selected in Finder whose extensions are | ||
-- in imageExtensions | ||
on selectedImages() | ||
set theImages to {} | ||
tell application "Finder" | ||
set theSelection to the selection | ||
if (the count of theSelection) is greater than 0 then | ||
repeat with theFile in theSelection | ||
if the name extension of theFile is in my imageExtensions then | ||
set the end of theImages to (theFile as alias) | ||
end if | ||
end repeat | ||
end if | ||
log ((the count of theImages) as text) & " image(s) selected" | ||
end tell | ||
return theImages | ||
end selectedImages | ||
|
||
set theImages to my selectedImages() | ||
if (count of theImages) is greater than 0 then | ||
set theImage to item 1 of theImages | ||
set thePath to POSIX path of theImage | ||
|
||
-- Use the workflow's own external trigger | ||
tell application "Alfred 2" to run trigger "Find Similar Images" in workflow "net.deanishe.alfred-google-similar-images" with argument thePath | ||
else | ||
return "No images selected" | ||
end if |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.