FWIW, Firefox comes with a several search plugins (Google, Yahoo, etc). These plugins are just XML files, and you can write your own. I wrote one to make it just a little bit easier to search CPAN - I figured I'd put it out here for anyone that's interested.
Name the file CPAN.xml and put it in your Firefox searchplugins directory. On my OpenSUSE Linux box that is /usr/lib/firefox/searchplugins On Windows it should be something like C:\Program Files\Mozilla Firefox\searchplugins I dunno about Mac, though there should be a searchplugins directory wherever Firefox itself is installed.
The encoded stuff is the little camel favicon. It should be all on one line.
> FWIW, Firefox comes with a several search plugins (Google, Yahoo, etc). > These plugins are just XML files, and you can write your own. I wrote > one to make it just a little bit easier to search CPAN - I figured I'd > put it out here for anyone that's interested.
> Name the file CPAN.xml and put it in your Firefox searchplugins > directory. On my OpenSUSE Linux box that is > /usr/lib/firefox/searchplugins > On Windows it should be something like > C:\Program Files\Mozilla Firefox\searchplugins > I dunno about Mac, though there should be a searchplugins directory > wherever Firefox itself is installed.
> The encoded stuff is the little camel favicon. It should be all on one > line.
Make sure that the '&' in the template line includes the 'amp;' escape. That seems to have gotten lost either in your post or my reader. Check the XML by loading the file in your browser.
It can be placed either in the global searchplugins directory or in your home directory which on linux is ~/.mozilla/firefox/32rwhuev.default/ searchplugins/
> FWIW, Firefox comes with a several search plugins (Google, Yahoo, > etc). These plugins are just XML files, and you can write your > own. I wrote one to make it just a little bit easier to search > CPAN - I figured I'd put it out here for anyone that's interested.
As an alternative, I have always preferred search keywords for this kind of stuff. Not as sexy, but works.
Go to http://search.cpan.org/ right click in the textfield and select add a keyword for this search. I set the search domain to Modules and used 'cpan' for the keyword so that I can type
cpan CGI
in the address box and have Firefox search CPAN modules for CGI.
Sinan -- A. Sinan Unur <1...@llenroc.ude.invalid> (remove .invalid and reverse each component for email address)
> FWIW, Firefox comes with a several search plugins (Google, Yahoo, > etc). These plugins are just XML files, and you can write your own. I > wrote one to make it just a little bit easier to search CPAN - I > figured I'd put it out here for anyone that's interested.
smallpond wrote: > On Apr 2, 1:42 pm, David Filmer <use...@davidfilmer.com> wrote: >> FWIW, Firefox comes with a several search plugins (Google, Yahoo, >> etc). These plugins are just XML files, and you can write your own. >> I wrote one to make it just a little bit easier to search CPAN - I >> figured I'd put it out here for anyone that's interested.
>> Name the file CPAN.xml and put it in your Firefox searchplugins >> directory. On my OpenSUSE Linux box that is >> /usr/lib/firefox/searchplugins >> On Windows it should be something like >> C:\Program Files\Mozilla Firefox\searchplugins >> I dunno about Mac, though there should be a searchplugins directory >> wherever Firefox itself is installed.
>> The encoded stuff is the little camel favicon. It should be all on >> one line.
> Make sure that the '&' in the template line includes the 'amp;' > escape. That > seems to have gotten lost either in your post or my reader. Check the > XML by > loading the file in your browser.
> It can be placed either in the global searchplugins directory or in > your home > directory which on linux is ~/.mozilla/firefox/32rwhuev.default/ > searchplugins/
It's your reader. I see the & amp ; in my reader (as well as when looking at the raw message source), so you may want ot check your setting. It's likely doing some sort of HTML translation somewhere.
On Apr 2, 1:42 pm, David Filmer <use...@davidfilmer.com> wrote:
> I dunno about Mac, though there should be a searchplugins directory > wherever Firefox itself is installed.
On a Mac you can either add it to the Firefox.app directory itself, normally /Applications/Firefox.app/Contents/MacOS/searchplugins, or add it to your library directory in ~/Library/Application Support/ Firefox/Profiles/(some random characters).default/searchplugins.
On Apr 2, 1:42 pm, David Filmer <use...@davidfilmer.com> wrote:
> FWIW, Firefox comes with a several search plugins (Google, Yahoo, etc). > These plugins are just XML files, and you can write your own. I wrote > one to make it just a little bit easier to search CPAN - I figured I'd > put it out here for anyone that's interested.
Not to be a negative nelly, but I think other's may have beaten you to it. There are also a few other choices:
On Apr 2, 9:55 pm, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
> As an alternative, I have always preferred search keywords for this > kind of stuff. Not as sexy, but works.
There is (imho) one key benefit to the search plugins, over the location bar search keywords. But it's not standard in most of them except Google.
The Google search plugin has "keyword suggest". Type in "perl" and it suggests "perl split", "perlico", "perl hash", etc. Perl is perhaps not the best example, but I find it's a feature I like a lot.
Most of the other official plugins I've seen don't have this feature (at least when I last looked). However there is an easy hack to add them:
Now you can have a Wikipedia plugin that suggests queries as you type into the search box. You can do the same for your Perl plugin. Or Amazon.
I almost switched to location bar search keywords, but having earlier added the suggest feature to all my other plugins I found I missed it too much. If anyone knows a way to get the suggestions via the location bar, do please let me know.
One big downside is that I've not been able to find a way to make the generic Google Suggest feature site specific. It would be most neat if I could hack the url above to include "site:cpan.org" and have the suggestions only come from that site.
That might not be trivial for Google to implement for all sites, but you'll note that with (not a small) bit of work cpan (or Amazon, BBC, YouTube etc) could implement their own site-specific version of this suggest service to contextualize the suggestions in their plugin. I still find the service useful, even when it's not site specific.
With the caveat that this page was put together entirely for me, so your mileage may vary, I have hacked the following plugins to include the Google Suggest feature. It would be much better if the standard plugins did this themselves I think.
The reason I have my own Google plugin is because of the cruft that the official Google Plugin introduces into the url. It doesn't make for copy&paste friendly. My version generates the shortest url that delivers the results. One down side is that Mozilla probably don't get the ad revenue because I've removed the magic url bits that say "This was a search from a Mozilla product".
ps. Perhaps the cpan people could add a line like this to all their markup, allowing people to add the plugin direct from the site: