FYI - How to add CPAN as a search plugin for Firefox
FYI - How to add CPAN as a search plugin for Firefox
am 02.04.2008 19:42:37 von David Filmer
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.
Re: FYI - How to add CPAN as a search plugin for Firefox
am 02.04.2008 23:34:16 von smallpond
On Apr 2, 1:42 pm, David Filmer 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.
>
> Here is the CPAN search plugin:
>
>
> xmlns:moz="http://www.mozilla.org/2006/browser/search/">
> CPAN
> Comprehensive Perl Archive Network
> UTF-8
>
> height="16">data:image/x-icon,%00%00%01%00%01%00%10%10%00%00 %00%00%00%00(%01%00%00%16%00%00%00(%00%00%00%10%00%00%00%20% 00%00%00%01%00%04%00%00%00%00%00%C0%00%00%00%00%00%00%00%00% 00%00%00%00%00%00%00%00%00%00%00%FF%FF%FF%00%7B%00%00%00%00% 7B%00%00%7B%7B%00%00%00%00%7B%00%7B%00%7B%00%00%7B%7B%00%BD% BD%BD%00%7B%7B%7B%00%FF%00%00%00%00%FF%00%00%FF%FF%00%00%00% 00%FF%00%FF%00%FF%00%00%FF%FF%00%00%00%00%00%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%F0%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF3l%FC%BF%EF%18%E6%D7%EB%F0%F6%DB%00%00%FA%E9%0 0%02%F8%C3al%FC%03te%F8%02Co%F0%02r%20%E0%01%5C%D0%E0%03%11% 00%E6%0F%BF%E6'%1F%00%02%07%FF%00%06%87%FF2%80%E3%FF1%E0
>
> method="GET"
> template="http://search.cpan.org/search?mode=all&query={sear chTerms}"/>
> searchFormURL
>
>
> Cheers!
Works great. Thanks!
Two things:
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/
Re: FYI - How to add CPAN as a search plugin for Firefox
am 02.04.2008 23:55:02 von 1usa
David Filmer wrote in
news:ys6dnXyLoLbAWG7a4p2dnAA@giganews.com:
> 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 <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
Re: FYI - How to add CPAN as a search plugin for Firefox
am 03.04.2008 00:28:37 von John Bokma
David Filmer 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.
I am somewhat adicted to smart keywords for this:
http://johnbokma.com/firefox/keymarks-explained.html
(look, it even mentiones cpan :-D
and I've also a perldoc one: http://search.cpan.org/perldoc?%s
).
--
John
http://johnbokma.com/firefox/
Re: FYI - How to add CPAN as a search plugin for Firefox
am 03.04.2008 02:06:19 von szr
smallpond wrote:
> On Apr 2, 1:42 pm, David Filmer 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.
>>
>> Here is the CPAN search plugin:
>>
>>
>> xmlns:moz="http://www.mozilla.org/2006/browser/search/">
>> CPAN
>> Comprehensive Perl Archive Network
>> UTF-8
>>
>> height="16">data:image/x-icon,%00%00%01%00%01%00%10%10%00%00 %00%00%00%00(%01%00%00%16%00%00%00(%00%00%00%10%00%00%00%20% 00%00%00%01%00%04%00%00%00%00%00%C0%00%00%00%00%00%00%00%00% 00%00%00%00%00%00%00%00%00%00%00%FF%FF%FF%00%7B%00%00%00%00% 7B%00%00%7B%7B%00%00%00%00%7B%00%7B%00%7B%00%00%7B%7B%00%BD% BD%BD%00%7B%7B%7B%00%FF%00%00%00%00%FF%00%00%FF%FF%00%00%00% 00%FF%00%FF%00%FF%00%00%FF%FF%00%00%00%00%00%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF%FF%FF%FF%F0%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF%FF% FF%FF%FF%FF%FF3l%FC%BF%EF%18%E6%D7%EB%F0%F6%DB%00%00%FA%E9%0 0%02%F8%C3al%FC%03te%F8%02Co%F0%02r%20%E0%01%5C%D0%E0%03%11% 00%E6%0F%BF%E6'%1F%00%02%07%FF%00%06%87%FF2%80%E3%FF1%E0
>>
>> method="GET"
>> template="http://search.cpan.org/search?mode=all&query={sear chTerms}"/>
>> searchFormURL
>>
>>
>> Cheers!
>
>
> Works great. Thanks!
>
> Two things:
>
> 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.
--
szr
Re: FYI - How to add CPAN as a search plugin for Firefox
am 07.04.2008 05:17:06 von jasonkohles
On Apr 2, 1:42 pm, David Filmer 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.
--
Jason Kohles
http://www.jasonkohles.com/
Re: FYI - How to add CPAN as a search plugin for Firefox
am 09.04.2008 23:55:16 von Paul Miller
On Apr 2, 1:42 pm, David Filmer 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:
Then I can search for mod://LWP::UserAgent, doc://perlxs or cpan://RSS
and get usefull answers.
-Paul
Re: FYI - How to add CPAN as a search plugin for Firefox
am 14.04.2008 12:15:04 von Minty
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.
http://minty.org/search/
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: