Tuesday, June 8, 2010

Searching the Plone3 API

After kvetching about the Plone API documentation, I realized that maybe it's not the docs that need updated, but rather just a better way to navigate through them. Inspired by an awesome article by dukebody, I looked into how chrome could better serve me. To set up API search in the url bar:

  1. Chrome > Preferences > Default Search: Manage
  2. Click the + sign
  3. Choose your name and keyword. I used 'Plone 3 API' and 'api'. Use this beast for the url: http://www.google.com/search?hl=en&q=site:http://api.plone.org/Plone/3.0/private/products/+%s&aq=f&aqi=&aql=&oq=&gs_rfai=
  4. Save and enjoy.
In my case to use it I just enter 'api PloneModuleName' into the url bar and click enter. This gives me instant gratification and filters out the weeds of versions I don't want. Plone on.


  1. Nice idea, but not a particularly great option because:
    * This is missing a bunch of the packages that make up Plone.
    * It hasn't been updated since the Plone 3.0 days.
    * Most of the useful documentation about Plone is on plone.org, not in inline API docs, which are few and far between.

    I would like to see an up-to-date tool for searching/browsing API docs, and would even more like to see up-to-date API docs written, but as it stands this falls short.

  2. I should have mentioned, that for the time being the best bet is probably either searching plone.org, or opening up the egg for the package in question and reading source code.

  3. good points. the recipe still works for plone.org, just change the url to 'http://plone.org/search?SearchableText=%s'.

    For me this does exactly what I want and is up to date "enough". I want to be able to navigate 'online' to find out which methods/interfaces/etc an object provides which is why I prefer the repo version (plus I don't want to read text at all - show me the methods!). Maybe it's a personal style so reader beware!

  4. Not that I am a fan of the "API docs" (api.plone.org) but I'm actually considering updating them for 4.0 (via epydoc) because at least they provide a nice frame of reference.

    However it's true that in the context of "pure" API docs, the useful methods are lost within a mountain of Zope 2, CMF, and other methods with no doc strings ;-)