Drupal Code Search: A new search tool for developers

johnforsythe@drupal.org's picture
public
johnforsythe@dr... - Thu, 2008-04-03 04:37

I'd like to introduce you to an experimental project of mine called Drupal Code Search.

Drupal Code Search lets you search source code from thousands of Drupal modules and themes, use regular expressions, filter results by version, and more.

The goal of this project is to help themers and module developers find code examples faster and easier than before. Results are retrieved using the Code Search Data API.

Check the about page for more details. As I mentioned, this project is still experimental, so any feedback would be greatly appreciated. :)

I hope you find it useful!

--
JohnForsythe
http://blamcast.net/


Interesting, but it seems to

Garrett Albright - Thu, 2008-04-03 15:36

Interesting, but it seems to only be searching core Drupal modules -- is that correct? A grep command on a Drupal installation directory can do that (and is something I often find myself doing). Personally, this service would be more useful if it searched contributed modules as well, so I can see how various functions and such are being used in modules which I don't have on my system and may not have even heard of before.

It searches contributed modules and themes

johnforsythe@drupal.org's picture
johnforsythe@dr... - Thu, 2008-04-03 21:16

It searches everything that Google has indexed (which includes an ever growing number of modules and themes).

Here's a good example.

Google's Code Search bot doesn't crawl very often, so if you're looking for 6.x stuff, most of it hasn't been indexed yet.


I take it back -- this

Garrett Albright - Tue, 2008-04-08 20:39

I take it back -- this thingie has proven itself handy a couple of times for me now. But, yes, wish that Google would index more stuff -- the limited results can sometimes be frustrating.

I'm hoping Google will add

johnforsythe@drupal.org's picture
johnforsythe@dr... - Tue, 2008-04-08 23:56

I'm hoping Google will add more results soon. I was thinking about setting up my own search repository, but I suspect the hardware requirements would far exceed what I have available.


definitely useful

Matt V.'s picture
Matt V. - Tue, 2008-04-22 19:20

I'm finding the site to be very useful. I already set up a YubNub command named "dcode", so I can access the site quickly from Slickrun or Quicksilver. I can search using something like "dcode hook_form_alter" without breaking stride.

One feature I'd like to see is some indication of the number of results that were returned, preferably both a result count and a more specific pager at the bottom of the results pages.

Thanks for putting up the site.


Pager functionality

johnforsythe@drupal.org's picture
johnforsythe@dr... - Tue, 2008-04-22 20:11

Glad you find the site useful.

Unfortunately, pager functionality is limited by the fact that Google's codesearch API doesn't return the total number of results.