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 ?
[ Send Message | View Weblogs ]
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 | Reply to this comment ]
To find package gnump3d, which you took as an example, you would type deb:gnump3d.
[ Parent | Reply to this comment ]
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 | Reply to this comment ]
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 | Reply to this comment ]
'Loo kup:' should be 'Lookup:'
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | 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 | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | 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.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
simplest way I know to do this...
[ Parent | Reply to this comment ]
In opera check out "tools > preferences > search" for something similar, but for websites. You can add websites to search through, and bind them to a key, for eg 'g debian-administration' will google for debian-administration, 'i the matrix' will imdb search and open the matrix page. Its quite handy but the ability to do this with local files would be perfect.
[ Parent | Reply to this comment ]
My ibook is running both Debian and Mac OSX, and as webdeveloper I tend to use safari when booted into osx.
Thnx.
Michiel
[ Parent | Reply to this comment ]