This site is now 100% read-only, and retired.

Quick Search in firefox

Posted by chris on Tue 7 Mar 2006 at 09:48

Firefox has a fairly useful bookmarking concept - quick searches. In the default 1.5 package under sid I see examples of this in the bookmarks Quick Searches folder.

But - if you add a bookmkark to firefox with the following properties:

Name: Debian Packages
Location: http://packages.debian.org/cgi-bin/search_packages.pl?keywords=%s&searchon=names&subword=1&version=all&release=all
Keyword: deb

You can now type in the firefox address bar e.g.

deb gnump3d

and you'll go straight to the package page for gnump3d.

Some others:

Search debian-administration with "da searchstring"

Name: Debian Administration Search
Location: http://www.debian-administration.org/?search=%s
Keyword: da

Go to an article on debian-administration with "daid articleid"

Name: Debian Administration Article
Location: http://www.debian-administration.org/articles/%s
Keyword: daid

Other browsers may have similar functionality - if you know then why not add it here ?

 

 


Re: Quick Search in firefox
Posted by PJ_at_Belzabar_Software (61.11.xx.xx) on Tue 7 Mar 2006 at 11:32
[ View Weblogs ]
Kewl. I use surfraw (apt-get install surfraw) for a similar thing in console.

With surfraw, just type:

google britney spears

or whatever. Similar stuff for amazon, pubmed, freshmeat, webster, wikipedia, slashdot... the list is pretty extensive. There is a lot of debian specific stuff too (alioth, debugs, debcontents, deblists, deblogs, debpackages, debpts). If something is missing, you can read the hacking file on how to hack up your own 'elvis'. I'm cobbling a simple one together for ixquick.

The blurb for surfaw says:

Surfraw provides a fast unix command line interface to a variety of popular WWW search engines and other artifacts of power. It reclaims google, altavista, dejanews, freshmeat, research index, slashdot and many others from the false-prophet, pox-infested heathen lands of html-forms, placing these wonders where they belong, deep in unix heartland, as god loving extensions to the shell.

PJ

[ Parent ]

Re: Quick Search in firefox
Posted by Anonymous (87.116.xx.xx) on Tue 7 Mar 2006 at 13:59
Konqueror has this too, it's called "Web Shortcuts", and there are plenty of them out of the box. All in the form of shortcut:something, where shortcut is something like deb for debian package search, gg for google, wp for wikipedia, ... You can also add new shortcuts yourself easily.

To find package gnump3d, which you took as an example, you would type deb:gnump3d.

[ Parent ]

Re: Quick Search in firefox
Posted by reluctant (65.78.xx.xx) on Tue 7 Mar 2006 at 14:57
Yeah, but don't forget bookmarklets! ( http://bookmarklets.com )

Here's one I use for wikipedia. Save as bookmark. Highlight some text (or not), click bookmark, and voila! You're at the wikipedia page.

Of course this is vanilla mozilla... nothing debian about it. ;)

javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('Loo kup:',''))};if(Qr)location.href='http://en.wikipedia.org/wiki/Special:Search?search='+escape(Qr)


Have fun!

[ Parent ]

Re: Quick Search in firefox
Posted by reluctant (65.78.xx.xx) on Tue 7 Mar 2006 at 15:01
Bad paste... that should be:

javascript:Qr=document.getSelection();if(!Qr){void(Qr=prompt('Loo kup:',''))};if(Qr)location.href='http://en.wikipedia.org/wiki/Special:Search?search='+escape(Qr)

[ Parent ]

Posted by reluctant (65.78.xx.xx) on Tue 7 Mar 2006 at 15:04
Grr... Can't seem to paste without getting an extraneous space...

'Loo kup:' should be 'Lookup:'

[ Parent ]

Re:
Posted by Steve (212.20.xx.xx) on Tue 7 Mar 2006 at 15:34
[ View Weblogs ]

That is a deliberate site-option to avoid page-widening comments.

Any unbroken string longer than about 60 characters gets a whitespace addition. Irritating in the rare times when it causes problems, but 99% of the time it does the right thing.

[ Parent ]

Re:
Posted by boobytrapped (70.49.xx.xx) on Wed 29 Mar 2006 at 23:02
The grandparent's long string was in a textbox with a horizontal scrollbar. There is no way a long string in such a box can cause page-widening problems. I think the lameness-filter could be made more intelligent for such scenarios.

[ Parent ]

Re:
Posted by Steve (212.20.xx.xx) on Thu 30 Mar 2006 at 09:12
[ View Weblogs ]

Yes, that is true.

(Well kinda, it isn't a text-box that the string is inside. It is <pre> tags which are styled by CSS to overflow like that.)

I see what you're saying and I'm happy to tweak the code to handle long strings - but parsing tags to see if the long text is inside something normal like a <p> tag vs. something special such as the <pre> tag isn't a road I want to go down.

Steve

[ Parent ]

Re: Quick Search in firefox
Posted by Anonymous (85.178.xx.xx) on Tue 7 Mar 2006 at 17:03
This is called smart-bookmarking, opera and others have this feature too.

[ Parent ]

Re: Quick Search in firefox
Posted by Anonymous (81.250.xx.xx) on Tue 7 Mar 2006 at 18:14
you can do this for any form on any web page. Just right-click and select "Add a keyword for this search".

simplest way I know to do this...

[ Parent ]

Re: Quick Search in firefox
Posted by Anonymous (80.126.xx.xx) on Tue 7 Mar 2006 at 23:43
Totally off-topic, I know, but does anyone know if safari has something like this ?
My ibook is running both Debian and Mac OSX, and as webdeveloper I tend to use safari when booted into osx.

Thnx.
Michiel

[ Parent ]