zhaowu Posted March 19, 2013 Share Posted March 19, 2013 (edited) The initial motive is to automatically use current front browser's site for site search. Current it includes google suggestion, instant search, site search and related search. Suggestions are welcome. Check it out in Github: http://zhaocai.github.com/alfred2-google-workflow/ It is also an example to use bundler to include gems in an alfred workflow. The command is bundle install --standalone. Usage 1. Search Suggestion Keyword g: provide google search suggestions based on {query}. 2. Instant Search Keyword gi: get instant google search results in Alfred based on {query}. 3. Site Search Keyword gs: get instant google search results of front browser's site in Alfred based on {query}. Supported browsers are: Safari, Google Chrome, Opera, OmniWeb, etc. You can use site:example.com query if you do not want to search for current front browser's site. 4. Related Search Keyword related: get related google search results of front browser's site in Alfred based on {query}. Supported browsers are: Safari, Google Chrome, Opera, OmniWeb, etc. You can use related:example.com query if you do not want to search for current front browser's site. Installation Two ways are provided: You can download the Google.alfredworkflow and import to Alfred 2. This method is suitable for regular users. You can git clone or fork this repository and use rake install and rake uninstall to install. This method create a symlink to the alfred workflow directory: "~/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows". This method is suitable for developers. Reference Site Search Workflow for Alfred 2 Google Search in-line results workflow Edited March 30, 2013 by zhaowu mjv, arsenty, bcometa and 4 others 7 Link to comment
zhaowu Posted March 20, 2013 Author Share Posted March 20, 2013 update (09:20 PM March 19, 2013): related search and query filter Link to comment
Domenic Posted March 23, 2013 Share Posted March 23, 2013 (edited) Just WOW! I love your workflow! Thank you for sharing! You should definetely submit your workflow to http://www.alfredworkflow.com/ Would it be much work to change the Instant Search to google.de? That would be so great! Domenic Edited March 23, 2013 by Domenic Link to comment
bcometa Posted March 23, 2013 Share Posted March 23, 2013 Link is broken and sounds like a workflow I'd really like to have. If you can fix I'd appreciate it! Thanks! Link to comment
zhaowu Posted March 24, 2013 Author Share Posted March 24, 2013 Sorry, did not notice an extra dot in the link. It is fixed now. Link is broken and sounds like a workflow I'd really like to have. If you can fix I'd appreciate it! Thanks! Link to comment
zhaowu Posted March 24, 2013 Author Share Posted March 24, 2013 Just WOW! I love your workflow! Thank you for sharing! You should definetely submit your workflow to http://www.alfredworkflow.com/ Would it be much work to change the Instant Search to google.de? That would be so great! Domenic change the Instant Search to google.de should be easy. You just need to change the line in the `instant.rb` file ` :arg => URI.escape("http://www.google.com/search?as_q=#{query}&lr=lang_")` http://www.google.com -> http://www.google.de I am working on some updates. will upload this later. Link to comment
bcometa Posted March 24, 2013 Share Posted March 24, 2013 thanks! "gs" and "gi" are awesome!! one problem: when searching for my company ($300 Data Recovery) it seems to have issues with the "$." Link to comment
zhaowu Posted March 24, 2013 Author Share Posted March 24, 2013 fixed. please update. thanks! "gs" and "gi" are awesome!! one problem: when searching for my company ($300 Data Recovery) it seems to have issues with the "$." Link to comment
hzlzh Posted March 24, 2013 Share Posted March 24, 2013 This workflow is really useful. Maybe you can share them on the List below. Link to comment
bitnugget Posted March 25, 2013 Share Posted March 25, 2013 This is awesome! Thank you! Link to comment
bcometa Posted March 25, 2013 Share Posted March 25, 2013 sweet, thanks! works great! Link to comment
zhaowu Posted March 25, 2013 Author Share Posted March 25, 2013 Thanks for your endorsement of this workflow Link to comment
iEnno Posted March 28, 2013 Share Posted March 28, 2013 I pretty much love you right now, thanks. Link to comment
zhaowu Posted March 28, 2013 Author Share Posted March 28, 2013 I pretty much love you right now, thanks. Seems a good workflow I did Link to comment
zhaowu Posted March 29, 2013 Author Share Posted March 29, 2013 [Release]( V1.2 / March 29, 2013 ) - new alfred-workflow gem and some bug fixes Link to comment
zhaowu Posted April 5, 2013 Author Share Posted April 5, 2013 [update] April 05, 2013 fix google suggest in ruby 1.8.7 (remove the dependency to nokogiri) Link to comment
zhaowu Posted April 29, 2013 Author Share Posted April 29, 2013 (edited) [release] v1.4 / April 29, 2013 - support Alleyoopy - add /help command Edited April 30, 2013 by zhaowu Link to comment
mikedvzo Posted April 30, 2013 Share Posted April 30, 2013 Excellent job - need I say more!!!! Link to comment
BrianGilbert_ Posted May 12, 2013 Share Posted May 12, 2013 (edited) This is a great workflow though it doesn't appear to work with Firefox, any chance of adding support? (I'm using FF Aurora 22.0a2) Edited May 12, 2013 by BrianGilbert_ Link to comment
zhaowu Posted May 12, 2013 Author Share Posted May 12, 2013 This is a great workflow though it doesn't appear to work with Firefox, any chance of adding support? (I'm using FF Aurora 22.0a2) Firefox does not support applescript. I do not know a good way to get the tab url from it. Link to comment
AlfredFreak Posted June 1, 2013 Share Posted June 1, 2013 Great job on this. It is one of my most-used workflows. Thank you! Link to comment
zhaowu Posted June 6, 2013 Author Share Posted June 6, 2013 [update] June 06, 2013 tab autocomplete for google suggest Link to comment
Martin Posted October 14, 2013 Share Posted October 14, 2013 Hi I installed the latest version from github, but Google Instant Search "gi" doesn't work, it just falls back to my normal google search. Any ideas? Link to comment
zhaowu Posted October 15, 2013 Author Share Posted October 15, 2013 try to run the script `/usr/bin/ruby ./instant.rb {query}` from the command line and check the output. Also check the log: ~/Library/Logs/Alfred-Workflow.log Link to comment
Martin Posted October 17, 2013 Share Posted October 17, 2013 try to run the script `/usr/bin/ruby ./instant.rb {query}` from the command line and check the output. Also check the log: ~/Library/Logs/Alfred-Workflow.log It seems to be a Ruby error (I'm using 10.9 GM). This is the error when running from command line: /usr/bin/ruby /Users/martin/Dropbox/Alfred_v2/Alfred.alfredpreferences/workflows/user.workflow.FD7614C1-3388-4F55-885A-5C04C0B50D3F/instant.rb test /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- alfred (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/martin/Dropbox/Alfred_v2/Alfred.alfredpreferences/workflows/user.workflow.FD7614C1-3388-4F55-885A-5C04C0B50D3F/instant.rb:20:in `<main>' Any ideas on how to fix it? Thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now