8 ms·
Show HN: Anycomplete
- rm_-rf_slash 10y agoThis is pretty cool, but it would really impress me if it could autocomplete facts based on contexts. I wish I could open a text editor and begin writing while Anycomplete(-plus) crawled the web for links to factual data based on the writing so far. Otherwise the context switching is time-consuming and discouraging.
- Gracana 10y agoThat seems both really cool and absolutely terrifying. Automatically find references when writing a tutorial? Hell yes! Automatically find references to support an argument you've decided to make? Hmm... maybe not a win for journalism. [edit] Actually, I guess the way you described it, it could go the other way. You start writing some argument, and google shows you some stats that show you're wrong, or something. That would be neat.
- spyspy 10y agoPeople will find the sources to support their argument regardless.
- millettjon 10y agoWhat are the privacy implications of this? Is there a duck duck go version?
- fny 10y agoYou press the hot key, and a Google search is run.[0] So nothing too frightening. DDG compatibility should be easy. Just swap the endpoint (https://duckduckgo.com/ac/?callback=autocompleteCallback&q=YOUR_QUERY_HERE https://duckduckgo.com/ac/?callback=autocompleteCallback&q=Y...) and parse the JSON. [0]: https://github.com/nathancahill/anycomplete/blob/master/anycomplete.lua#L6 https://github.com/nathancahill/anycomplete/blob/master/anyc...
- nathancahill 10y agoThanks. Updated the Readme with that information: https://github.com/nathancahill/anycomplete/blob/master/README.md#privacy https://github.com/nathancahill/anycomplete/blob/master/READ...
- mmanfrin 10y agoSpotlight already does this. Type in 'aurora borealis' and it'll pull a wiki blurb (or maybe definition).
- jxy 10y agoDEVONsphere does something close to that. It does a simple keyword analysis and searches local/web. But what you are describing is more of a personal research assistant that's way beyond what today's system can do.
- kayamon 10y agoGoogle actually already does this, based on what you just searched for. Search for "swing", then in the search box, delete that and type in "play". It'll auto-complete with something like "playground swing". Now in a new tab, search for "music". Then delete that and search for "play". You'll get different results. (doesn't work with the browser search box, has to be the one in the page itself)
- austinjp 10y agoInteresting. Not working with Firefox on Android, but I'm curious to check this when I'm next on a desktop.
- ChuckMcM 10y agoNicely done. It will be interesting to see if this impacts your robot score when using Google. There was a blow up a while ago where people used the completion API to fish for trending searches and front run the Google News API and get stories onto the news page.
- jxy 10y agoIf you have your shell ready, curl -sS 'https://www.google.com/complete/search?client=hp&hl=en&xhr=t&q=aurora' \ | json_pp | sed -nE '/<\/?b>/{s```g;s`"|,|^ *``g;p}'
- devoply 10y agoI have learned the hard way never to type stuff like this into a shell because I might not like the results. It looks fine, but never again. ;)
- curiousgal 10y agoWhat happened?
- devoply 10y agoThis was like 13 years ago, but it in essence rm -rvf / ... but it was a obfuscated one liner that some dick put out there as a joke. Result was having to restore a site and lose a few weeks of posts.
- 0x0dea 10y ago$ echo landline | tr denial -/\ fmr
- verandaguy 10y agoIt's generally an easy way to introduce malicious shell scripts into remote machines operated by people who don't know about this. There's a blog dedicated to shaming sites that do this: https://curlpipesh.tumblr.com/#_=_ https://curlpipesh.tumblr.com/#_=_
- __s 10y agoBut they aren't piping to sh..
- lbotos 10y agoI just tried Hammerspoon for the first time this week and it's really, really powerful. Currently working on an automation suite for a bunch of tedious "micro-workflows" that I deal with on a daily basis.
- mooman219 10y agoFor windows users, I recommend AutoHotkey
- curiousgal 10y agoAre there decent Linux alternatives?
- laktak 10y agoThe closest one is probably https://github.com/autokey/autokey https://github.com/autokey/autokey
- BoppreH 10y agoIf I may plug my own free project, https://github.com/boppreh/keyboard https://github.com/boppreh/keyboard may achieve what you want. Also note it has mouse support now; it's hidden, but exists.
- pbhjpbhj 10y agoIsn't Autohotkey just echoing a text or running a script for an associated key combination? KDE has that built in (I think they call it khotkeys?). I'd be surprised if other DEs don't have similar? IIRC Autohotkey makes an application from your hotkey choice that you then run (eg via autostart or using an icon) to instate the hotkey afresh every reboot. To this end it seemed inferior to the KDE equivalent for me, but that could just be familiarity bias.
- throwanem 10y ago> Isn't Autohotkey just echoing a text or running a script for an associated key combination? Not just that, no. Its programming language is godawful, but the tight integration with the Windows API makes it powerful in a way that shell scripts and the like cannot easily match.
- stroebjo 10y agoThis uses the Google Autocomplete API which seems a bit risky to use [0] and according to this Google blog post should be already shut down [1]. Do you have any newer information on how reliable the API is? [0]: http://stackoverflow.com/questions/6428502/google-search-autocomplete-api http://stackoverflow.com/questions/6428502/google-search-aut... [1]: https://webmasters.googleblog.com/2015/07/update-on-autocomplete-api.html https://webmasters.googleblog.com/2015/07/update-on-autocomp...
- nathancahill 10y agoNice catch, updated to the new API.
- AlphaWeaver 10y agoInstructions are also included to use DuckDuckGo.
- jxy 10y agoWonderful. I decided to put a script together. #!/bin/bash S="$(echo "$@" | sed -E 's, +,+,g')" g(){ curl -sS "https://suggestqueries.google.com/complete/search?client=firefox&q=$1" \ | sed -E 's,.*\[([^]]*)\].*,\1,;s,",,g' | tr , '\n' } d(){ curl -sS "https://duckduckgo.com/ac/?q=$1" \ | sed -E 's,"phrase":|[][{}"],,g' | tr , '\n' } paste -d , <(g $S) <(d $S) | column -t -s ,
- deleted 10y ago[deleted]
- mooman219 10y agoHad this idea a while back: I really enjoyed auto complete in my IDE and configurable expansions and I wanted that everywhere. I threw together an app to run in the background to keep track of the last word I typed and manage suggestions when I hit a hotkey. Read from a local dictionary, used basic usage frequency and levenshtein distance to recommend, pretty straightforward hacked together in an afternoon project. I could see Anycomplete using a more local suggestion list instead of relying on Google. Ideally it showed a drop down under where you're typing much like most IDEs would, but support was shotty at best. I really wish there were more OS level hooks for this sort of thing, or a more standardized way to understand what the user is typing and where, but that's not something I ever expect to happen. My app was basically a keylogger while the one in the post is more like a separate entity altogether.
- worldsayshi 10y agoIs there any similar tool for linux?
- milge 10y agoI built something like this many moons ago for browser history. A service would run on your machine to aggregate your browser history. Typing "http://" http://" anywhere on your machine would pop up a dialog with your history of most recently visited sites. I wonder if browsers have gotten better with APIs for web history and if it's any easier in windows. System-wide keystrokes had to be checked with win32 calls which could set off antivirus alarms. Keep up the good work. Maybe this will inspire me to see if things have gotten better.
- willcodeforfoo 10y agoInteresting, didn't know Hammerspoon had this "chooser" functionality. I guess with enough Lua you could replace Alfred!
- SimonSelg 10y agoThis sounds grad from the ux perspective! Thanks!
- sytringy05 10y agoThat's pretty cool, but I'm fairly certain that sooner or later I would end up googling my password.
- Aldo_MX 10y agoWhat's the matter? Passwords are intended to be disposable, here, have one: xAKi2It6XJK7QJR1ROXFK7xmjV6kn6DNÑJU7Pu9hA7OS
- nathancahill 10y ago--
- sclb 10y agoUser's password was removed from this post. Please don't post your HN passwords in comments.
- st0le 10y ago-
- deleted 10y ago[deleted]
- Matt3o12_ 10y agoPlease don't do that because it invites users to try it out and while you probably don't try to be malicious, I know that it is a pretty common scam in MMORPGs. People say in chat: awesome, if I type my password it becomes: [hidden] and hopes other users try that. As soon as something looks like their password, they have scripts ready to immediately change the users password.
- Aldo_MX 10y agoAlthough your advice about "not writing your password here" is well-intentioned, the reality is that most passwords are already available in private blackhat databases. Memorizing and reusing a single password is the worst thing you can do. The number of leaks and brute-force attacks are increasing, and you should really be generating random and unique passwords per website if you aren't. To get an idea of how easy it is to crack a leaked password, download a public list of a website you know[1] (ex. L1nk3d1n), you'll probably find the password you used at the time of their leak in the list, since ~97% of them have already been cracked. [1] https://hashes.org/public.php https://hashes.org/public.php
- pdaddyo 10y agoThis is great, thanks for sharing. I've opened a pull request (#5) with a tweak I made here - hold shift whilst choosing an option to actually show the google results instead of pasting. Hammerspoon looks fantastic, can't wait to automate even more!
- pluma 10y ago> (macOS) FTFY
- nathancahill 10y agoDoesn't quite have the same markety ring to it.
- thecity2 10y agoFollowed the installation steps, but it doesn't seem to work for me.
- nathancahill 10y agoCan you open an issue with the content of the Hammerspoon log (Hammer menu > Console...)
- thecity2 10y agosure thing!
- justinzollars 10y agoHow does one get the output into an application? Do I have to use clipboard? Clicking command 1 simply closes the app
- nathancahill 10y agoPlease open an issue on Github with the content of your Hammerspoon log (Hammer menu > Console...).
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- hossbeast 10y agoAnd by "Anywhere", you mean, on macOs
- Ph0X 10y agoI'd love to see this as a Keypirinha [1] plugin. [1] http://keypirinha.com/ http://keypirinha.com/
- maturz 10y agoOr Wox http://www.getwox.com/ http://www.getwox.com/
- wingerlang 10y agoAnywhere within a targeted OS is not a valid description? It clearly shows that it is macOS.
- sjwright 10y agoIt doesn't work with my Bic biro. Two stars.
- smnplk 10y agonope, I am not sending my keystrokes anywhere
- known 10y agoDIY in PHP http://php.net/manual/en/function.pspell-suggest.php http://php.net/manual/en/function.pspell-suggest.php
- outcoldman 10y agoGreat idea! I use Google so often for "anycomplete". Created similar extension for Alfred https://github.com/outcoldman/alfred-anycomplete https://github.com/outcoldman/alfred-anycomplete
- erelde 10y agoWould love to have that inside something like drun or rofi.
- joshuak 10y agoUniversal autocomplete based on a local index of words? That would be great! Universal autocomplete via google api? Hmm, something to think about. 1) Keyloggers 2) Filter bubbles 3) Offline tax
- rootlocus 10y agoThis is very useful for people like me who google words to check the correct spelling. Any plans on adding support for definitions / explanations of words? Something like the result of "define aurora" google query.