WhooshDoc

Index docstrings for full-text search
Download

WhooshDoc Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Robert Kern
  • Publisher web site:
  • http://www.enthought.com/

WhooshDoc Tags


WhooshDoc Description

Index docstrings for full-text search WhooshDoc is an indexed, full-text search library for Python docstrings. It uses Whoosh to do the indexing and searching, hence the name. It includes tools for collecting docstrings to index them and for searching the index.PrerequisitesFor searching a prepared index, all you need is Whoosh. WhooshDoc uses epydoc to traverse packages and collect their docstrings in order to build a search index. However, epydoc is not required; you can add to a WhooshDoc index using the Whoosh API (see whooshdoc/util.py for the schema), without using epydoc.This package uses setuptools for installation and for locating a default WhooshDoc index. WhooshDoc uses argparse for command line arguments.InstallationYou can install WhooshDoc, along with its dependencies, using with setuptools' easy_install:$ easy_install WhooshDocor via the normal setup.py mechanism after downloading and unpacking the tarball:$ cd WhooshDoc-1.0$ python setup.py installTo use the wxPython search GUI, you must install Enthought's Traits and TraitsBackendWX packages. To do this, use the following easy_install command:$ easy_install 'WhooshDoc'The development source may be checked out via Subversion:$ svn co https://svn.enthought.com/svn/enthought/WhooshDoc/trunk WhooshDocwdocWhooshDoc comes with one script, wdoc. It has several sub-commands. Use "wdoc --help" and "wdoc --help" to see detailed help.To index a package using epydoc to collect docstrings, use "wdoc index". For example:$ wdoc index numpyTo use the console search utility, use "wdoc search". For example:$ wdoc search --help # For an explanation of the query syntax.$ wdoc search bessel or airy not filter$ wdoc search '"phrase searches need weird quoting"' # because shells also interpret quote characters.To use the wxPython GUI, use "wdoc ui". For example:$ wdoc ui$ wdoc ui bessel or airy not filterTo explicitly specify the WhooshDoc index directory, use the -i/--index option before any of these sub-commands. For example:$ wdoc --index ~/Library/WhooshDoc search besselTo remove certain docstrings (e.g., because you updated a package and want to reindex it), use "wdoc delgroups". For example:# First, index a couple of scipy packages with the group name "scipy"$ wdoc index --group scipy scipy.linalg scipy.optimize# Now delete them.$ wdoc delgroups scipyIPythonWhooshDoc includes an IPython "magic" command, %whoosh, which performs a WhooshDoc query and presents the results in the console, like the "wdoc search" command. The %whoosh command integrates with IPython's help mechanisms to display the help for the individual items. To enable it, add the following to your ipy_user_conf.py file:from whooshdoc.ipython import enableenable('/path/to/whooshdoc/index')Now, you can search using %whoosh in IPython. For example:In : %whoosh bessel or airy not filter Requirements: · Python


WhooshDoc Related Software