All DuckDuckGo bang operators on one page
mosermichael.github.io
mosermichael.github.io
There are plenty of projects I'm familiar with but don't know the canonical URL off the top of my head - when I link someone else to them I have to look up their homepage. This would make this process much faster.
My motivation was using Google "I'm Feeling Lucky" without JS. The node app detects the "!lucky" bang, downloads the search results, finds the first link, and redirects to it.
Let me know if it interests you.
There's plenty of hypocrisy at that company but this doesn't strike me as a case of it.
I'd suggest respecting Google's robots.txt as much as Google respects our DNT settings.
The entire function is basically this (requires Tridactyl native messenger).
command cp js -p tri.native.run('cd ~ && ddgr --json -n 1 ' +JS_ARG + '| jq -r ".[0].url" | xclip -sel clip')
[1] https://github.com/tridactyl/tridactyl[2] https://github.com/jarun/ddgr
[3] https://stedolan.github.io/jq/
PS: I used this tool itself to find the links for the three projects mentioned above.
Is it possible to do this using the HTML5 clipboard functions instead?
> Conditions of having this behavior enabled vary from one browser to another, and have evolved over time.
If you're not running based on a click event, you'll certainly fail.
Tridactyl provides a `:shellescape` function for sanitising untrusted input but I don't think it is needed in this case.
In this case, we have Firefox, which has built-in integration for DDG, as well as lots and lots of capability for querying and processing JSON. And on top of that, we are adding a command that drops to the command line to make a series of command calls to different programs for sending and extracting a search query. All to return 1 URL. It's nuts.
This topic could be a 20-page thesis.
Why? I'm seriously curious about cases in which any of these can be useful.
https://news.ycombinator.com/item?id=21371577
Startpage is now owned by an advertising company (reddit.com)
182 points by rahuldottech 10 months ago | 82 comments
Bangs are cool but i don't think one can remember many bangs.
This site is also very good. But, it's unfortunately not much use to me as i would directly search the term with 'site:' during the time i would take to search for specific bang.
Also, if i wanted to search specific site, i would add it in search engines of my browser.
Plus, most people tend to spend most of their time on just a few sites. Knowing one or two bangs is useful enough.
Wikipedia -> !w
Youtube -> !you
reddit user -> !reu
subreddit -> !reddits
also !reddit points to new version, I'd want !redditold
Twitter -> !tweet
Steam -> !steme (???)
Twitch -> !ttv
That being said, if you're on DDG, there's pretty good auto complete on bangs so you can find it by typing the name and looking at the favicons.
Also, if you want to know one of the bangs, "!bang twitter" lists all if the ones involving Twitter.
old.reddit.com !oldred
old reddit !ored
Subreddit (Old Style) !ors
Old Reddit (subreddit) !osr
The same goes for Amazon: !a, !afr, !ade, and so on...
I use those operators instead of setting a new search provider because switching providers is a mouse action, while adding the operator is just some few more key presses.
Those are probably my most commonly used ones.
- !a (amazon)
- !gm (google maps)
- !i (ddg images, could also use !gi for google images)
- !news (ddg news)
- !w (wikipedia)
- !mcmaster (mcmaster-carr)
- !r (reddit)
- !hn (hackernews)
- !tw (twitter)
- !economist (economist)
- !gh (github)
Also I find that sometimes I just guess and get it right (thats how i ended up realizing !mcmaster was a thing)
I don't get the appeal. I want the bang to show a good/filtered SERP, not load some other site directly. (similar to a `site:x` search on Google I guess.)
What I'd really like to use is a search engine that had custom ranking of domains. I'd heavily weigh it to only show Stack Exchange, Reddit, and forum posts.
Or a `!discussions` bang operator that filtered DDG results into that set.
And it's appealing to me, so I do that. Most people won't agree, most people don't even mess with search providers, but it's doesn't harm them either.
And I've just learned I can use `!posix` to search the open group, which I'll probably use whenever I get upset with macOS's man pages again.
not affiliated
Granted, I haven't given DDG an earnest try in a couple of years, so the DDG non-bang search results may have gotten better, but the fact that their bangs are still heavily touted as a killer feature doesn't give me much faith.
Search
foo
Didn't get a good resultSearch
foo !bar
With more specialized or different search engine (foo was already in my browser search bar, so adding !bar is easy).Or simply
foo !w
If I already know I'm searching in Wikipedia or whatever else specific. I think this feature is very neat.Bangs are nice as a quick shortcut to specialized search engines like etymology online, google image search, wikipedia, or whatever.
You can set up your browser to do this (some keyword changes the search), but it's convenient that DDG already has it built in, so the only setup needs to be switching your default search engine.
I don't know why anyone would ever use DDG's bangs feature if it wasn't their default search engine. That's just a weird extra step.
https://scryfall.com/search?q=black%20lotuss
Whereas I Google or Duck for "mtg black lotuss" I'll almost certainly get the correct results. I feel like I'd just get frustrated with the much worse text parsing of each site's search field.
Although it is interesting that this "Scryfall" site that owns "!mtg" isn't on the first SERP for Google or DDG.
Being able to see price, reprints, legality, etc is great
Also, the best part about scryfall is it's searching paramaters. If I want to see the most expensive red creature cards currently legal in standard, I can do `!mtg color:r sort:usd legal:standard type:creature` and it's right there
It's made building decks so much easier for me with these easy text searches, as someone who loves being able to do things with a keyboard rather than selecting these parameters using a mouse on something like Gatherer
edit: Actually there is !brd
---
I have my own search keywords in Firefox, if you're using Firefox or Chrome I recommend setting your own search keywords. You have more flexibility in adding stuff that's relevant for you, and it's going to sync on your mobile device too (it's the reason for why I'm using Firefox on iOS). It increases privacy too. Makes no sense to send all of your searches to DDG first.
Safari is the only one where you're out of luck, and need DuckDuckGo's bangs.
DDG could show a bang suggestion if any of the top search results are for sites that have bang shortcuts. Or suggest "Didn't find what you're looking for? Try !g" if the number of results found is small.
I've been trying to figure out how to do this for years now with no luck.
2. In the toolbar, within the Import & Backup menu button, use Backup… or Export Bookmarks to HTML….
3. Observe the file format (JSON for one, HTML for the other) and replicate its effects for all the items you wish to add.
4. Restore or import your new bookmarks.
I haven’t actually done this for over a decade. I suspect the backup/restore route might replace all bookmarks and the export/import route might just add new bookmarks, but I don’t know.
What I’d really like is an extension that could manage all of these (sync with DuckDuckGo’s bangs, allow enabling and disabling individually, by group, &c., renaming bangs), but Mozilla have said “We have no plans to allow adding search engine dynamically via WebExtensions. We've had too many problems with hijacking.” (https://bugzilla.mozilla.org/show_bug.cgi?id=1268401#c37.) So anything like this would need to be a program that could run locally and either mess with Firefox’s databases directly (places.sqlite, I think), or provide you with the relevant files for you to import manually. I’ve thought of making such a thing, but I’ve not done it yet. Part of the reason is lack of a good data source: for using DuckDuckGo bangs, you need a list that includes the destination of each bang, which I don’t think they provide in any principled way, so you’d be left just polling them.
In an on-location training on a laptop provided by the training company? Set search engine to DDG, type "!w election fraud" and you're on Wikipedia.
So it's sort of the Firefox keyword feature, in the cloud, but with a little less control.
Stack Overflow search results are directly included on the SERP (in addition to organic web results) for programming queries. Plus the privacy aspect.
Example for "python string match": https://www.runnaroo.com/search?term=python%20string%20match
I'm the creator of Runnaroo.
1) We can ctrl-f to search obv, but add a filter up top that just fuzzies anything matching
2) Let me condense the header of a category, like how comments can hide their children in here
3) Both of the links in an entry go to the same thing, ala: `discworld` and `!discworld` can be clicked to do the same thing, populate the box up top, which _does_ let you click & press return. But it might be cool if one populated, and the other just took you to the !bang in ddg. Not in a new tab! The user can force it in a new tab if they want
edit: I know #3 basically says "so just take the user to duckduckgo.com?q=!discworld which'll take 'em to whatever site that resolves to?" yeah pr much that, heh
I believe we should return to dual-disk systems with separate disk/flash drive dedicated for executable code (OS+apps+swap) and for user data storage. And this can be especially easy now as NVMe drives and micro/SD cards can be so small and low-power.
Performance is very important for the drive where you load your executable from and where you put your swap. The speed of this disk actually defines the user experience. At the same time it rarely is a serious problem if it fails - you can just replace it and re-install everything. The user data (like documents, pictures, multimedia files, source codes etc.) storage usually doesn't really need to be that fast to access but it really should be durable as its failure often means loss of some unique valuable data which is a result of work expensive or impossible to repeat in required time.
For many of my regulars, both exist (!w & w!, !gmaps & gmaps!) but as this isn't standard, it can lead to holes. For example, !hackernews works but hackernews! not.
It would be great if all bangs could have both variants as standard rather than allowing submission of one but not the other.
Use a real Vim emulation like tridactyl[0], life changer.
That way, starting a new search with a bang operator wouldn't be such a hassle, e.g. on mobile, where it takes like 7 screen-taps to restart a search with e.g. "!g" appended to it.
I might actually switch to DDG if they had that.
weather!g weather !g weather!g warsaw
Each of those queries will work.
!ducky <search term>
that will navigate to first result. It's named after the "I'm Feeling Lucky" button that used to exist on Google. It's useful with Firefox keyword bookmarks to navigate to specific pages quickly. Bookmark: Python's PEPs
Location: https://duckduckgo.com/?q=!ducky+site%3Awww.python.org%2Fdev%2Fpeps+%22pep+%s%22
Keyword: pep
Type in the browser address bar: pep <space> 8 <enter>
Will navigate to: https://www.python.org/dev/peps/pep-0008/ hoverboard !as !gs !target !walmart
would open separate tabs of “hoverboard” results from Amazon Smile, Google Shopping, Target.com, and Walmart.com.It’s surprising Discogs.com is not a bang operator. They’re the IMDB of music and an awesome resource I search often. Please add!
- `!g` if I can't find what I am looking for and am ready for a different angle.
- `!` + another letter than g, typed my mistake. This results in an annoying search on the wrong site (e.g., Flickr) or even more random.
This must puzzle anyone analyzing search logs on Flickr. Why are users searching for obscure Python error messages?!
hn duckduckgo
into https://hn.algolia.com/?q=duckduckgo
and thus get a shortcut to HN's own site search (Algolia), without involving Google/DDG/etc. To do this, you need simply to bookmark the URL https://hn.algolia.com/?q=%s
and set the bookmark's "keyword" property to "hn". Then "hn" becomes a special operator in the omnibar, which eats the rest of the search string and substitutes it into its bookmark's "%s" parameter.(This isn't limited to search engine query strings: it's general-purpose template expansion on the URL string).
first thing that caught my eye how can we have a such a specific car FAQ for vintage BMW and not have a corresponding bang for
https://www.tdiclub.com/ - the bible in diesel VW.
It is a useful resource without a doubt, but far from the beloved cheat sheets that could fit one a3 or a4 page.
DDG at this writing advertises 13,564 bangs: https://duckduckgo.com/bang?q=
This page, as with the Show HN, groups bangs by category (Entertainment Multimedia News Online Services Research Shopping Tech Translation).
There is a search feature (match on bang or URL) as well, with, of course, its own bang: !bang
In my experience, it's possible to, very roughly, define bounds to search results and usefulness or approach:
- 0 results is the null set. Obvious but worth noting.
- 1 result is an identity. That is, a search returning precisely one entity identifies that entity. (This relationship may not be persistent over time).
- To 10 results is a near universally useful set. SERPs, news sites, and many other interfaces focus on this scale. Ontologies typically branch to about 2-30 items. HN's front page lists 30 items. The Presidential Daily Brief runs about ten items. This apparently taxes the attention of some incumbents.
- To 100 results remains tractable to the determined user. This means a capacity to identify specific item(s) of interest without necessarily resorting to recordkeeping. More detailed news sites might include as many articles. A print newspaper typically runs 100-250 individual stories per day.
- To 1,000 results is methodologically tractable, though some recording and filtering system is all but certainly required. These need not be programmatic or algorithmic though often are. News wires (AP, AFP, Reuters, UPI) typically run 1,000--5,000 items/day.
- To 1,000,000 results, jumping a few orders of magnitude, typically requires some technical searching or sorting capacity. Again, not necessarily algorithmic (a large print library collection of a million or more volumes can be managed through paper based systems, though seldom is now, and requires extensive structure of stacks, index, circulation, and reshelving).
- To ~1 billion items is all but certainly programmatic.
- Greater thaan a trilliion items enters the realm of probabalistic matches, relevance, and AI.
I'm not aware of specific research in this area but would be quite interested in references.
The classification would suggest bang search rather than comprehensive listing as being of interest to most peoople though.
Sources: Seveeral of the values above are discussed here:
https://old.reddit.com/r/dredmorbius/comments/6c220n/media_a...
https://old.reddit.com/r/dredmorbius/comments/7qya12/informa...
Seriously, that's a lot!
!w - wikipedia
!drs - docs.rs
!http - http status codes
!a - amazon
!yt - youtube
!usps
!fedex
!so - stackoverflow.com
!su - superuser.com
!hn - HN :)
!php - PHP manual
!ss64 - ss64.com (CLI reference)
!g - Google
!i - DDG images
!gi - Google images
!imdb - IMDb
!rt - Rotten Tomatoes
!gm - google maps
!sr/!sro - type in subreddit (add o for old reddit)
!so - stack overflow (i usually use it with [tag])
!m will save you over 33% of typing... :-)
!wde - German wikipedia
!wes - Spanish wikipedia
!ade - search on amazon.de
!auk - search on amazon.co.uk
etc.