Drupal Code Search: A new search tool for developers

Events happening in the community are now at Drupal community events on www.drupal.org.
JohnForsythe's picture

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/

Comments

Interesting, but it seems to

Garrett Albright's picture

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's picture

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's picture

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's picture

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

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's picture

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.

awesome

sumitk's picture

I use your site to find code if I got stuck some where
thanks for this work !!
and there are no ads over there - which I like the most
cheers!!
sumit kataria
www.sumitk.net

Astonishing

Wolfflow's picture

It's really. Be part of this comunity bring me every day to wonder how dynamic and successfully Drupal will grow.
Thanks for your great support. Lovely Project

Cheers
Wolfflow

Awesome

robloach's picture

Well done! Any plans to support searching Drupal HEAD/7.x?

I would if I could

JohnForsythe's picture

I wish. The main problem is Google's failure to index new code from the Drupal project. The latest Drupal they've crawled is 6.x-dev. I realize there's probably not a lot of money in it for them to keep the codesearch indexes up to date. I know the association has some direct contacts at Google, maybe someone could get in touch with them and ask them to start crawling the FTP again.

Google Webmaster account

pcoughlin's picture

I believe the frequency of the Google index bot can be controlled from a Webmaster account ... just like on other websites.

Someone would need to create the account (with admin privilidges for Drupal.org) and set it up properly ... then Google would re-index every day (potentially).

I have not done this with FTP sites, just web sites so your mileage may vary ... it is worth a try since it would potentially fix the problem.

Theme development

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: