Index of /ports/www/zope210/work/Zope-2.10.5-final/lib/python/zope/app/apidoc
Name Last modified Size Description
Parent Directory 29-Oct-2007 06:39 -
zcmlmodule/ 29-Oct-2007 06:39 -
version.txt 29-Oct-2007 06:09 1k
utilitymodule/ 29-Oct-2007 06:39 -
utilities.txt 29-Oct-2007 06:09 21k
utilities.py 29-Oct-2007 06:09 10k
typemodule/ 29-Oct-2007 06:39 -
tests.py 29-Oct-2007 06:09 4k
static.py 29-Oct-2007 06:09 16k
presentation.txt 29-Oct-2007 06:09 15k
presentation.py 29-Oct-2007 06:09 7k
meta.zcml 29-Oct-2007 06:09 1k
interfaces.py 29-Oct-2007 06:09 1k
interface.txt 29-Oct-2007 06:09 8k
interface.py 29-Oct-2007 06:09 5k
ifacemodule/ 29-Oct-2007 06:39 -
enabled.zcml 29-Oct-2007 06:09 2k
disabled.zcml 29-Oct-2007 06:09 1k
disabled.py 29-Oct-2007 06:09 1k
configure.zcml 29-Oct-2007 06:09 1k
component.txt 29-Oct-2007 06:09 15k
component.py 29-Oct-2007 06:09 9k
codemodule/ 29-Oct-2007 06:39 -
classregistry.txt 29-Oct-2007 06:09 5k
classregistry.py 29-Oct-2007 06:09 2k
browser/ 29-Oct-2007 06:39 -
bookmodule/ 29-Oct-2007 06:39 -
apidoc.py 29-Oct-2007 06:09 2k
apidoc-meta.zcml 29-Oct-2007 06:09 1k
apidoc-configure.zcml 29-Oct-2007 06:09 1k
__init__.py 29-Oct-2007 06:09 1k
SETUP.cfg 29-Oct-2007 06:09 1k
MAINTAINER.txt 29-Oct-2007 06:09 1k
DEPENDENCIES.cfg 29-Oct-2007 06:09 1k
========================
Zope 3 API Documentation
========================
This Zope 3 package provides fully dynamic API documentation of Zope 3 and
registered add-on components. The package is very extensible and can be easily
extended by implementing new modules.
Besides being an application, the API doctool also provides several public
APIs to extract information from various objects used by Zope 3.
* utilities -- Miscellaneous classes and functions that aid all documentation
modules. They are broadly usable.
* interface -- This module contains functions to inspect interfaces and
schemas.
* component -- This modules provides utility functions to lookup components
given an interface.
* presentation -- Presentation components are generally more complex than
others, so a separate utilities module is provided to inspect views.
* classregistry -- Here a simple dictionary-based registry for all known
classes is provided. It allows us to search in classes.
Using the API Dcoumentation
---------------------------
The `APIDocumentation` class provides access to all available documentation
modules. Documentation modules are utilities providing `IDocumentationModule`:
>>> from zope.app.testing import ztapi
>>> from zope.app.apidoc.interfaces import IDocumentationModule
>>> from zope.app.apidoc.ifacemodule.ifacemodule import InterfaceModule
>>> from zope.app.apidoc.zcmlmodule import ZCMLModule
>>> ztapi.provideUtility(IDocumentationModule, InterfaceModule(),
... 'Interface')
>>> ztapi.provideUtility(IDocumentationModule, ZCMLModule(), 'ZCML')
Now we can instantiate the class (which is usually done when traversing
'++apidoc++') and get a list of available modules:
>>> from zope.app.apidoc.apidoc import APIDocumentation
>>> doc = APIDocumentation(None, '++apidoc++')
>>> modules = doc.keys()
>>> modules.sort()
>>> modules
[u'Interface', u'ZCML']
>>> doc['ZCML'] #doctest:+ELLIPSIS
<zope.app.apidoc.zcmlmodule.ZCMLModule object at ...>
Developing a Module
-------------------
1. Implement a class that realizes the `IDocumentationModule`
interface.
2. Register this class as a utility using something like this::
<utility
provides="zope.app.apidoc.interfaces.IDocumentationModule"
factory=".examplemodule.ExampleModule"
name="Example" />
3. Take care of security by allowing at least `IDocumentationModule`::
<class class=".ExampleModule">
<allow interface="zope.app.apidoc.interfaces.IDocumentationModule" />
</class>
4. Provide a browser view called ``menu.html``.
5. Provide another view, usually ``index.html``, that can show the
details for the various menu items.
Note: There are several modules that come with the product. Just look
in them for some guidance.
New Static APIDOC-Version
-------------------------
An alternative APIDOC-Version is available through ++apidoc++/static.html
Find and Tree is implemented in Javascript. So it should be possible to do a
"wget" - Offline-Version of APIDOC