Florian 80 Posted December 14, 2020 Share Posted December 14, 2020 @Pennyworth would you mind sharing this last google workflow? There are a few things I'd love to try with it to get a feel of where this could go. I'm mainly a web dev and having a web window responding to alfred is really tickling my fancy. Link to post
Florian 80 Posted December 14, 2020 Share Posted December 14, 2020 @Pennyworth also, do you have a way to know the full list of available results in their display order? or is it just the current one through the new "press secretary"? I'd love to have a web preview that's not entirely refreshed on every selection change, and a local server behind it to speed up things. Link to post
Mr Pennyworth 43 Posted December 14, 2020 Author Share Posted December 14, 2020 2 hours ago, Florian said: would you mind sharing this last google workflow? @Florian [pre-release] There you go: https://github.com/mr-pennyworth/alfred-google/releases Note: The reason the workflow doesn't directly visit a google search url each time, but instead loads a google search page and fills input values and submits forms is because the former led to captchas pretty soon, I guess the latter is more "human like"... The app in the workflow is basically the app in https://github.com/mr-pennyworth/alfred-gif with large chunks of code deleted. 2 hours ago, Florian said: I'm mainly a web dev and having a web window responding to alfred is really tickling my fancy. The Google workflow has a one-way flow, btw. That is, the webview responds to alfred. For a back-and-forth interaction, you can take a look at the GIF workflow. It has file drag and drop, keyboard and mouse navigation etc.My apologies, the GIF workflow code is damn messy and convoluted though. 2 hours ago, Florian said: do you have a way to know the full list of available results? or is it just the current one through the new "press secretary"? Just the current one through the new press secretary. However, if the results are coming from a script filter, you could independently capture and process those. That's what the extra pane did pre-press-secretary. Take a look at the tech QA: https://github.com/mr-pennyworth/alfred-extra-pane#technical-qa (I haven't pushed the press-secretary code to alfred-extra-pane yet.) 2 hours ago, Florian said: in their display order https://github.com/mr-pennyworth/alfred-extra-pane#-in-script-filters-alfred-doesnt-simply-show-the-results-in-the-orderthey-appear-in-the-json-but-reorders-them-according-to-its-logic-how-doesthe-extra-pane-account-for-that- 2 hours ago, Florian said: I'd love to have a web preview that's not entirely refreshed on every selection change, and a local server behind it to speed up things. Excited to see what you build! Link to post
Chris Messina 33 Posted December 14, 2020 Share Posted December 14, 2020 18 hours ago, Mr Pennyworth said: My most favorite use-case is actually something that I hadn't originally thought about: "Search Google as You Type" Have you taken a look at the just-updated Algolia Autocomplete experience. Go here and hit ⌘-K. These docs might be relevant? Link to post
Mr Pennyworth 43 Posted December 15, 2020 Author Share Posted December 15, 2020 3 hours ago, Chris Messina said: Have you taken a look at the just-updated Algolia Autocomplete experience. Go here and hit ⌘-K. These docs might be relevant? Cool stuff!! But looks like unrelated to what I meant by "search google as you type"... Unless of course, I'm missing something... How do you envision algolia autocomplete to be used to search google for quick answers? Link to post
Chris Messina 33 Posted December 15, 2020 Share Posted December 15, 2020 3 hours ago, Mr Pennyworth said: How do you envision algolia autocomplete to be used to search google for quick answers? More like I was imagining their platform might be used to provide search-as-you-type for other websites... beyond Google. Mr Pennyworth 1 Link to post
Florian 80 Posted December 15, 2020 Share Posted December 15, 2020 Damn, google in France looks like this now... Link to post
Mr Pennyworth 43 Posted December 15, 2020 Author Share Posted December 15, 2020 3 minutes ago, Florian said: Damn, google in France looks like this now... Damn! @Florian See if you can figure out the css selector of that dialog? Then you can add that selector to this list here: https://github.com/mr-pennyworth/alfred-google/blob/main/google-viewer/AlfredGoogleViewer/main.swift#L13 and then recompile the app with ./build-scripts/mkapp.sh Link to post
deanishe 1,394 Posted December 15, 2020 Share Posted December 15, 2020 On 12/14/2020 at 5:48 AM, Mr Pennyworth said: Is there a way to access the URL the web-searches are building? On 12/14/2020 at 5:48 AM, Mr Pennyworth said: Also, is there a programmatic way of accessing the web-searches? https://www.deanishe.net/post/2019/05/workflow-suffix-web-search/ On 12/14/2020 at 5:48 AM, Mr Pennyworth said: Having said all this, I must agree I don't really foresee much value in doing this for all web-searches because with the exception of google and wolframalpha, I would assume most of the searches are such that they require further interactions with results (like clicking a link, copying some text etc). Can't you make the links clickable? You can make them clickable in the Quick Look preview. Link to post
Mr Pennyworth 43 Posted December 15, 2020 Author Share Posted December 15, 2020 34 minutes ago, deanishe said: Can't you make the links clickable? I would assume so! Just haven't found the need for it yet, and hence haven't tried to figure it out. 49 minutes ago, deanishe said: https://www.deanishe.net/post/2019/05/workflow-suffix-web-search/ Ah I'm so sorry for my sloppy framing of the question! Quote Is there a way to access the URL the web-searches are building? By that I meant, when I type "<keyword> <search phrase>", Alfred shows a result corresponding to it like this: When I press enter, the url opens in the browser. So, I assume, Alfred has internally built that URL, ready to be opened in a browser. My question (I guess, that should've been more of a feature request) was "how about making that URL accessible through quicklookurl or something similar?" (That way, with zero additional efforts/programming, the extra pane could pick it up) 56 minutes ago, deanishe said: Also, is there a programmatic way of accessing the web-searches? Sorry for the poor phrasing... I meant including the ones that come pre-installed. Alfred.alfredpreferences/preferences/features/websearch/prefs.plist, very understandably, has only user-defined ones. Link to post
tianli 0 Posted January 27 Share Posted January 27 Hi, I have no experience in Mac development, so I don't know how to install the application you wrote。 I've been Googling this feature for two days now....I am very happy to find the answer here Link to post
tianli 0 Posted January 27 Share Posted January 27 I installed it, it is so simple, download the released, thank you Link to post
SomeOneIsBack 0 Posted January 30 Share Posted January 30 On 1/27/2021 at 3:51 PM, tianli said: I installed it, it is so simple, download the released, thank you Hi tianli, may I ask how do you install it? the released on github is a .app file. I double click it and nothing happened:( Is there any .alfredwork file? Thanks Link to post
tianli 0 Posted February 2 Share Posted February 2 On 1/30/2021 at 3:48 PM, SomeOneIsBack said: Hi tianli, may I ask how do you install it? the released on github is a .app file. I double click it and nothing happened:( Is there any .alfredwork file? Thanks https://github.com/mr-pennyworth/alfred-google/releases Here's the.alfredwork file Link to post
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