Commit f46869dc authored by 's avatar

Initial

parent bed4bfd8
"""Help system and documentation support"""
__version__='$Revision: 1.1 $'[11:-2]
import sys, os, string, ts_regex
import Globals, Acquisition
from HelpUtil import classobject, methodobject, is_class, is_module
from App.Dialogs import MessageDialog
from ImageFile import ImageFile
from StructuredText import HTML
from Globals import HTMLFile
class ObjectItem(classobject):
"""Object type wrapper"""
index_html=HTMLFile('objectitem_index', globals())
__roles__=None
def __getattr__(self, name):
if name in ('isDocTemp', '__call__'):
raise AttributeError, name
return getattr(self.__dict__['_obj_'], name)
def get_method_list(self):
rdict=classobject.get_method_dict(self)
perms=self.__ac_permissions__
mdict={}
mlist=[]
for p in self.__ac_permissions__:
pname=p[0]
fnames=p[1]
for fname in fnames:
if rdict.has_key(fname):
fn=rdict[fname]
fn.permission=pname
mdict[fname]=fn
keys=mdict.keys()
keys.sort()
for key in keys:
fn=mdict[key]
if not hasattr(fn._obj_, '__doc__'):
continue
doc=fn._obj_.__doc__
if hasattr(fn._obj_, '__class__') and \
fn._obj_.__class__.__doc__ is doc:
continue
mlist.append(mdict[key])
del rdict
del mdict
return mlist
class ObjectRef(Acquisition.Implicit):
"""Object reference"""
__roles__=None
index_html=HTMLFile('objectref_index', globals())
def __init__(self):
dict={}
for k, v in sys.modules.items():
if v is not None and k != '__builtins__':
dict=self.search_mod(v, dict)
keys=dict.keys()
keys.sort()
for key in keys:
setattr(self, key, dict[key])
self._ids_=keys
objectValues__roles__=None
def objectValues(self):
items=[]
for id in self._ids_:
items.append(getattr(self, id))
return items
def search_mod(self, mod, dict):
for k, v in mod.__dict__.items():
if is_class(v) and hasattr(v, 'meta_type') and \
hasattr(v, '__ac_permissions__'):
dict[v.meta_type]=ObjectItem(k, v)
if is_module(v) and hasattr(v, '__path__'):
dict=self.search_mod(v, dict)
return dict
def __getitem__(self, key):
return self.__dict__[key].__of__(self)
def tpId(self):
return 'ObjectRef'
tpURL=tpId
def tpValues(self):
return self.objectValues()
def __len__(self):
return 1
class HelpSys(Acquisition.Implicit):
"""Help system root"""
__roles__=None
index_html=HTMLFile('helpsys_index', globals())
u_arrow=ImageFile('u_arrow.gif', globals())
d_arrow=ImageFile('d_arrow.gif', globals())
r_arrow=ImageFile('r_arrow.gif', globals())
l_arrow=ImageFile('l_arrow.gif', globals())
ObjectRef=ObjectRef()
def __len__(self):
return 1
This diff is collapsed.
<html>
<head>
<title>
ZOPE Help
</title>
</head>
<body bgcolor="#ffffff" link="#000099" vlink="#555555">
<h2>ZOPE Help</h2>
<p>
The ZOPE online help system provides programming documentation
as well as links to in-depth product guides, mailing lists and
other resources.
</p>
<h3>General Documentation</h3>
<p>
General documentation includes documentation for the use and
management of built-in and add-on products, as well as an
extensive DTML manual.
</p>
<ul>
<li> <a href="">
ZOPE Manager's Guide
</a>
<li> <a href="">
DTML manual
</a>
</ul>
<h3>Programming References</h3>
<p>
ZOPE provides an online object reference that documents the
services provided by high-level objects such as Documents
and Folders. Other references will be added soon.
</p>
<ul>
<li> <a href="<!--#var BASE1-->/HelpSys/ObjectRef/index_html">
Object Reference
</a>
</ul>
<h3>Other Resources</h3>
<p>
Online resources include the <a href="http://www.zope.org/">
ZOPE website</a> and the <a href="mailto:zope@zope.org">
ZOPE mailing list</a>. You can subscribe to the mailing
list by sending an email to <a href="mailto:zope-request@zope.org">
zope-request@zope.org</a> and including the word &quot;subscribe&quot;
in the subject line.
</p>
</body>
</html>
<html>
<head>
<title>
Object Reference
</title>
</head>
<body bgcolor="#ffffff" link="#000099" vlink="#555555">
<a name="top">
<h2><a href="../index_html">Object Reference</a></h2>
<h3><!--#if icon--><img src="<!--#var SCRIPT_NAME-->/<!--#var icon-->" height="16" width="16" alt=""><!--#endif--> <!--#var meta_type--></h3>
<p>
<code>
<!--#var get_docstring-->
</code>
</p>
<h3><!--#var meta_type--> methods</h3>
<!--#call "REQUEST.set('cached_method_list', get_method_list())"-->
<!--#call "REQUEST.set('row_max', _.len(cached_method_list)/2)"-->
<!--#if "_.len(cached_method_list) % 2"-->
<!--#call "REQUEST.set('row_max', row_max+1)"-->
<!--#endif-->
<table width="100%" border="0">
<tr>
<td align="left" valign="top">
<code>
<!--#in "cached_method_list[:row_max]"-->
<a href="#<!--#var get_name-->"><!--#var get_name--></a><br>
<!--#endin-->
</code>
</td>
<td align="left" valign="top">
<code>
<!--#in "cached_method_list[row_max:]"-->
<a href="#<!--#var get_name-->"><!--#var get_name--></a><br>
<!--#endin-->
</code>
</td>
</tr>
</table>
<dl>
<!--#in cached_method_list-->
<dt><code>
<a name="<!--#var get_name-->">
<strong><!--#var get_signature--></strong>
</code>
</dt>
<dd><code>
<!--#if permission-->
<strong>Permission:</strong> <!--#var permission--><br><br>
<!--#endif-->
<!--#if get_docstring--><!--#var get_docstring--><!--#
else-->No documentation for this method<!--#
endif-->
<br>
<a href="#top"><img src="u_arrow.gif" height="9" width="9" border="0" valign="bottom" alt=""> top</a><br><br>
</code>
</dd>
<!--#endin-->
</dl>
<p>
<a href="../index_html">
<img src="<!--#var SCRIPT_NAME-->/HelpSys/l_arrow" height="9" width="9" border="0" valign="bottom" alt=""> Back to Object Reference</a>
</p>
</body>
</html>
<html>
<head>
<title>
Object Reference
</title>
</head>
<body bgcolor="#ffffff" link="#000099" vlink="#555555">
<h2>Object Reference</h2>
<p>
The object reference documents the interfaces of
objects which are built in to the system or have
been installed as add-on products. This reference
focuses on those object services useful in
<em>DTML scripting</em>.
</p>
<ul>
<!--#in objectValues-->
<!--#with sequence-item-->
<li> <a href="<!--#var BASE1-->/HelpSys/ObjectRef/<!--#var
meta_type fmt=url-quote-->/index_html"><!--#var meta_type--></a>
<!--#endwith-->
</li>
<!--#endin-->
</ul>
<p>
<a href="../index_html">
<img src="<!--#var SCRIPT_NAME-->/HelpSys/l_arrow" height="9" width="9" border="0" valign="bottom" alt=""> Back to Help</a>
</p>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment